From 1d69620af51a99d22f067e56702d004931e5b74f Mon Sep 17 00:00:00 2001 From: Priya Shet Date: Fri, 8 Nov 2024 15:53:04 -0600 Subject: [PATCH] NetworkCloud API 2024-06-01-preview - SDK updated with Generated code and sample tests for API version (#45967) * NetworkCloud API 2024-06-01-preview :SDK updated * renamed new kubernetes cluster features to use RP prefix as others do; added release notes * updated APIs * rename * updated change log * Updated assets.json with RackSku and Racks Tests updated * include L2 netwrork test recording * Include KubernetesCluster Feature and Kubernetescluster agentpool tests recording Include Cluster Manager tests recording Co-authored-by: Anna Pankiewicz Co-authored-by: Priya Shet * Add L2/L3 network test * baremetal tests * Volumne test recordings for 2024-06-01-preview api * clusters tests * metrics config & baremetal key sets * update storage appliance test * BMC keyset test * Virtual machines and consoles * KubenetesCluster tests updated * added more details for changelog * fix the API * fix comment * updated the tag * added assets for storage appliance * updated to includ CSN changes * updated L2 networks * Add Volume recordings for 2024-06-01 api version * update tag for l3 networks * updated trunked network assets tag * renamed Clusters test to have a unique name * continue update * adding try catch * KubernetestCluster tests * Update Kubernetes Cluster tests * removing ccuva * removing ccuva * fix typo * add more specific error message check * add the release date for the preview version * remove --------- Co-authored-by: priya shet Co-authored-by: Marina Bashtovaya Co-authored-by: linquanlyu Co-authored-by: Anna Pankiewicz Co-authored-by: mfoster58 Co-authored-by: Mike Pham --- .../CHANGELOG.md | 28 +- ...urceManager.NetworkCloud.netstandard2.0.cs | 551 +++++++++++++- .../assets.json | 2 +- .../Sample_NetworkCloudAgentPoolCollection.cs | 17 +- .../Sample_NetworkCloudAgentPoolResource.cs | 43 +- ..._NetworkCloudBareMetalMachineCollection.cs | 8 +- ...rkCloudBareMetalMachineKeySetCollection.cs | 12 +- ...workCloudBareMetalMachineKeySetResource.cs | 34 +- ...le_NetworkCloudBareMetalMachineResource.cs | 26 +- .../Sample_NetworkCloudBmcKeySetCollection.cs | 12 +- .../Sample_NetworkCloudBmcKeySetResource.cs | 34 +- ...workCloudCloudServicesNetworkCollection.cs | 12 +- ...etworkCloudCloudServicesNetworkResource.cs | 35 +- .../Sample_NetworkCloudClusterCollection.cs | 37 +- ...le_NetworkCloudClusterManagerCollection.cs | 68 +- ...mple_NetworkCloudClusterManagerResource.cs | 42 +- ...udClusterMetricsConfigurationCollection.cs | 10 +- ...loudClusterMetricsConfigurationResource.cs | 32 +- .../Sample_NetworkCloudClusterResource.cs | 293 +++++++- ...NetworkCloudKubernetesClusterCollection.cs | 199 ++++- ...CloudKubernetesClusterFeatureCollection.cs | 212 ++++++ ...rkCloudKubernetesClusterFeatureResource.cs | 124 +++ ...e_NetworkCloudKubernetesClusterResource.cs | 50 +- .../Sample_NetworkCloudL2NetworkCollection.cs | 10 +- .../Sample_NetworkCloudL2NetworkResource.cs | 33 +- .../Sample_NetworkCloudL3NetworkCollection.cs | 10 +- .../Sample_NetworkCloudL3NetworkResource.cs | 33 +- .../Sample_NetworkCloudRackCollection.cs | 8 +- .../Sample_NetworkCloudRackResource.cs | 6 +- .../Sample_NetworkCloudRackSkuCollection.cs | 8 +- .../Sample_NetworkCloudRackSkuResource.cs | 2 +- ..._NetworkCloudStorageApplianceCollection.cs | 8 +- ...le_NetworkCloudStorageApplianceResource.cs | 10 +- ...le_NetworkCloudTrunkedNetworkCollection.cs | 10 +- ...mple_NetworkCloudTrunkedNetworkResource.cs | 33 +- ...le_NetworkCloudVirtualMachineCollection.cs | 14 +- ...orkCloudVirtualMachineConsoleCollection.cs | 10 +- ...tworkCloudVirtualMachineConsoleResource.cs | 32 +- ...mple_NetworkCloudVirtualMachineResource.cs | 41 +- .../Sample_NetworkCloudVolumeCollection.cs | 10 +- .../Sample_NetworkCloudVolumeResource.cs | 33 +- .../src/Custom/ArmNetworkCloudModelFactory.cs | 182 +++++ .../CustomNetworkCloudArmOperation.cs} | 14 +- .../Models/InitialAgentPoolConfiguration.cs | 27 + .../Custom/Models/KubernetesClusterNode.cs | 29 + .../src/Custom/Models/NetworkAttachment.cs | 50 ++ .../Models/NetworkCloudAgentPoolPatch.cs | 29 + .../NetworkCloudKubernetesClusterPatch.cs | 27 + .../src/Custom/NetworkCloudAgentPoolData.cs | 30 + .../Custom/NetworkCloudAgentPoolResource.cs | 190 +++++ ...workCloudBareMetalMachineKeySetResource.cs | 187 +++++ .../Custom/NetworkCloudBmcKeySetResource.cs | 187 +++++ ...etworkCloudCloudServicesNetworkResource.cs | 187 +++++ .../NetworkCloudClusterManagerResource.cs | 187 +++++ ...loudClusterMetricsConfigurationResource.cs | 187 +++++ .../src/Custom/NetworkCloudClusterResource.cs | 187 +++++ .../NetworkCloudKubernetesClusterResource.cs | 187 +++++ .../Custom/NetworkCloudL2NetworkResource.cs | 184 +++++ .../Custom/NetworkCloudL3NetworkResource.cs | 187 +++++ .../NetworkCloudTrunkedNetworkResource.cs | 187 +++++ ...tworkCloudVirtualMachineConsoleResource.cs | 187 +++++ .../NetworkCloudVirtualMachineResource.cs | 187 +++++ .../src/Custom/NetworkCloudVolumeResource.cs | 187 +++++ .../Generated/ArmNetworkCloudModelFactory.cs | 359 ++++++++- .../MockableNetworkCloudArmClient.cs | 12 + ...ckableNetworkCloudResourceGroupResource.cs | 48 +- ...ockableNetworkCloudSubscriptionResource.cs | 52 +- .../Extensions/NetworkCloudExtensions.cs | 119 +-- ...KubernetesClusterFeatureOperationSource.cs | 38 + ...stratorConfigurationPatch.Serialization.cs | 143 ++++ .../Models/AdministratorConfigurationPatch.cs | 66 ++ .../AgentPoolUpgradeSettings.Serialization.cs | 30 +- .../Models/AgentPoolUpgradeSettings.cs | 16 +- .../BgpServiceLoadBalancerConfiguration.cs | 4 +- .../src/Generated/Models/ClusterCapacity.cs | 24 +- .../Models/ClusterConnectionStatus.cs | 3 + ...tinueUpdateVersionContent.Serialization.cs | 133 ++++ .../ClusterContinueUpdateVersionContent.cs | 65 ++ ...eUpdateVersionMachineGroupTargetingMode.cs | 48 ++ .../Generated/Models/ClusterDetailedStatus.cs | 3 + ...ClusterScanRuntimeContent.Serialization.cs | 133 ++++ .../Models/ClusterScanRuntimeContent.cs | 65 ++ ...lusterScanRuntimeParametersScanActivity.cs | 51 ++ .../ClusterSecretArchive.Serialization.cs | 141 ++++ .../Generated/Models/ClusterSecretArchive.cs | 80 ++ .../Models/ClusterSecretArchiveEnabled.cs | 51 ++ .../ClusterUpdateStrategy.Serialization.cs | 178 +++++ .../Generated/Models/ClusterUpdateStrategy.cs | 98 +++ .../Models/ClusterUpdateStrategyType.cs | 51 ++ .../CommandOutputSettings.Serialization.cs | 148 ++++ .../Generated/Models/CommandOutputSettings.cs | 69 ++ .../src/Generated/Models/ConsoleEnabled.cs | 2 +- ...aneNodePatchConfiguration.Serialization.cs | 19 +- .../ControlPlaneNodePatchConfiguration.cs | 19 +- .../src/Generated/Models/IPAddressPool.cs | 6 +- .../Models/IdentitySelector.Serialization.cs | 148 ++++ .../src/Generated/Models/IdentitySelector.cs | 70 ++ .../Models/InitialAgentPoolConfiguration.cs | 14 +- .../Models/KeySetUser.Serialization.cs | 13 +- .../src/Generated/Models/KeySetUser.cs | 7 +- ...etesClusterFeatureAvailabilityLifecycle.cs | 51 ++ .../KubernetesClusterFeatureDetailedStatus.cs | 54 ++ ...ernetesClusterFeatureList.Serialization.cs | 154 ++++ .../Models/KubernetesClusterFeatureList.cs | 70 ++ ...bernetesClusterFeatureProvisioningState.cs | 63 ++ .../KubernetesClusterFeatureRequired.cs | 51 ++ ...usterNetworkConfiguration.Serialization.cs | 16 + .../KubernetesClusterNetworkConfiguration.cs | 21 +- .../KubernetesClusterNode.Serialization.cs | 24 +- .../Generated/Models/KubernetesClusterNode.cs | 23 +- ...LoadBalancerConfiguration.Serialization.cs | 143 ++++ .../L2ServiceLoadBalancerConfiguration.cs | 66 ++ .../src/Generated/Models/MachineDisk.cs | 4 +- .../src/Generated/Models/MachineSkuSlot.cs | 4 +- .../ManagedServiceIdentitySelectorType.cs | 51 ++ .../Models/NetworkAttachment.Serialization.cs | 6 +- .../src/Generated/Models/NetworkAttachment.cs | 19 +- ...etworkCloudAgentPoolPatch.Serialization.cs | 17 +- .../Models/NetworkCloudAgentPoolPatch.cs | 28 +- ...kCloudClusterManagerPatch.Serialization.cs | 20 +- .../Models/NetworkCloudClusterManagerPatch.cs | 7 +- .../NetworkCloudClusterPatch.Serialization.cs | 83 ++ .../Models/NetworkCloudClusterPatch.cs | 35 +- ...rnetesClusterFeaturePatch.Serialization.cs | 184 +++++ ...tworkCloudKubernetesClusterFeaturePatch.cs | 71 ++ ...oudKubernetesClusterPatch.Serialization.cs | 17 +- .../NetworkCloudKubernetesClusterPatch.cs | 27 +- .../Models/NetworkCloudNetworkInterface.cs | 4 +- .../Generated/Models/NetworkCloudOSDisk.cs | 6 +- ...loudOperationStatusResult.Serialization.cs | 187 +++-- .../NetworkCloudOperationStatusResult.cs | 60 +- .../NetworkCloudVirtualMachineConsolePatch.cs | 4 +- ...stratorConfigurationPatch.Serialization.cs | 143 ++++ ...NodePoolAdministratorConfigurationPatch.cs | 66 ++ .../Models/RackSkuProvisioningState.cs | 6 + ...meProtectionConfiguration.Serialization.cs | 133 ++++ .../Models/RuntimeProtectionConfiguration.cs | 65 ++ .../RuntimeProtectionEnforcementLevel.cs | 60 ++ .../RuntimeProtectionStatus.Serialization.cs | 195 +++++ .../Models/RuntimeProtectionStatus.cs | 81 ++ .../SecretArchiveReference.Serialization.cs | 155 ++++ .../Models/SecretArchiveReference.cs | 74 ++ .../SecretRotationStatus.Serialization.cs | 195 +++++ .../Generated/Models/SecretRotationStatus.cs | 81 ++ .../Models/ServiceLoadBalancerBgpPeer.cs | 8 +- .../Models/StorageApplianceSkuSlot.cs | 4 +- .../StringKeyValuePair.Serialization.cs | 134 ++++ .../Generated/Models/StringKeyValuePair.cs | 82 ++ .../NetworkCloudAgentPoolCollection.cs | 20 +- .../Generated/NetworkCloudAgentPoolData.cs | 14 +- .../NetworkCloudAgentPoolResource.cs | 104 +-- .../NetworkCloudBareMetalMachineCollection.cs | 16 +- ...CloudBareMetalMachineData.Serialization.cs | 80 ++ .../NetworkCloudBareMetalMachineData.cs | 20 +- ...rkCloudBareMetalMachineKeySetCollection.cs | 20 +- ...workCloudBareMetalMachineKeySetResource.cs | 104 +-- .../NetworkCloudBareMetalMachineResource.cs | 60 +- .../NetworkCloudBmcKeySetCollection.cs | 20 +- .../NetworkCloudBmcKeySetResource.cs | 104 +-- ...workCloudCloudServicesNetworkCollection.cs | 20 +- ...etworkCloudCloudServicesNetworkResource.cs | 104 +-- .../NetworkCloudClusterCollection.cs | 20 +- .../NetworkCloudClusterData.Serialization.cs | 82 ++ .../src/Generated/NetworkCloudClusterData.cs | 34 +- .../NetworkCloudClusterManagerCollection.cs | 20 +- ...rkCloudClusterManagerData.Serialization.cs | 18 + .../NetworkCloudClusterManagerData.cs | 6 +- .../NetworkCloudClusterManagerResource.cs | 104 +-- ...udClusterMetricsConfigurationCollection.cs | 20 +- ...loudClusterMetricsConfigurationResource.cs | 104 +-- .../Generated/NetworkCloudClusterResource.cs | 210 ++++-- ...NetworkCloudKubernetesClusterCollection.cs | 20 +- .../NetworkCloudKubernetesClusterData.cs | 6 +- ...CloudKubernetesClusterFeatureCollection.cs | 493 ++++++++++++ ...ernetesClusterFeatureData.Serialization.cs | 291 +++++++ ...etworkCloudKubernetesClusterFeatureData.cs | 108 +++ ...tesClusterFeatureResource.Serialization.cs | 26 + ...rkCloudKubernetesClusterFeatureResource.cs | 707 ++++++++++++++++++ .../NetworkCloudKubernetesClusterResource.cs | 133 ++-- .../NetworkCloudL2NetworkCollection.cs | 20 +- .../NetworkCloudL2NetworkResource.cs | 104 +-- .../NetworkCloudL3NetworkCollection.cs | 20 +- .../NetworkCloudL3NetworkResource.cs | 104 +-- .../Generated/NetworkCloudRackCollection.cs | 16 +- .../src/Generated/NetworkCloudRackResource.cs | 20 +- .../NetworkCloudRackSkuCollection.cs | 16 +- .../Generated/NetworkCloudRackSkuResource.cs | 4 +- .../NetworkCloudStorageApplianceCollection.cs | 16 +- ...CloudStorageApplianceData.Serialization.cs | 62 ++ .../NetworkCloudStorageApplianceData.cs | 19 +- .../NetworkCloudStorageApplianceResource.cs | 28 +- .../NetworkCloudTrunkedNetworkCollection.cs | 20 +- .../NetworkCloudTrunkedNetworkResource.cs | 104 +-- .../NetworkCloudVirtualMachineCollection.cs | 20 +- ...orkCloudVirtualMachineConsoleCollection.cs | 20 +- ...tworkCloudVirtualMachineConsoleResource.cs | 104 +-- .../NetworkCloudVirtualMachineData.cs | 10 +- .../NetworkCloudVirtualMachineResource.cs | 124 +-- .../Generated/NetworkCloudVolumeCollection.cs | 20 +- .../Generated/NetworkCloudVolumeResource.cs | 104 +-- .../AgentPoolsRestOperations.cs | 2 +- .../BareMetalMachineKeySetsRestOperations.cs | 2 +- .../BareMetalMachinesRestOperations.cs | 22 +- .../BmcKeySetsRestOperations.cs | 2 +- .../CloudServicesNetworksRestOperations.cs | 2 +- .../ClusterManagersRestOperations.cs | 2 +- .../RestOperations/ClustersRestOperations.cs | 199 ++++- .../RestOperations/ConsolesRestOperations.cs | 2 +- ...KubernetesClusterFeaturesRestOperations.cs | 615 +++++++++++++++ .../KubernetesClustersRestOperations.cs | 4 +- .../L2NetworksRestOperations.cs | 2 +- .../L3NetworksRestOperations.cs | 2 +- .../MetricsConfigurationsRestOperations.cs | 2 +- .../RestOperations/RackSkusRestOperations.cs | 2 +- .../RestOperations/RacksRestOperations.cs | 2 +- .../StorageAppliancesRestOperations.cs | 6 +- .../TrunkedNetworksRestOperations.cs | 2 +- .../VirtualMachinesRestOperations.cs | 10 +- .../RestOperations/VolumesRestOperations.cs | 2 +- .../src/autorest.md | 27 +- .../NetworkCloudManagementTestEnvironment.cs | 4 +- .../tests/Scenario/AgentPoolTests.cs | 3 +- .../Scenario/CloudServicesNetworksTests.cs | 2 +- .../Scenario/KubernetesClusterFeatureTests.cs | 79 ++ .../tests/Scenario/KubernetesClustersTests.cs | 15 +- ...sTests.cs => NetworkCloudClustersTests.cs} | 53 +- 226 files changed, 13363 insertions(+), 2521 deletions(-) create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterFeatureCollection.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterFeatureResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/ArmNetworkCloudModelFactory.cs rename sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/{Generated/LongRunningOperation/NetworkCloudArmOperation.cs => Custom/LongRunningOperation/CustomNetworkCloudArmOperation.cs} (85%) create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/InitialAgentPoolConfiguration.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/KubernetesClusterNode.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/NetworkAttachment.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/NetworkCloudAgentPoolPatch.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/NetworkCloudKubernetesClusterPatch.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolData.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineKeySetResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBmcKeySetResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudCloudServicesNetworkResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterManagerResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterMetricsConfigurationResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL2NetworkResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL3NetworkResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudTrunkedNetworkResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineConsoleResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVolumeResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/NetworkCloudKubernetesClusterFeatureOperationSource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministratorConfigurationPatch.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministratorConfigurationPatch.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterContinueUpdateVersionContent.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterContinueUpdateVersionContent.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterContinueUpdateVersionMachineGroupTargetingMode.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterScanRuntimeContent.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterScanRuntimeContent.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterScanRuntimeParametersScanActivity.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterSecretArchive.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterSecretArchive.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterSecretArchiveEnabled.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateStrategy.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateStrategy.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateStrategyType.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/CommandOutputSettings.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/CommandOutputSettings.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IdentitySelector.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IdentitySelector.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureAvailabilityLifecycle.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureDetailedStatus.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureList.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureList.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureProvisioningState.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureRequired.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2ServiceLoadBalancerConfiguration.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2ServiceLoadBalancerConfiguration.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ManagedServiceIdentitySelectorType.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterFeaturePatch.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterFeaturePatch.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NodePoolAdministratorConfigurationPatch.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NodePoolAdministratorConfigurationPatch.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionConfiguration.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionConfiguration.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionEnforcementLevel.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionStatus.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionStatus.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretArchiveReference.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretArchiveReference.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretRotationStatus.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretRotationStatus.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StringKeyValuePair.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StringKeyValuePair.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureCollection.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureData.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureData.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureResource.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureResource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/KubernetesClusterFeaturesRestOperations.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/KubernetesClusterFeatureTests.cs rename sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/{ClustersTests.cs => NetworkCloudClustersTests.cs} (72%) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/CHANGELOG.md b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/CHANGELOG.md index ce3f1a661413e..540d211ac5c1d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/CHANGELOG.md +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/CHANGELOG.md @@ -1,18 +1,36 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2024-11-06) ### Features Added +- This SDK version supports 2024-06-01-preview API version. +- ClusterManager resource supports system-assigned and user-assigned identities. +- Cluster resource supports system-assigned and user-assigned identities. +- Cluster resource supports version update with the pause and a new command to continue the update. ClusterDetailedStatus got a new value "UpdatePaused" to represent Cluster update status being paused. +- Cluster resource supports the new scan runtime command, and RuntimeProtectionEnforcementLevel got a new value "OnDemand". +- ClusterConnectionStatus got a new value representing "Disconnected" status of the Cluster. +- CommandOutputSettings is added to Cluster configuration for provisioning of a storage account used during BareMetalMachine command execution result download. +- ClusterSecretArchive is added to configure a key vault for Cluster's secrets storage. +- ClusterUpdateStrategy is added to support a rack pause during Cluster update. +- KubernetesClusterFeature is added that enables managing addons for the KubernetesCluster. +- AgentPoolUpgradeSettings is added that configures upgrade setting for the KubernetesCluster agent pool. +- l2ServiceLoadBalancerConfiguration is added to support an alternative load balancer for the KubernetesCluster. +- KubernetesCluster configuration is added to support additional upgrade settings drainTimeout and maxUnavailable for initial agent pools. The same configuration is added to the KubernetesCluster agentpool. +- BareMetalMachine has new properties returned for the machine cluster version, machine roles, runtime protection status, and secret rotation status. +- StorageAppliance has new properties returned for the appliance manifacturer, model, version, and secret rotation status. +- KeySetUser has a new property containing a user principal name that can be set. +- RackSkuProvisioningState got new values "Cancelled" and "Failed" to better represent its state. +- NetworkCloudOperationStatusResult now exposes additional properties to get access for BareMetalMachine command execution result, such as, exitCode, outputHead, resultRef, and resultUri. - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - Exposed `JsonModelWriteCore` for model serialization procedure. -### Breaking Changes - -### Bugs Fixed - ### Other Changes +- A clarification is added to the descriptions throughout that memory and disk sizes are measured in gibibytes. +- ServiceLoadBalancerBgpPeer has the following optional fields marked as deprecated: "holdTime" and "keepAliveTime". If defined, their values will be ignored. +- For consistency with the API implementation, synchronous DELETE commands were removed and Location header is added to all PATCH update commands. + ## 1.0.1 (2023-11-29) ### Features Added diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.netstandard2.0.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.netstandard2.0.cs index 8dfb4ac2f73ff..5c2a854a83202 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.netstandard2.0.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.netstandard2.0.cs @@ -33,7 +33,9 @@ public NetworkCloudAgentPoolData(Azure.Core.AzureLocation location, long count, public Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode Mode { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Taints { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string UpgradeMaxSurge { get { throw null; } set { } } + public Azure.ResourceManager.NetworkCloud.Models.AgentPoolUpgradeSettings UpgradeSettings { get { throw null; } set { } } public string VmSkuName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudAgentPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -51,8 +53,12 @@ protected NetworkCloudAgentPoolResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string agentPoolName) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -100,8 +106,10 @@ public NetworkCloudBareMetalMachineData(Azure.Core.AzureLocation location, Azure public System.Collections.Generic.IReadOnlyList HybridAksClustersAssociatedIds { get { throw null; } } public string KubernetesNodeName { get { throw null; } } public string KubernetesVersion { get { throw null; } } + public string MachineClusterVersion { get { throw null; } set { } } public string MachineDetails { get { throw null; } set { } } public string MachineName { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList MachineRoles { get { throw null; } } public string MachineSkuId { get { throw null; } set { } } public System.Net.IPAddress OamIPv4Address { get { throw null; } } public string OamIPv6Address { get { throw null; } } @@ -111,6 +119,8 @@ public NetworkCloudBareMetalMachineData(Azure.Core.AzureLocation location, Azure public Azure.Core.ResourceIdentifier RackId { get { throw null; } set { } } public long RackSlot { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineReadyState? ReadyState { get { throw null; } } + public Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionStatus RuntimeProtectionStatus { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SecretRotationStatus { get { throw null; } } public string SerialNumber { get { throw null; } set { } } public string ServiceTag { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachinesAssociatedIds { get { throw null; } } @@ -169,8 +179,12 @@ protected NetworkCloudBareMetalMachineKeySetResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string bareMetalMachineKeySetName) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -274,8 +288,12 @@ protected NetworkCloudBmcKeySetResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string bmcKeySetName) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -338,8 +356,12 @@ protected NetworkCloudCloudServicesNetworkResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string cloudServicesNetworkName) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -386,17 +408,22 @@ public NetworkCloudClusterData(Azure.Core.AzureLocation location, Azure.Resource public Azure.ResourceManager.NetworkCloud.Models.ServicePrincipalInformation ClusterServicePrincipal { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.ClusterType ClusterType { get { throw null; } set { } } public string ClusterVersion { get { throw null; } set { } } + public Azure.ResourceManager.NetworkCloud.Models.CommandOutputSettings CommandOutputSettings { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.ValidationThreshold ComputeDeploymentThreshold { get { throw null; } set { } } public System.Collections.Generic.IList ComputeRackDefinitions { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.ClusterDetailedStatus? DetailedStatus { get { throw null; } } public string DetailedStatusMessage { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation HybridAksExtendedLocation { get { throw null; } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.ManagedResourceGroupConfiguration ManagedResourceGroupConfiguration { get { throw null; } set { } } public long? ManualActionCount { get { throw null; } } public Azure.Core.ResourceIdentifier NetworkFabricId { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.ClusterProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel? RuntimeProtectionEnforcementLevel { get { throw null; } set { } } + public Azure.ResourceManager.NetworkCloud.Models.ClusterSecretArchive SecretArchive { get { throw null; } set { } } public System.DateTimeOffset? SupportExpireOn { get { throw null; } } + public Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategy UpdateStrategy { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList WorkloadResourceIds { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudClusterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -431,6 +458,7 @@ public NetworkCloudClusterManagerData(Azure.Core.AzureLocation location, Azure.C public Azure.ResourceManager.NetworkCloud.Models.ClusterManagerDetailedStatus? DetailedStatus { get { throw null; } } public string DetailedStatusMessage { get { throw null; } } public Azure.Core.ResourceIdentifier FabricControllerId { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.ManagedResourceGroupConfiguration ManagedResourceGroupConfiguration { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation ManagerExtendedLocation { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.ClusterManagerProvisioningState? ProvisioningState { get { throw null; } } @@ -451,8 +479,12 @@ protected NetworkCloudClusterManagerResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterManagerName) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -510,8 +542,12 @@ protected NetworkCloudClusterMetricsConfigurationResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string metricsConfigurationName) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -534,9 +570,15 @@ protected NetworkCloudClusterResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ContinueUpdateVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterContinueUpdateVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ContinueUpdateVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterContinueUpdateVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Deploy(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterDeployContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> DeployAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterDeployContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -552,6 +594,8 @@ protected NetworkCloudClusterResource() { } public virtual Azure.ResourceManager.NetworkCloud.NetworkCloudClusterMetricsConfigurationCollection GetNetworkCloudClusterMetricsConfigurations() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ScanRuntime(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterScanRuntimeContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ScanRuntimeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterScanRuntimeContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.NetworkCloud.NetworkCloudClusterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -596,6 +640,7 @@ public static partial class NetworkCloudExtensions public static Azure.AsyncPageable GetNetworkCloudClustersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetNetworkCloudKubernetesCluster(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string kubernetesClusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNetworkCloudKubernetesClusterAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string kubernetesClusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterFeatureResource GetNetworkCloudKubernetesClusterFeatureResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterResource GetNetworkCloudKubernetesClusterResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterCollection GetNetworkCloudKubernetesClusters(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetNetworkCloudKubernetesClusters(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -693,6 +738,65 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NetworkCloudKubernetesClusterFeatureCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkCloudKubernetesClusterFeatureCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string featureName, Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterFeatureData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string featureName, Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterFeatureData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NetworkCloudKubernetesClusterFeatureData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkCloudKubernetesClusterFeatureData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureAvailabilityLifecycle? AvailabilityLifecycle { get { throw null; } } + public Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureDetailedStatus? DetailedStatus { get { throw null; } } + public string DetailedStatusMessage { get { throw null; } } + public System.Collections.Generic.IList Options { get { throw null; } } + public Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureRequired? Required { get { throw null; } } + public string Version { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterFeatureData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterFeatureData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetworkCloudKubernetesClusterFeatureResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkCloudKubernetesClusterFeatureResource() { } + public virtual Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterFeatureData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterFeatureData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterFeatureData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudKubernetesClusterFeaturePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudKubernetesClusterFeaturePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class NetworkCloudKubernetesClusterResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -702,13 +806,20 @@ protected NetworkCloudKubernetesClusterResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string kubernetesClusterName) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetNetworkCloudAgentPool(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetworkCloudAgentPoolAsync(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NetworkCloud.NetworkCloudAgentPoolCollection GetNetworkCloudAgentPools() { throw null; } + public virtual Azure.Response GetNetworkCloudKubernetesClusterFeature(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNetworkCloudKubernetesClusterFeatureAsync(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterFeatureCollection GetNetworkCloudKubernetesClusterFeatures() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation RestartNode(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterRestartNodeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -772,6 +883,8 @@ protected NetworkCloudL2NetworkResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string l2NetworkName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -838,8 +951,12 @@ protected NetworkCloudL3NetworkResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string l3NetworkName) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -985,13 +1102,17 @@ public NetworkCloudStorageApplianceData(Azure.Core.AzureLocation location, Azure public string DetailedStatusMessage { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } public System.Net.IPAddress ManagementIPv4Address { get { throw null; } } + public string Manufacturer { get { throw null; } } + public string Model { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.StorageApplianceProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier RackId { get { throw null; } set { } } public long RackSlot { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementFeature? RemoteVendorManagementFeature { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementStatus? RemoteVendorManagementStatus { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SecretRotationStatus { get { throw null; } } public string SerialNumber { get { throw null; } set { } } public string StorageApplianceSkuId { get { throw null; } set { } } + public string Version { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.NetworkCloudStorageApplianceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1074,8 +1195,12 @@ protected NetworkCloudTrunkedNetworkResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string trunkedNetworkName) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1152,8 +1277,12 @@ protected NetworkCloudVirtualMachineConsoleResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualMachineName, string consoleName) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1212,8 +1341,12 @@ protected NetworkCloudVirtualMachineResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualMachineName) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetNetworkCloudVirtualMachineConsole(string consoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1282,8 +1415,12 @@ protected NetworkCloudVolumeResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string volumeName) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteWithResponse(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteWithResponseAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1312,6 +1449,7 @@ protected MockableNetworkCloudArmClient() { } public virtual Azure.ResourceManager.NetworkCloud.NetworkCloudClusterManagerResource GetNetworkCloudClusterManagerResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetworkCloud.NetworkCloudClusterMetricsConfigurationResource GetNetworkCloudClusterMetricsConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetworkCloud.NetworkCloudClusterResource GetNetworkCloudClusterResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterFeatureResource GetNetworkCloudKubernetesClusterFeatureResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterResource GetNetworkCloudKubernetesClusterResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetworkCloud.NetworkCloudL2NetworkResource GetNetworkCloudL2NetworkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetworkCloud.NetworkCloudL3NetworkResource GetNetworkCloudL3NetworkResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -1481,6 +1619,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState left, Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class AgentPoolUpgradeSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AgentPoolUpgradeSettings() { } + public long? DrainTimeout { get { throw null; } set { } } + public string MaxSurge { get { throw null; } set { } } + public string MaxUnavailable { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.AgentPoolUpgradeSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.AgentPoolUpgradeSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public static partial class ArmNetworkCloudModelFactory { public static Azure.ResourceManager.NetworkCloud.Models.AvailableUpgrade AvailableUpgrade(Azure.ResourceManager.NetworkCloud.Models.AvailabilityLifecycle? availabilityLifecycle = default(Azure.ResourceManager.NetworkCloud.Models.AvailabilityLifecycle?), string version = null) { throw null; } @@ -1495,32 +1646,52 @@ public static partial class ArmNetworkCloudModelFactory public static Azure.ResourceManager.NetworkCloud.Models.HardwareInventoryNetworkInterface HardwareInventoryNetworkInterface(string linkStatus = null, string macAddress = null, string name = null, string networkInterfaceId = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.HardwareValidationStatus HardwareValidationStatus(System.DateTimeOffset? lastValidationOn = default(System.DateTimeOffset?), Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineHardwareValidationResult? result = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineHardwareValidationResult?)) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.KeySetUserStatus KeySetUserStatus(string azureUserName = null, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineKeySetUserSetupStatus? status = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineKeySetUserSetupStatus?), string statusMessage = null) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNode KubernetesClusterNode(Azure.Core.ResourceIdentifier agentPoolArmId = null, string availabilityZone = null, Azure.Core.ResourceIdentifier bareMetalMachineArmId = null, long? cpuCores = default(long?), Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus?), string detailedStatusMessage = null, long? diskSizeGB = default(long?), string image = null, string kubernetesVersion = null, System.Collections.Generic.IEnumerable labels = null, long? memorySizeGB = default(long?), Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode? mode = default(Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode?), string name = null, System.Collections.Generic.IEnumerable networkAttachments = null, Azure.ResourceManager.NetworkCloud.Models.KubernetesNodePowerState? powerState = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesNodePowerState?), Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole? role = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole?), System.Collections.Generic.IEnumerable taints = null, string vmSkuName = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNode KubernetesClusterNode(string agentPoolId = null, string availabilityZone = null, string bareMetalMachineId = null, long? cpuCores = default(long?), Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus?), string detailedStatusMessage = null, long? diskSizeGB = default(long?), string image = null, string kubernetesVersion = null, System.Collections.Generic.IEnumerable labels = null, long? memorySizeGB = default(long?), Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode? mode = default(Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode?), string name = null, System.Collections.Generic.IEnumerable networkAttachments = null, Azure.ResourceManager.NetworkCloud.Models.KubernetesNodePowerState? powerState = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesNodePowerState?), Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole? role = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesNodeRole?), System.Collections.Generic.IEnumerable taints = null, string vmSkuName = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.LldpNeighbor LldpNeighbor(string portDescription = null, string portName = null, string systemDescription = null, string systemName = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.MachineDisk MachineDisk(long? capacityGB = default(long?), Azure.ResourceManager.NetworkCloud.Models.MachineSkuDiskConnectionType? connection = default(Azure.ResourceManager.NetworkCloud.Models.MachineSkuDiskConnectionType?), Azure.ResourceManager.NetworkCloud.Models.DiskType? diskType = default(Azure.ResourceManager.NetworkCloud.Models.DiskType?)) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.MachineSkuSlot MachineSkuSlot(long? rackSlot = default(long?), Azure.ResourceManager.NetworkCloud.Models.BootstrapProtocol? bootstrapProtocol = default(Azure.ResourceManager.NetworkCloud.Models.BootstrapProtocol?), long? cpuCores = default(long?), long? cpuSockets = default(long?), System.Collections.Generic.IEnumerable disks = null, string generation = null, string hardwareVersion = null, long? memoryCapacityGB = default(long?), string model = null, System.Collections.Generic.IEnumerable networkInterfaces = null, long? totalThreads = default(long?), string vendor = null) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.NetworkAttachment NetworkAttachment(Azure.Core.ResourceIdentifier attachedNetworkArmId = null, Azure.ResourceManager.NetworkCloud.Models.DefaultGateway? defaultGateway = default(Azure.ResourceManager.NetworkCloud.Models.DefaultGateway?), Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod ipAllocationMethod = default(Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod), string ipv4Address = null, string ipv6Address = null, string macAddress = null, string networkAttachmentName = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetworkCloud.Models.NetworkAttachment NetworkAttachment(string attachedNetworkId = null, Azure.ResourceManager.NetworkCloud.Models.DefaultGateway? defaultGateway = default(Azure.ResourceManager.NetworkCloud.Models.DefaultGateway?), Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod ipAllocationMethod = default(Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod), string ipv4Address = null, string ipv6Address = null, string macAddress = null, string networkAttachmentName = null) { throw null; } + public static Azure.ResourceManager.NetworkCloud.NetworkCloudAgentPoolData NetworkCloudAgentPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.AdministratorConfiguration administratorConfiguration = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentConfiguration agentOptions = null, Azure.ResourceManager.NetworkCloud.Models.AttachedNetworkConfiguration attachedNetworkConfiguration = null, System.Collections.Generic.IEnumerable availabilityZones = null, long count = (long)0, Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus?), string detailedStatusMessage = null, string kubernetesVersion = null, System.Collections.Generic.IEnumerable labels = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode mode = default(Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode), Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState?), System.Collections.Generic.IEnumerable taints = null, Azure.ResourceManager.NetworkCloud.Models.AgentPoolUpgradeSettings upgradeSettings = null, string vmSkuName = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetworkCloud.NetworkCloudAgentPoolData NetworkCloudAgentPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.AdministratorConfiguration administratorConfiguration = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentConfiguration agentOptions = null, Azure.ResourceManager.NetworkCloud.Models.AttachedNetworkConfiguration attachedNetworkConfiguration = null, System.Collections.Generic.IEnumerable availabilityZones = null, long count = (long)0, Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.AgentPoolDetailedStatus?), string detailedStatusMessage = null, string kubernetesVersion = null, System.Collections.Generic.IEnumerable labels = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode mode = default(Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode), Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.AgentPoolProvisioningState?), System.Collections.Generic.IEnumerable taints = null, string upgradeMaxSurge = null, string vmSkuName = null) { throw null; } - public static Azure.ResourceManager.NetworkCloud.NetworkCloudBareMetalMachineData NetworkCloudBareMetalMachineData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, System.Collections.Generic.IEnumerable associatedResourceIds = null, string bmcConnectionString = null, Azure.ResourceManager.NetworkCloud.Models.AdministrativeCredentials bmcCredentials = null, string bmcMacAddress = null, string bootMacAddress = null, Azure.Core.ResourceIdentifier clusterId = null, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineCordonStatus? cordonStatus = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineCordonStatus?), Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineDetailedStatus?), string detailedStatusMessage = null, Azure.ResourceManager.NetworkCloud.Models.HardwareInventory hardwareInventory = null, Azure.ResourceManager.NetworkCloud.Models.HardwareValidationStatus hardwareValidationStatus = null, System.Collections.Generic.IEnumerable hybridAksClustersAssociatedIds = null, string kubernetesNodeName = null, string kubernetesVersion = null, string machineDetails = null, string machineName = null, string machineSkuId = null, System.Net.IPAddress oamIPv4Address = null, string oamIPv6Address = null, string osImage = null, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachinePowerState? powerState = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachinePowerState?), Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineProvisioningState?), Azure.Core.ResourceIdentifier rackId = null, long rackSlot = (long)0, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineReadyState? readyState = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineReadyState?), string serialNumber = null, string serviceTag = null, System.Collections.Generic.IEnumerable virtualMachinesAssociatedIds = null) { throw null; } + public static Azure.ResourceManager.NetworkCloud.NetworkCloudBareMetalMachineData NetworkCloudBareMetalMachineData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, System.Collections.Generic.IEnumerable associatedResourceIds = null, string bmcConnectionString = null, Azure.ResourceManager.NetworkCloud.Models.AdministrativeCredentials bmcCredentials = null, string bmcMacAddress = null, string bootMacAddress = null, Azure.Core.ResourceIdentifier clusterId = null, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineCordonStatus? cordonStatus = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineCordonStatus?), Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineDetailedStatus?), string detailedStatusMessage = null, Azure.ResourceManager.NetworkCloud.Models.HardwareInventory hardwareInventory = null, Azure.ResourceManager.NetworkCloud.Models.HardwareValidationStatus hardwareValidationStatus = null, System.Collections.Generic.IEnumerable hybridAksClustersAssociatedIds = null, string kubernetesNodeName = null, string kubernetesVersion = null, string machineClusterVersion = null, string machineDetails = null, string machineName = null, System.Collections.Generic.IEnumerable machineRoles = null, string machineSkuId = null, System.Net.IPAddress oamIPv4Address = null, string oamIPv6Address = null, string osImage = null, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachinePowerState? powerState = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachinePowerState?), Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineProvisioningState?), Azure.Core.ResourceIdentifier rackId = null, long rackSlot = (long)0, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineReadyState? readyState = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineReadyState?), Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionStatus runtimeProtectionStatus = null, System.Collections.Generic.IEnumerable secretRotationStatus = null, string serialNumber = null, string serviceTag = null, System.Collections.Generic.IEnumerable virtualMachinesAssociatedIds = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetworkCloud.NetworkCloudBareMetalMachineData NetworkCloudBareMetalMachineData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation, System.Collections.Generic.IEnumerable associatedResourceIds, string bmcConnectionString, Azure.ResourceManager.NetworkCloud.Models.AdministrativeCredentials bmcCredentials, string bmcMacAddress, string bootMacAddress, Azure.Core.ResourceIdentifier clusterId, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineCordonStatus? cordonStatus, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineDetailedStatus? detailedStatus, string detailedStatusMessage, Azure.ResourceManager.NetworkCloud.Models.HardwareInventory hardwareInventory, Azure.ResourceManager.NetworkCloud.Models.HardwareValidationStatus hardwareValidationStatus, System.Collections.Generic.IEnumerable hybridAksClustersAssociatedIds, string kubernetesNodeName, string kubernetesVersion, string machineDetails, string machineName, string machineSkuId, System.Net.IPAddress oamIPv4Address, string oamIPv6Address, string osImage, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachinePowerState? powerState, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineProvisioningState? provisioningState, Azure.Core.ResourceIdentifier rackId, long rackSlot, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineReadyState? readyState, string serialNumber, string serviceTag, System.Collections.Generic.IEnumerable virtualMachinesAssociatedIds) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudBareMetalMachineKeySetData NetworkCloudBareMetalMachineKeySetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, string azureGroupId = null, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineKeySetDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineKeySetDetailedStatus?), string detailedStatusMessage = null, System.DateTimeOffset expireOn = default(System.DateTimeOffset), System.Collections.Generic.IEnumerable jumpHostsAllowed = null, System.DateTimeOffset? lastValidatedOn = default(System.DateTimeOffset?), string osGroupName = null, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineKeySetPrivilegeLevel privilegeLevel = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineKeySetPrivilegeLevel), Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineKeySetProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineKeySetProvisioningState?), System.Collections.Generic.IEnumerable userList = null, System.Collections.Generic.IEnumerable userListStatus = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudBmcKeySetData NetworkCloudBmcKeySetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, string azureGroupId = null, Azure.ResourceManager.NetworkCloud.Models.BmcKeySetDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.BmcKeySetDetailedStatus?), string detailedStatusMessage = null, System.DateTimeOffset expireOn = default(System.DateTimeOffset), System.DateTimeOffset? lastValidatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.NetworkCloud.Models.BmcKeySetPrivilegeLevel privilegeLevel = default(Azure.ResourceManager.NetworkCloud.Models.BmcKeySetPrivilegeLevel), Azure.ResourceManager.NetworkCloud.Models.BmcKeySetProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.BmcKeySetProvisioningState?), System.Collections.Generic.IEnumerable userList = null, System.Collections.Generic.IEnumerable userListStatus = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudCloudServicesNetworkData NetworkCloudCloudServicesNetworkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, System.Collections.Generic.IEnumerable additionalEgressEndpoints = null, System.Collections.Generic.IEnumerable associatedResourceIds = null, Azure.Core.ResourceIdentifier clusterId = null, Azure.ResourceManager.NetworkCloud.Models.CloudServicesNetworkDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.CloudServicesNetworkDetailedStatus?), string detailedStatusMessage = null, Azure.ResourceManager.NetworkCloud.Models.CloudServicesNetworkEnableDefaultEgressEndpoint? enableDefaultEgressEndpoints = default(Azure.ResourceManager.NetworkCloud.Models.CloudServicesNetworkEnableDefaultEgressEndpoint?), System.Collections.Generic.IEnumerable enabledEgressEndpoints = null, System.Collections.Generic.IEnumerable hybridAksClustersAssociatedIds = null, string interfaceName = null, Azure.ResourceManager.NetworkCloud.Models.CloudServicesNetworkProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.CloudServicesNetworkProvisioningState?), System.Collections.Generic.IEnumerable virtualMachinesAssociatedIds = null) { throw null; } - public static Azure.ResourceManager.NetworkCloud.NetworkCloudClusterData NetworkCloudClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudRackDefinition aggregatorOrSingleRackDefinition = null, Azure.Core.ResourceIdentifier analyticsWorkspaceId = null, System.Collections.Generic.IEnumerable availableUpgradeVersions = null, Azure.ResourceManager.NetworkCloud.Models.ClusterCapacity clusterCapacity = null, Azure.ResourceManager.NetworkCloud.Models.ClusterConnectionStatus? clusterConnectionStatus = default(Azure.ResourceManager.NetworkCloud.Models.ClusterConnectionStatus?), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation clusterExtendedLocation = null, string clusterLocation = null, Azure.ResourceManager.NetworkCloud.Models.ClusterManagerConnectionStatus? clusterManagerConnectionStatus = default(Azure.ResourceManager.NetworkCloud.Models.ClusterManagerConnectionStatus?), Azure.Core.ResourceIdentifier clusterManagerId = null, Azure.ResourceManager.NetworkCloud.Models.ServicePrincipalInformation clusterServicePrincipal = null, Azure.ResourceManager.NetworkCloud.Models.ClusterType clusterType = default(Azure.ResourceManager.NetworkCloud.Models.ClusterType), string clusterVersion = null, Azure.ResourceManager.NetworkCloud.Models.ValidationThreshold computeDeploymentThreshold = null, System.Collections.Generic.IEnumerable computeRackDefinitions = null, Azure.ResourceManager.NetworkCloud.Models.ClusterDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.ClusterDetailedStatus?), string detailedStatusMessage = null, Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation hybridAksExtendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, long? manualActionCount = default(long?), Azure.Core.ResourceIdentifier networkFabricId = null, Azure.ResourceManager.NetworkCloud.Models.ClusterProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.ClusterProvisioningState?), System.DateTimeOffset? supportExpireOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable workloadResourceIds = null) { throw null; } - public static Azure.ResourceManager.NetworkCloud.NetworkCloudClusterManagerData NetworkCloudClusterManagerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier analyticsWorkspaceId = null, System.Collections.Generic.IEnumerable availabilityZones = null, System.Collections.Generic.IEnumerable clusterVersions = null, Azure.ResourceManager.NetworkCloud.Models.ClusterManagerDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.ClusterManagerDetailedStatus?), string detailedStatusMessage = null, Azure.Core.ResourceIdentifier fabricControllerId = null, Azure.ResourceManager.NetworkCloud.Models.ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation managerExtendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.ClusterManagerProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.ClusterManagerProvisioningState?), string vmSize = null) { throw null; } + public static Azure.ResourceManager.NetworkCloud.NetworkCloudClusterData NetworkCloudClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudRackDefinition aggregatorOrSingleRackDefinition = null, Azure.Core.ResourceIdentifier analyticsWorkspaceId = null, System.Collections.Generic.IEnumerable availableUpgradeVersions = null, Azure.ResourceManager.NetworkCloud.Models.ClusterCapacity clusterCapacity = null, Azure.ResourceManager.NetworkCloud.Models.ClusterConnectionStatus? clusterConnectionStatus = default(Azure.ResourceManager.NetworkCloud.Models.ClusterConnectionStatus?), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation clusterExtendedLocation = null, string clusterLocation = null, Azure.ResourceManager.NetworkCloud.Models.ClusterManagerConnectionStatus? clusterManagerConnectionStatus = default(Azure.ResourceManager.NetworkCloud.Models.ClusterManagerConnectionStatus?), Azure.Core.ResourceIdentifier clusterManagerId = null, Azure.ResourceManager.NetworkCloud.Models.ServicePrincipalInformation clusterServicePrincipal = null, Azure.ResourceManager.NetworkCloud.Models.ClusterType clusterType = default(Azure.ResourceManager.NetworkCloud.Models.ClusterType), string clusterVersion = null, Azure.ResourceManager.NetworkCloud.Models.CommandOutputSettings commandOutputSettings = null, Azure.ResourceManager.NetworkCloud.Models.ValidationThreshold computeDeploymentThreshold = null, System.Collections.Generic.IEnumerable computeRackDefinitions = null, Azure.ResourceManager.NetworkCloud.Models.ClusterDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.ClusterDetailedStatus?), string detailedStatusMessage = null, Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation hybridAksExtendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, long? manualActionCount = default(long?), Azure.Core.ResourceIdentifier networkFabricId = null, Azure.ResourceManager.NetworkCloud.Models.ClusterProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.ClusterProvisioningState?), Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel? runtimeProtectionEnforcementLevel = default(Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel?), Azure.ResourceManager.NetworkCloud.Models.ClusterSecretArchive secretArchive = null, System.DateTimeOffset? supportExpireOn = default(System.DateTimeOffset?), Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategy updateStrategy = null, System.Collections.Generic.IEnumerable workloadResourceIds = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetworkCloud.NetworkCloudClusterData NetworkCloudClusterData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudRackDefinition aggregatorOrSingleRackDefinition, Azure.Core.ResourceIdentifier analyticsWorkspaceId, System.Collections.Generic.IEnumerable availableUpgradeVersions, Azure.ResourceManager.NetworkCloud.Models.ClusterCapacity clusterCapacity, Azure.ResourceManager.NetworkCloud.Models.ClusterConnectionStatus? clusterConnectionStatus, Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation clusterExtendedLocation, string clusterLocation, Azure.ResourceManager.NetworkCloud.Models.ClusterManagerConnectionStatus? clusterManagerConnectionStatus, Azure.Core.ResourceIdentifier clusterManagerId, Azure.ResourceManager.NetworkCloud.Models.ServicePrincipalInformation clusterServicePrincipal, Azure.ResourceManager.NetworkCloud.Models.ClusterType clusterType, string clusterVersion, Azure.ResourceManager.NetworkCloud.Models.ValidationThreshold computeDeploymentThreshold, System.Collections.Generic.IEnumerable computeRackDefinitions, Azure.ResourceManager.NetworkCloud.Models.ClusterDetailedStatus? detailedStatus, string detailedStatusMessage, Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation hybridAksExtendedLocation, Azure.ResourceManager.NetworkCloud.Models.ManagedResourceGroupConfiguration managedResourceGroupConfiguration, long? manualActionCount, Azure.Core.ResourceIdentifier networkFabricId, Azure.ResourceManager.NetworkCloud.Models.ClusterProvisioningState? provisioningState, System.DateTimeOffset? supportExpireOn, System.Collections.Generic.IEnumerable workloadResourceIds) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetworkCloud.NetworkCloudClusterManagerData NetworkCloudClusterManagerData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.Core.ResourceIdentifier analyticsWorkspaceId, System.Collections.Generic.IEnumerable availabilityZones, System.Collections.Generic.IEnumerable clusterVersions, Azure.ResourceManager.NetworkCloud.Models.ClusterManagerDetailedStatus? detailedStatus, string detailedStatusMessage, Azure.Core.ResourceIdentifier fabricControllerId, Azure.ResourceManager.NetworkCloud.Models.ManagedResourceGroupConfiguration managedResourceGroupConfiguration, Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation managerExtendedLocation, Azure.ResourceManager.NetworkCloud.Models.ClusterManagerProvisioningState? provisioningState, string vmSize) { throw null; } + public static Azure.ResourceManager.NetworkCloud.NetworkCloudClusterManagerData NetworkCloudClusterManagerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier analyticsWorkspaceId = null, System.Collections.Generic.IEnumerable availabilityZones = null, System.Collections.Generic.IEnumerable clusterVersions = null, Azure.ResourceManager.NetworkCloud.Models.ClusterManagerDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.ClusterManagerDetailedStatus?), string detailedStatusMessage = null, Azure.Core.ResourceIdentifier fabricControllerId = null, Azure.ResourceManager.NetworkCloud.Models.ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation managerExtendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.ClusterManagerProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.ClusterManagerProvisioningState?), string vmSize = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudClusterMetricsConfigurationData NetworkCloudClusterMetricsConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, long collectionInterval = (long)0, Azure.ResourceManager.NetworkCloud.Models.ClusterMetricsConfigurationDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.ClusterMetricsConfigurationDetailedStatus?), string detailedStatusMessage = null, System.Collections.Generic.IEnumerable disabledMetrics = null, System.Collections.Generic.IEnumerable enabledMetrics = null, Azure.ResourceManager.NetworkCloud.Models.ClusterMetricsConfigurationProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.ClusterMetricsConfigurationProvisioningState?)) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterData NetworkCloudKubernetesClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, System.Collections.Generic.IEnumerable aadAdminGroupObjectIds = null, Azure.ResourceManager.NetworkCloud.Models.AdministratorConfiguration administratorConfiguration = null, System.Collections.Generic.IEnumerable attachedNetworkIds = null, System.Collections.Generic.IEnumerable availableUpgrades = null, Azure.Core.ResourceIdentifier clusterId = null, Azure.Core.ResourceIdentifier connectedClusterId = null, string controlPlaneKubernetesVersion = null, Azure.ResourceManager.NetworkCloud.Models.ControlPlaneNodeConfiguration controlPlaneNodeConfiguration = null, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterDetailedStatus?), string detailedStatusMessage = null, System.Collections.Generic.IEnumerable featureStatuses = null, System.Collections.Generic.IEnumerable initialAgentPoolConfigurations = null, string kubernetesVersion = null, Azure.ResourceManager.NetworkCloud.Models.ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNetworkConfiguration networkConfiguration = null, System.Collections.Generic.IEnumerable nodes = null, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterProvisioningState?)) { throw null; } + public static Azure.ResourceManager.NetworkCloud.NetworkCloudKubernetesClusterFeatureData NetworkCloudKubernetesClusterFeatureData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureAvailabilityLifecycle? availabilityLifecycle = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureAvailabilityLifecycle?), Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureDetailedStatus?), string detailedStatusMessage = null, System.Collections.Generic.IEnumerable options = null, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState?), Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureRequired? required = default(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureRequired?), string version = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudL2NetworkData NetworkCloudL2NetworkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, System.Collections.Generic.IEnumerable associatedResourceIds = null, Azure.Core.ResourceIdentifier clusterId = null, Azure.ResourceManager.NetworkCloud.Models.L2NetworkDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.L2NetworkDetailedStatus?), string detailedStatusMessage = null, System.Collections.Generic.IEnumerable hybridAksClustersAssociatedIds = null, Azure.ResourceManager.NetworkCloud.Models.HybridAksPluginType? hybridAksPluginType = default(Azure.ResourceManager.NetworkCloud.Models.HybridAksPluginType?), string interfaceName = null, Azure.Core.ResourceIdentifier l2IsolationDomainId = null, Azure.ResourceManager.NetworkCloud.Models.L2NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.L2NetworkProvisioningState?), System.Collections.Generic.IEnumerable virtualMachinesAssociatedIds = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudL3NetworkData NetworkCloudL3NetworkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, System.Collections.Generic.IEnumerable associatedResourceIds = null, Azure.Core.ResourceIdentifier clusterId = null, Azure.ResourceManager.NetworkCloud.Models.L3NetworkDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.L3NetworkDetailedStatus?), string detailedStatusMessage = null, System.Collections.Generic.IEnumerable hybridAksClustersAssociatedIds = null, Azure.ResourceManager.NetworkCloud.Models.HybridAksIpamEnabled? hybridAksIpamEnabled = default(Azure.ResourceManager.NetworkCloud.Models.HybridAksIpamEnabled?), Azure.ResourceManager.NetworkCloud.Models.HybridAksPluginType? hybridAksPluginType = default(Azure.ResourceManager.NetworkCloud.Models.HybridAksPluginType?), string interfaceName = null, Azure.ResourceManager.NetworkCloud.Models.IPAllocationType? ipAllocationType = default(Azure.ResourceManager.NetworkCloud.Models.IPAllocationType?), string ipv4ConnectedPrefix = null, string ipv6ConnectedPrefix = null, Azure.Core.ResourceIdentifier l3IsolationDomainId = null, Azure.ResourceManager.NetworkCloud.Models.L3NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.L3NetworkProvisioningState?), System.Collections.Generic.IEnumerable virtualMachinesAssociatedIds = null, long vlan = (long)0) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.NetworkCloudNetworkInterface NetworkCloudNetworkInterface(string address = null, Azure.ResourceManager.NetworkCloud.Models.DeviceConnectionType? deviceConnectionType = default(Azure.ResourceManager.NetworkCloud.Models.DeviceConnectionType?), string model = null, long? physicalSlot = default(long?), long? portCount = default(long?), long? portSpeed = default(long?), string vendor = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.NetworkCloudNic NetworkCloudNic(Azure.ResourceManager.NetworkCloud.Models.LldpNeighbor lldpNeighbor = null, string macAddress = null, string name = null) { throw null; } - public static Azure.ResourceManager.NetworkCloud.Models.NetworkCloudOperationStatusResult NetworkCloudOperationStatusResult(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = default(float?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operations = null, Azure.ResponseError error = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetworkCloud.Models.NetworkCloudOperationStatusResult NetworkCloudOperationStatusResult(Azure.Core.ResourceIdentifier id, Azure.Core.ResourceIdentifier resourceId, string name, string status, float? percentComplete, System.DateTimeOffset? startOn, System.DateTimeOffset? endOn, System.Collections.Generic.IEnumerable operations, Azure.ResponseError error) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.NetworkCloudOperationStatusResult NetworkCloudOperationStatusResult(System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResponseError error = null, Azure.Core.ResourceIdentifier id = null, string name = null, System.Collections.Generic.IEnumerable operations = null, float? percentComplete = default(float?), Azure.Core.ResourceIdentifier resourceId = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), string status = null, string exitCode = null, string outputHead = null, System.Uri resultRef = null, System.Uri resultUri = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudRackData NetworkCloudRackData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, string availabilityZone = null, Azure.Core.ResourceIdentifier clusterId = null, Azure.ResourceManager.NetworkCloud.Models.RackDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.RackDetailedStatus?), string detailedStatusMessage = null, Azure.ResourceManager.NetworkCloud.Models.RackProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.RackProvisioningState?), string rackLocation = null, string rackSerialNumber = null, Azure.Core.ResourceIdentifier rackSkuId = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudRackSkuData NetworkCloudRackSkuData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable computeMachines = null, System.Collections.Generic.IEnumerable controllerMachines = null, string description = null, long? maxClusterSlots = default(long?), Azure.ResourceManager.NetworkCloud.Models.RackSkuProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.RackSkuProvisioningState?), Azure.ResourceManager.NetworkCloud.Models.RackSkuType? rackType = default(Azure.ResourceManager.NetworkCloud.Models.RackSkuType?), System.Collections.Generic.IEnumerable storageAppliances = null, System.Collections.Generic.IEnumerable supportedRackSkuIds = null) { throw null; } - public static Azure.ResourceManager.NetworkCloud.NetworkCloudStorageApplianceData NetworkCloudStorageApplianceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.AdministrativeCredentials administratorCredentials = null, long? capacity = default(long?), long? capacityUsed = default(long?), Azure.Core.ResourceIdentifier clusterId = null, Azure.ResourceManager.NetworkCloud.Models.StorageApplianceDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.StorageApplianceDetailedStatus?), string detailedStatusMessage = null, System.Net.IPAddress managementIPv4Address = null, Azure.ResourceManager.NetworkCloud.Models.StorageApplianceProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.StorageApplianceProvisioningState?), Azure.Core.ResourceIdentifier rackId = null, long rackSlot = (long)0, Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementFeature? remoteVendorManagementFeature = default(Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementFeature?), Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementStatus? remoteVendorManagementStatus = default(Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementStatus?), string serialNumber = null, string storageApplianceSkuId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetworkCloud.NetworkCloudStorageApplianceData NetworkCloudStorageApplianceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation, Azure.ResourceManager.NetworkCloud.Models.AdministrativeCredentials administratorCredentials, long? capacity, long? capacityUsed, Azure.Core.ResourceIdentifier clusterId, Azure.ResourceManager.NetworkCloud.Models.StorageApplianceDetailedStatus? detailedStatus, string detailedStatusMessage, System.Net.IPAddress managementIPv4Address, Azure.ResourceManager.NetworkCloud.Models.StorageApplianceProvisioningState? provisioningState, Azure.Core.ResourceIdentifier rackId, long rackSlot, Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementFeature? remoteVendorManagementFeature, Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementStatus? remoteVendorManagementStatus, string serialNumber, string storageApplianceSkuId) { throw null; } + public static Azure.ResourceManager.NetworkCloud.NetworkCloudStorageApplianceData NetworkCloudStorageApplianceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.AdministrativeCredentials administratorCredentials = null, long? capacity = default(long?), long? capacityUsed = default(long?), Azure.Core.ResourceIdentifier clusterId = null, Azure.ResourceManager.NetworkCloud.Models.StorageApplianceDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.StorageApplianceDetailedStatus?), string detailedStatusMessage = null, System.Net.IPAddress managementIPv4Address = null, string manufacturer = null, string model = null, Azure.ResourceManager.NetworkCloud.Models.StorageApplianceProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.StorageApplianceProvisioningState?), Azure.Core.ResourceIdentifier rackId = null, long rackSlot = (long)0, Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementFeature? remoteVendorManagementFeature = default(Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementFeature?), Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementStatus? remoteVendorManagementStatus = default(Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementStatus?), System.Collections.Generic.IEnumerable secretRotationStatus = null, string serialNumber = null, string storageApplianceSkuId = null, string version = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudTrunkedNetworkData NetworkCloudTrunkedNetworkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, System.Collections.Generic.IEnumerable associatedResourceIds = null, Azure.Core.ResourceIdentifier clusterId = null, Azure.ResourceManager.NetworkCloud.Models.TrunkedNetworkDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.TrunkedNetworkDetailedStatus?), string detailedStatusMessage = null, System.Collections.Generic.IEnumerable hybridAksClustersAssociatedIds = null, Azure.ResourceManager.NetworkCloud.Models.HybridAksPluginType? hybridAksPluginType = default(Azure.ResourceManager.NetworkCloud.Models.HybridAksPluginType?), string interfaceName = null, System.Collections.Generic.IEnumerable isolationDomainIds = null, Azure.ResourceManager.NetworkCloud.Models.TrunkedNetworkProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.TrunkedNetworkProvisioningState?), System.Collections.Generic.IEnumerable virtualMachinesAssociatedIds = null, System.Collections.Generic.IEnumerable vlans = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudVirtualMachineConsoleData NetworkCloudVirtualMachineConsoleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.ConsoleDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.ConsoleDetailedStatus?), string detailedStatusMessage = null, Azure.ResourceManager.NetworkCloud.Models.ConsoleEnabled enabled = default(Azure.ResourceManager.NetworkCloud.Models.ConsoleEnabled), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier privateLinkServiceId = null, Azure.ResourceManager.NetworkCloud.Models.ConsoleProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.ConsoleProvisioningState?), string keyData = null, System.Guid? virtualMachineAccessId = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudVirtualMachineData NetworkCloudVirtualMachineData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, string adminUsername = null, string availabilityZone = null, Azure.Core.ResourceIdentifier bareMetalMachineId = null, Azure.ResourceManager.NetworkCloud.Models.VirtualMachineBootMethod? bootMethod = default(Azure.ResourceManager.NetworkCloud.Models.VirtualMachineBootMethod?), Azure.ResourceManager.NetworkCloud.Models.NetworkAttachment cloudServicesNetworkAttachment = null, Azure.Core.ResourceIdentifier clusterId = null, long cpuCores = (long)0, Azure.ResourceManager.NetworkCloud.Models.VirtualMachineDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.VirtualMachineDetailedStatus?), string detailedStatusMessage = null, Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIsolateEmulatorThread? isolateEmulatorThread = default(Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIsolateEmulatorThread?), long memorySizeInGB = (long)0, System.Collections.Generic.IEnumerable networkAttachments = null, string networkData = null, System.Collections.Generic.IEnumerable placementHints = null, Azure.ResourceManager.NetworkCloud.Models.VirtualMachinePowerState? powerState = default(Azure.ResourceManager.NetworkCloud.Models.VirtualMachinePowerState?), Azure.ResourceManager.NetworkCloud.Models.VirtualMachineProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.VirtualMachineProvisioningState?), System.Collections.Generic.IEnumerable sshPublicKeys = null, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudStorageProfile storageProfile = null, string userData = null, Azure.ResourceManager.NetworkCloud.Models.VirtualMachineVirtioInterfaceType? virtioInterface = default(Azure.ResourceManager.NetworkCloud.Models.VirtualMachineVirtioInterfaceType?), Azure.ResourceManager.NetworkCloud.Models.VirtualMachineDeviceModelType? vmDeviceModel = default(Azure.ResourceManager.NetworkCloud.Models.VirtualMachineDeviceModelType?), string vmImage = null, Azure.ResourceManager.NetworkCloud.Models.ImageRepositoryCredentials vmImageRepositoryCredentials = null, System.Collections.Generic.IEnumerable volumes = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudVolumeData NetworkCloudVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, System.Collections.Generic.IEnumerable attachedTo = null, Azure.ResourceManager.NetworkCloud.Models.VolumeDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.VolumeDetailedStatus?), string detailedStatusMessage = null, Azure.ResourceManager.NetworkCloud.Models.VolumeProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.VolumeProvisioningState?), string serialNumber = null, long sizeInMiB = (long)0) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionStatus RuntimeProtectionStatus(System.DateTimeOffset? definitionsLastUpdated = default(System.DateTimeOffset?), string definitionsVersion = null, System.DateTimeOffset? scanCompletedOn = default(System.DateTimeOffset?), System.DateTimeOffset? scanScheduledOn = default(System.DateTimeOffset?), System.DateTimeOffset? scanStartedOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.SecretArchiveReference SecretArchiveReference(Azure.Core.ResourceIdentifier keyVaultId = null, string secretName = null, string secretVersion = null) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.SecretRotationStatus SecretRotationStatus(long? expirePeriodDays = default(long?), System.DateTimeOffset? lastRotationOn = default(System.DateTimeOffset?), long? rotationPeriodDays = default(long?), Azure.ResourceManager.NetworkCloud.Models.SecretArchiveReference secretArchiveReference = null, string secretType = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.StorageApplianceSkuSlot StorageApplianceSkuSlot(long? rackSlot = default(long?), long? capacityGB = default(long?), string model = null) { throw null; } } public partial class AttachedNetworkConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -2149,6 +2320,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public ClusterConnectionStatus(string value) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.ClusterConnectionStatus Connected { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.ClusterConnectionStatus Disconnected { get { throw null; } } public static Azure.ResourceManager.NetworkCloud.Models.ClusterConnectionStatus Timeout { get { throw null; } } public static Azure.ResourceManager.NetworkCloud.Models.ClusterConnectionStatus Undefined { get { throw null; } } public bool Equals(Azure.ResourceManager.NetworkCloud.Models.ClusterConnectionStatus other) { throw null; } @@ -2161,6 +2333,34 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.ClusterConnectionStatus left, Azure.ResourceManager.NetworkCloud.Models.ClusterConnectionStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class ClusterContinueUpdateVersionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ClusterContinueUpdateVersionContent() { } + public Azure.ResourceManager.NetworkCloud.Models.ClusterContinueUpdateVersionMachineGroupTargetingMode? MachineGroupTargetingMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.ClusterContinueUpdateVersionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.ClusterContinueUpdateVersionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ClusterContinueUpdateVersionMachineGroupTargetingMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ClusterContinueUpdateVersionMachineGroupTargetingMode(string value) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.ClusterContinueUpdateVersionMachineGroupTargetingMode AlphaByRack { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetworkCloud.Models.ClusterContinueUpdateVersionMachineGroupTargetingMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetworkCloud.Models.ClusterContinueUpdateVersionMachineGroupTargetingMode left, Azure.ResourceManager.NetworkCloud.Models.ClusterContinueUpdateVersionMachineGroupTargetingMode right) { throw null; } + public static implicit operator Azure.ResourceManager.NetworkCloud.Models.ClusterContinueUpdateVersionMachineGroupTargetingMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.ClusterContinueUpdateVersionMachineGroupTargetingMode left, Azure.ResourceManager.NetworkCloud.Models.ClusterContinueUpdateVersionMachineGroupTargetingMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class ClusterDeployContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterDeployContent() { } @@ -2185,6 +2385,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.ResourceManager.NetworkCloud.Models.ClusterDetailedStatus Failed { get { throw null; } } public static Azure.ResourceManager.NetworkCloud.Models.ClusterDetailedStatus PendingDeployment { get { throw null; } } public static Azure.ResourceManager.NetworkCloud.Models.ClusterDetailedStatus Running { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.ClusterDetailedStatus UpdatePaused { get { throw null; } } public static Azure.ResourceManager.NetworkCloud.Models.ClusterDetailedStatus Updating { get { throw null; } } public bool Equals(Azure.ResourceManager.NetworkCloud.Models.ClusterDetailedStatus other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -2320,6 +2521,65 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.ClusterProvisioningState left, Azure.ResourceManager.NetworkCloud.Models.ClusterProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class ClusterScanRuntimeContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ClusterScanRuntimeContent() { } + public Azure.ResourceManager.NetworkCloud.Models.ClusterScanRuntimeParametersScanActivity? ScanActivity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.ClusterScanRuntimeContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.ClusterScanRuntimeContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ClusterScanRuntimeParametersScanActivity : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ClusterScanRuntimeParametersScanActivity(string value) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.ClusterScanRuntimeParametersScanActivity Scan { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.ClusterScanRuntimeParametersScanActivity Skip { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetworkCloud.Models.ClusterScanRuntimeParametersScanActivity other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetworkCloud.Models.ClusterScanRuntimeParametersScanActivity left, Azure.ResourceManager.NetworkCloud.Models.ClusterScanRuntimeParametersScanActivity right) { throw null; } + public static implicit operator Azure.ResourceManager.NetworkCloud.Models.ClusterScanRuntimeParametersScanActivity (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.ClusterScanRuntimeParametersScanActivity left, Azure.ResourceManager.NetworkCloud.Models.ClusterScanRuntimeParametersScanActivity right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ClusterSecretArchive : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ClusterSecretArchive(Azure.Core.ResourceIdentifier keyVaultId) { } + public Azure.Core.ResourceIdentifier KeyVaultId { get { throw null; } set { } } + public Azure.ResourceManager.NetworkCloud.Models.ClusterSecretArchiveEnabled? UseKeyVault { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.ClusterSecretArchive System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.ClusterSecretArchive System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ClusterSecretArchiveEnabled : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ClusterSecretArchiveEnabled(string value) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.ClusterSecretArchiveEnabled False { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.ClusterSecretArchiveEnabled True { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetworkCloud.Models.ClusterSecretArchiveEnabled other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetworkCloud.Models.ClusterSecretArchiveEnabled left, Azure.ResourceManager.NetworkCloud.Models.ClusterSecretArchiveEnabled right) { throw null; } + public static implicit operator Azure.ResourceManager.NetworkCloud.Models.ClusterSecretArchiveEnabled (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.ClusterSecretArchiveEnabled left, Azure.ResourceManager.NetworkCloud.Models.ClusterSecretArchiveEnabled right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ClusterType : System.IEquatable { @@ -2338,6 +2598,39 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.ClusterType left, Azure.ResourceManager.NetworkCloud.Models.ClusterType right) { throw null; } public override string ToString() { throw null; } } + public partial class ClusterUpdateStrategy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ClusterUpdateStrategy(Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategyType strategyType, Azure.ResourceManager.NetworkCloud.Models.ValidationThresholdType thresholdType, long thresholdValue) { } + public long? MaxUnavailable { get { throw null; } set { } } + public Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategyType StrategyType { get { throw null; } set { } } + public Azure.ResourceManager.NetworkCloud.Models.ValidationThresholdType ThresholdType { get { throw null; } set { } } + public long ThresholdValue { get { throw null; } set { } } + public long? WaitTimeMinutes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ClusterUpdateStrategyType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ClusterUpdateStrategyType(string value) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategyType PauseAfterRack { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategyType Rack { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategyType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategyType left, Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategyType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategyType left, Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategyType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ClusterUpdateVersionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterUpdateVersionContent(string targetClusterVersion) { } @@ -2349,6 +2642,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class CommandOutputSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CommandOutputSettings() { } + public Azure.ResourceManager.NetworkCloud.Models.IdentitySelector AssociatedIdentity { get { throw null; } set { } } + public System.Uri ContainerUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.CommandOutputSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.CommandOutputSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ConsoleDetailedStatus : System.IEquatable { @@ -2438,6 +2743,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ControlPlaneNodePatchConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ControlPlaneNodePatchConfiguration() { } + public System.Collections.Generic.IList AdministratorSshPublicKeys { get { throw null; } } + public long? Count { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.ControlPlaneNodePatchConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.ControlPlaneNodePatchConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DefaultGateway : System.IEquatable { @@ -2672,6 +2989,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.HybridAksPluginType left, Azure.ResourceManager.NetworkCloud.Models.HybridAksPluginType right) { throw null; } public override string ToString() { throw null; } } + public partial class IdentitySelector : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public IdentitySelector() { } + public Azure.ResourceManager.NetworkCloud.Models.ManagedServiceIdentitySelectorType? IdentityType { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier UserAssignedIdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.IdentitySelector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.IdentitySelector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ImageRepositoryCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ImageRepositoryCredentials(string registryUriString, string username) { } @@ -2697,7 +3026,9 @@ public InitialAgentPoolConfiguration(long count, Azure.ResourceManager.NetworkCl public Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolMode Mode { get { throw null; } set { } } public string Name { get { throw null; } set { } } public System.Collections.Generic.IList Taints { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string UpgradeMaxSurge { get { throw null; } set { } } + public Azure.ResourceManager.NetworkCloud.Models.AgentPoolUpgradeSettings UpgradeSettings { get { throw null; } set { } } public string VmSkuName { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.InitialAgentPoolConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2745,6 +3076,7 @@ public KeySetUser(string azureUserName, Azure.ResourceManager.NetworkCloud.Model public string AzureUserName { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string KeyData { get { throw null; } set { } } + public string UserPrincipalName { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.KeySetUser System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2784,6 +3116,83 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterDetailedStatus left, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterDetailedStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KubernetesClusterFeatureAvailabilityLifecycle : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KubernetesClusterFeatureAvailabilityLifecycle(string value) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureAvailabilityLifecycle GenerallyAvailable { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureAvailabilityLifecycle Preview { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureAvailabilityLifecycle other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureAvailabilityLifecycle left, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureAvailabilityLifecycle right) { throw null; } + public static implicit operator Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureAvailabilityLifecycle (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureAvailabilityLifecycle left, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureAvailabilityLifecycle right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KubernetesClusterFeatureDetailedStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KubernetesClusterFeatureDetailedStatus(string value) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureDetailedStatus Error { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureDetailedStatus Installed { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureDetailedStatus Provisioning { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureDetailedStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureDetailedStatus left, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureDetailedStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureDetailedStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureDetailedStatus left, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureDetailedStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KubernetesClusterFeatureProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KubernetesClusterFeatureProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState left, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState left, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KubernetesClusterFeatureRequired : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KubernetesClusterFeatureRequired(string value) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureRequired False { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureRequired True { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureRequired other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureRequired left, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureRequired right) { throw null; } + public static implicit operator Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureRequired (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureRequired left, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterFeatureRequired right) { throw null; } + public override string ToString() { throw null; } + } public partial class KubernetesClusterNetworkConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public KubernetesClusterNetworkConfiguration(Azure.Core.ResourceIdentifier cloudServicesNetworkId, Azure.Core.ResourceIdentifier cniNetworkId) { } @@ -2792,6 +3201,7 @@ public KubernetesClusterNetworkConfiguration(Azure.Core.ResourceIdentifier cloud public Azure.Core.ResourceIdentifier CloudServicesNetworkId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier CniNetworkId { get { throw null; } set { } } public System.Net.IPAddress DnsServiceIP { get { throw null; } set { } } + public System.Collections.Generic.IList L2ServiceLoadBalancerIPAddressPools { get { throw null; } } public System.Collections.Generic.IList PodCidrs { get { throw null; } } public System.Collections.Generic.IList ServiceCidrs { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2804,8 +3214,12 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class KubernetesClusterNode : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal KubernetesClusterNode() { } + public Azure.Core.ResourceIdentifier AgentPoolArmId { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string AgentPoolId { get { throw null; } } public string AvailabilityZone { get { throw null; } } + public Azure.Core.ResourceIdentifier BareMetalMachineArmId { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string BareMetalMachineId { get { throw null; } } public long? CpuCores { get { throw null; } } public Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterNodeDetailedStatus? DetailedStatus { get { throw null; } } @@ -3162,9 +3576,30 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ManagedServiceIdentitySelectorType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ManagedServiceIdentitySelectorType(string value) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.ManagedServiceIdentitySelectorType SystemAssignedIdentity { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.ManagedServiceIdentitySelectorType UserAssignedIdentity { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetworkCloud.Models.ManagedServiceIdentitySelectorType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetworkCloud.Models.ManagedServiceIdentitySelectorType left, Azure.ResourceManager.NetworkCloud.Models.ManagedServiceIdentitySelectorType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetworkCloud.Models.ManagedServiceIdentitySelectorType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.ManagedServiceIdentitySelectorType left, Azure.ResourceManager.NetworkCloud.Models.ManagedServiceIdentitySelectorType right) { throw null; } + public override string ToString() { throw null; } + } public partial class NetworkAttachment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public NetworkAttachment(Azure.Core.ResourceIdentifier attachedNetworkArmId, Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod ipAllocationMethod) { } public NetworkAttachment(string attachedNetworkId, Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod ipAllocationMethod) { } + public Azure.Core.ResourceIdentifier AttachedNetworkArmId { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string AttachedNetworkId { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.DefaultGateway? DefaultGateway { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod IPAllocationMethod { get { throw null; } set { } } @@ -3213,9 +3648,12 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class NetworkCloudAgentPoolPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NetworkCloudAgentPoolPatch() { } + public System.Collections.Generic.IList AdministratorSshPublicKeys { get { throw null; } } public long? Count { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string UpgradeMaxSurge { get { throw null; } set { } } + public Azure.ResourceManager.NetworkCloud.Models.AgentPoolUpgradeSettings UpgradeSettings { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudAgentPoolPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3278,6 +3716,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class NetworkCloudClusterManagerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NetworkCloudClusterManagerPatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudClusterManagerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3305,9 +3744,14 @@ public NetworkCloudClusterPatch() { } public Azure.ResourceManager.NetworkCloud.Models.NetworkCloudRackDefinition AggregatorOrSingleRackDefinition { get { throw null; } set { } } public string ClusterLocation { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.ServicePrincipalInformation ClusterServicePrincipal { get { throw null; } set { } } + public Azure.ResourceManager.NetworkCloud.Models.CommandOutputSettings CommandOutputSettings { get { throw null; } set { } } public Azure.ResourceManager.NetworkCloud.Models.ValidationThreshold ComputeDeploymentThreshold { get { throw null; } set { } } public System.Collections.Generic.IList ComputeRackDefinitions { get { throw null; } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel? RuntimeProtectionEnforcementLevel { get { throw null; } set { } } + public Azure.ResourceManager.NetworkCloud.Models.ClusterSecretArchive SecretArchive { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateStrategy UpdateStrategy { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetworkCloud.Models.NetworkCloudClusterPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3315,9 +3759,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NetworkCloudKubernetesClusterFeaturePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkCloudKubernetesClusterFeaturePatch() { } + public System.Collections.Generic.IList Options { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.NetworkCloudKubernetesClusterFeaturePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.NetworkCloudKubernetesClusterFeaturePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NetworkCloudKubernetesClusterPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NetworkCloudKubernetesClusterPatch() { } + public System.Collections.Generic.IList AdministratorSshPublicKeys { get { throw null; } } + public Azure.ResourceManager.NetworkCloud.Models.ControlPlaneNodePatchConfiguration ControlPlaneNodeConfiguration { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public long? ControlPlaneNodeCount { get { throw null; } set { } } public string KubernetesVersion { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } @@ -3385,11 +3844,15 @@ public partial class NetworkCloudOperationStatusResult : System.ClientModel.Prim internal NetworkCloudOperationStatusResult() { } public System.DateTimeOffset? EndOn { get { throw null; } } public Azure.ResponseError Error { get { throw null; } } + public string ExitCode { get { throw null; } } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public string Name { get { throw null; } } public System.Collections.Generic.IReadOnlyList Operations { get { throw null; } } + public string OutputHead { get { throw null; } } public float? PercentComplete { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + public System.Uri ResultRef { get { throw null; } } + public System.Uri ResultUri { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public string Status { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3605,6 +4068,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public RackSkuProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.RackSkuProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.RackSkuProvisioningState Failed { get { throw null; } } public static Azure.ResourceManager.NetworkCloud.Models.RackSkuProvisioningState Succeeded { get { throw null; } } public bool Equals(Azure.ResourceManager.NetworkCloud.Models.RackSkuProvisioningState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -3672,6 +4137,70 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementStatus left, Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RuntimeProtectionEnforcementLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RuntimeProtectionEnforcementLevel(string value) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel Audit { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel Disabled { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel OnDemand { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel Passive { get { throw null; } } + public static Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel RealTime { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel left, Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel right) { throw null; } + public static implicit operator Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel left, Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionEnforcementLevel right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RuntimeProtectionStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RuntimeProtectionStatus() { } + public System.DateTimeOffset? DefinitionsLastUpdated { get { throw null; } } + public string DefinitionsVersion { get { throw null; } } + public System.DateTimeOffset? ScanCompletedOn { get { throw null; } } + public System.DateTimeOffset? ScanScheduledOn { get { throw null; } } + public System.DateTimeOffset? ScanStartedOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.RuntimeProtectionStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretArchiveReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SecretArchiveReference() { } + public Azure.Core.ResourceIdentifier KeyVaultId { get { throw null; } } + public string SecretName { get { throw null; } } + public string SecretVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.SecretArchiveReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.SecretArchiveReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretRotationStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SecretRotationStatus() { } + public long? ExpirePeriodDays { get { throw null; } } + public System.DateTimeOffset? LastRotationOn { get { throw null; } } + public long? RotationPeriodDays { get { throw null; } } + public Azure.ResourceManager.NetworkCloud.Models.SecretArchiveReference SecretArchiveReference { get { throw null; } } + public string SecretType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.SecretRotationStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.SecretRotationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ServiceLoadBalancerBgpPeer : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ServiceLoadBalancerBgpPeer(string name, string peerAddress, long peerAsn) { } @@ -3802,6 +4331,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class StringKeyValuePair : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StringKeyValuePair(string key, string value) { } + public string Key { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.StringKeyValuePair System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetworkCloud.Models.StringKeyValuePair System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class TrunkedNetworkAttachmentConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public TrunkedNetworkAttachmentConfiguration(Azure.Core.ResourceIdentifier networkId) { } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/assets.json b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/assets.json index e700abb41164e..a5017230011a9 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/assets.json +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/networkcloud/Azure.ResourceManager.NetworkCloud", - "Tag": "net/networkcloud/Azure.ResourceManager.NetworkCloud_0a7b4cd7f0" + "Tag": "net/networkcloud/Azure.ResourceManager.NetworkCloud_cddc58b568" } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolCollection.cs index f2c147e6179c3..9ece59ee176ec 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkCloudAgentPoolCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAgentPoolsOfTheKubernetesCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/AgentPools_ListByKubernetesCluster.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_ListByKubernetesCluster.json // this example is just showing the usage of "AgentPools_ListByKubernetesCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListAgentPoolsOfTheKubernetesCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetKubernetesClusterAgentPool() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/AgentPools_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Get.json // this example is just showing the usage of "AgentPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetKubernetesClusterAgentPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetKubernetesClusterAgentPool() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/AgentPools_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Get.json // this example is just showing the usage of "AgentPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetKubernetesClusterAgentPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetKubernetesClusterAgentPool() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/AgentPools_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Get.json // this example is just showing the usage of "AgentPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetKubernetesClusterAgentPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateKubernetesClusterAgentPool() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/AgentPools_Create.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Create.json // this example is just showing the usage of "AgentPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,7 +187,7 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesClusterAgentPool() // invoke the operation string agentPoolName = "agentPoolName"; - NetworkCloudAgentPoolData data = new NetworkCloudAgentPoolData(new AzureLocation("location"), 3L, NetworkCloudAgentPoolMode.System, "NC_M16_v1") + NetworkCloudAgentPoolData data = new NetworkCloudAgentPoolData(new AzureLocation("location"), 3L, NetworkCloudAgentPoolMode.System, "NC_XXXX") { ExtendedLocation = new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), AdministratorConfiguration = new AdministratorConfiguration() @@ -239,7 +239,10 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesClusterAgentPool() { new KubernetesLabel("kubernetes.taint","true") }, - UpgradeMaxSurge = "1", + UpgradeSettings = new AgentPoolUpgradeSettings() + { + MaxSurge = "1", + }, Tags = { ["key1"] = "myvalue1", diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolResource.cs index 08634ce262672..defbc9749d20a 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudAgentPoolResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkCloudAgentPoolResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetKubernetesClusterAgentPool() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/AgentPools_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Get.json // this example is just showing the usage of "AgentPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,40 +47,12 @@ public async Task Get_GetKubernetesClusterAgentPool() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Delete Kubernetes cluster agent pool - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteKubernetesClusterAgentPool() - { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/AgentPools_Delete.json - // this example is just showing the usage of "AgentPools_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkCloudAgentPoolResource created on azure - // for more information of creating NetworkCloudAgentPoolResource, please refer to the document of NetworkCloudAgentPoolResource - string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; - string resourceGroupName = "resourceGroupName"; - string kubernetesClusterName = "kubernetesClusterName"; - string agentPoolName = "agentPoolName"; - ResourceIdentifier networkCloudAgentPoolResourceId = NetworkCloudAgentPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, kubernetesClusterName, agentPoolName); - NetworkCloudAgentPoolResource networkCloudAgentPool = client.GetNetworkCloudAgentPoolResource(networkCloudAgentPoolResourceId); - - // invoke the operation - await networkCloudAgentPool.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // Patch Kubernetes cluster agent pool [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchKubernetesClusterAgentPool() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/AgentPools_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Patch.json // this example is just showing the usage of "AgentPools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,9 +76,18 @@ public async Task Update_PatchKubernetesClusterAgentPool() { ["key1"] = "myvalue1", ["key2"] = "myvalue2", +}, + AdministratorSshPublicKeys = +{ +new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm") }, Count = 3L, - UpgradeMaxSurge = "1", + UpgradeSettings = new AgentPoolUpgradeSettings() + { + DrainTimeout = 1800L, + MaxSurge = "1", + MaxUnavailable = "0", + }, }; ArmOperation lro = await networkCloudAgentPool.UpdateAsync(WaitUntil.Completed, patch); NetworkCloudAgentPoolResource result = lro.Value; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineCollection.cs index 78aed16e51ca6..3ae1811802391 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkCloudBareMetalMachineCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListBareMetalMachinesForResourceGroup() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_ListByResourceGroup.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_ListByResourceGroup.json // this example is just showing the usage of "BareMetalMachines_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListBareMetalMachinesForResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Get.json // this example is just showing the usage of "BareMetalMachines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetBareMetalMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Get.json // this example is just showing the usage of "BareMetalMachines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetBareMetalMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Get.json // this example is just showing the usage of "BareMetalMachines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineKeySetCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineKeySetCollection.cs index c080b18ac2457..9254c19707b21 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineKeySetCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineKeySetCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudBareMetalMachineKeySetCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListBareMetalMachineKeySetsOfTheCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachineKeySets_ListByCluster.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_ListByCluster.json // this example is just showing the usage of "BareMetalMachineKeySets_ListByCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ListBareMetalMachineKeySetsOfTheCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetBareMetalMachineKeySetOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachineKeySets_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Get.json // this example is just showing the usage of "BareMetalMachineKeySets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetBareMetalMachineKeySetOfCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetBareMetalMachineKeySetOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachineKeySets_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Get.json // this example is just showing the usage of "BareMetalMachineKeySets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Exists_GetBareMetalMachineKeySetOfCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetBareMetalMachineKeySetOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachineKeySets_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Get.json // this example is just showing the usage of "BareMetalMachineKeySets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -167,7 +167,7 @@ public async Task GetIfExists_GetBareMetalMachineKeySetOfCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateBareMetalMachineKeySetOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachineKeySets_Create.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Create.json // this example is just showing the usage of "BareMetalMachineKeySets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -196,9 +196,11 @@ public async Task CreateOrUpdate_CreateOrUpdateBareMetalMachineKeySetOfCluster() new KeySetUser("userABC",new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm")) { Description = "Needs access for troubleshooting as a part of the support team", +UserPrincipalName = "userABC@contoso.com", },new KeySetUser("userXYZ",new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm")) { Description = "Needs access for troubleshooting as a part of the support team", +UserPrincipalName = "userABC@contoso.com", } }) { diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineKeySetResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineKeySetResource.cs index 71a8fb76f4329..8448a385725bf 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineKeySetResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineKeySetResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudBareMetalMachineKeySetResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetBareMetalMachineKeySetOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachineKeySets_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Get.json // this example is just showing the usage of "BareMetalMachineKeySets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,40 +48,12 @@ public async Task Get_GetBareMetalMachineKeySetOfCluster() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Delete bare metal machine key set of cluster - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteBareMetalMachineKeySetOfCluster() - { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachineKeySets_Delete.json - // this example is just showing the usage of "BareMetalMachineKeySets_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkCloudBareMetalMachineKeySetResource created on azure - // for more information of creating NetworkCloudBareMetalMachineKeySetResource, please refer to the document of NetworkCloudBareMetalMachineKeySetResource - string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; - string resourceGroupName = "resourceGroupName"; - string clusterName = "clusterName"; - string bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - ResourceIdentifier networkCloudBareMetalMachineKeySetResourceId = NetworkCloudBareMetalMachineKeySetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, bareMetalMachineKeySetName); - NetworkCloudBareMetalMachineKeySetResource networkCloudBareMetalMachineKeySet = client.GetNetworkCloudBareMetalMachineKeySetResource(networkCloudBareMetalMachineKeySetResourceId); - - // invoke the operation - await networkCloudBareMetalMachineKeySet.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // Patch bare metal machine key set of cluster [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchBareMetalMachineKeySetOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachineKeySets_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Patch.json // this example is just showing the usage of "BareMetalMachineKeySets_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,9 +88,11 @@ public async Task Update_PatchBareMetalMachineKeySetOfCluster() new KeySetUser("userABC",new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm")) { Description = "Needs access for troubleshooting as a part of the support team", +UserPrincipalName = "userABC@contoso.com", },new KeySetUser("userXYZ",new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm")) { Description = "Needs access for troubleshooting as a part of the support team", +UserPrincipalName = "userABC@contoso.com", } }, }; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs index 2fe990ef878fc..8aaeb3083588f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudBareMetalMachineResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkCloudBareMetalMachines_ListBareMetalMachinesForSubscription() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_ListBySubscription.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_ListBySubscription.json // this example is just showing the usage of "BareMetalMachines_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetNetworkCloudBareMetalMachines_ListBareMetalMachinesForSubsc [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Get.json // this example is just showing the usage of "BareMetalMachines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetBareMetalMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Patch.json // this example is just showing the usage of "BareMetalMachines_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Update_PatchBareMetalMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Cordon_CordonBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Cordon.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Cordon.json // this example is just showing the usage of "BareMetalMachines_Cordon" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -157,7 +157,7 @@ public async Task Cordon_CordonBareMetalMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PowerOff_PowerOffBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_PowerOff.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_PowerOff.json // this example is just showing the usage of "BareMetalMachines_PowerOff" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -189,7 +189,7 @@ public async Task PowerOff_PowerOffBareMetalMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Reimage_ReimageBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Reimage.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Reimage.json // this example is just showing the usage of "BareMetalMachines_Reimage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -217,7 +217,7 @@ public async Task Reimage_ReimageBareMetalMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Replace_ReplaceBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Replace.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Replace.json // this example is just showing the usage of "BareMetalMachines_Replace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -256,7 +256,7 @@ public async Task Replace_ReplaceBareMetalMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Restart_RestartBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Restart.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Restart.json // this example is just showing the usage of "BareMetalMachines_Restart" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -284,7 +284,7 @@ public async Task Restart_RestartBareMetalMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RunCommand_RunCommandOnBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_RunCommand.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunCommand.json // this example is just showing the usage of "BareMetalMachines_RunCommand" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -319,7 +319,7 @@ public async Task RunCommand_RunCommandOnBareMetalMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RunDataExtracts_RunDataExtractionOnBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_RunDataExtracts.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunDataExtracts.json // this example is just showing the usage of "BareMetalMachines_RunDataExtracts" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -357,7 +357,7 @@ public async Task RunDataExtracts_RunDataExtractionOnBareMetalMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RunReadCommands_RunAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_RunReadCommands.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunReadCommands.json // this example is just showing the usage of "BareMetalMachines_RunReadCommands" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -401,7 +401,7 @@ public async Task RunReadCommands_RunAndRetrieveOutputFromReadOnlyCommandsOnBare [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Start_StartBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Start.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Start.json // this example is just showing the usage of "BareMetalMachines_Start" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -429,7 +429,7 @@ public async Task Start_StartBareMetalMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Uncordon_UncordonBareMetalMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BareMetalMachines_Uncordon.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Uncordon.json // this example is just showing the usage of "BareMetalMachines_Uncordon" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBmcKeySetCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBmcKeySetCollection.cs index 83b489437856e..fb9111032905e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBmcKeySetCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBmcKeySetCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkCloudBmcKeySetCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListBaseboardManagementControllerKeySetsOfTheCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BmcKeySets_ListByCluster.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_ListByCluster.json // this example is just showing the usage of "BmcKeySets_ListByCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListBaseboardManagementControllerKeySetsOfTheCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetBaseboardManagementControllerKeySetOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BmcKeySets_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Get.json // this example is just showing the usage of "BmcKeySets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetBaseboardManagementControllerKeySetOfCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetBaseboardManagementControllerKeySetOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BmcKeySets_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Get.json // this example is just showing the usage of "BmcKeySets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetBaseboardManagementControllerKeySetOfCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetBaseboardManagementControllerKeySetOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BmcKeySets_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Get.json // this example is just showing the usage of "BmcKeySets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetBaseboardManagementControllerKeySetOfCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateBaseboardManagementControllerKeySetOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BmcKeySets_Create.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Create.json // this example is just showing the usage of "BmcKeySets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,9 +192,11 @@ public async Task CreateOrUpdate_CreateOrUpdateBaseboardManagementControllerKeyS new KeySetUser("userABC",new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm")) { Description = "Needs access for troubleshooting as a part of the support team", +UserPrincipalName = "userABC@contoso.com", },new KeySetUser("userXYZ",new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm")) { Description = "Needs access for troubleshooting as a part of the support team", +UserPrincipalName = "userABC@contoso.com", } }) { diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBmcKeySetResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBmcKeySetResource.cs index 22f87d8dc1080..82255c26d39ec 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBmcKeySetResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBmcKeySetResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkCloudBmcKeySetResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetBaseboardManagementControllerKeySetOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BmcKeySets_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Get.json // this example is just showing the usage of "BmcKeySets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,40 +47,12 @@ public async Task Get_GetBaseboardManagementControllerKeySetOfCluster() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Delete baseboard management controller key set of cluster - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteBaseboardManagementControllerKeySetOfCluster() - { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BmcKeySets_Delete.json - // this example is just showing the usage of "BmcKeySets_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkCloudBmcKeySetResource created on azure - // for more information of creating NetworkCloudBmcKeySetResource, please refer to the document of NetworkCloudBmcKeySetResource - string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; - string resourceGroupName = "resourceGroupName"; - string clusterName = "clusterName"; - string bmcKeySetName = "bmcKeySetName"; - ResourceIdentifier networkCloudBmcKeySetResourceId = NetworkCloudBmcKeySetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, bmcKeySetName); - NetworkCloudBmcKeySetResource networkCloudBmcKeySet = client.GetNetworkCloudBmcKeySetResource(networkCloudBmcKeySetResourceId); - - // invoke the operation - await networkCloudBmcKeySet.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // Patch baseboard management controller key set of cluster [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchBaseboardManagementControllerKeySetOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/BmcKeySets_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Patch.json // this example is just showing the usage of "BmcKeySets_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,9 +83,11 @@ public async Task Update_PatchBaseboardManagementControllerKeySetOfCluster() new KeySetUser("userABC",new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm")) { Description = "Needs access for troubleshooting as a part of the support team", +UserPrincipalName = "userABC@contoso.com", },new KeySetUser("userXYZ",new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm")) { Description = "Needs access for troubleshooting as a part of the support team", +UserPrincipalName = "userABC@contoso.com", } }, }; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkCollection.cs index 2e3f57564a043..35a7bcdec32c5 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudCloudServicesNetworkCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCloudServicesNetworksForResourceGroup() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_ListByResourceGroup.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_ListByResourceGroup.json // this example is just showing the usage of "CloudServicesNetworks_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListCloudServicesNetworksForResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCloudServicesNetwork() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Get.json // this example is just showing the usage of "CloudServicesNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetCloudServicesNetwork() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetCloudServicesNetwork() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Get.json // this example is just showing the usage of "CloudServicesNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetCloudServicesNetwork() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetCloudServicesNetwork() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Get.json // this example is just showing the usage of "CloudServicesNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_GetCloudServicesNetwork() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateCloudServicesNetwork() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_Create.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Create.json // this example is just showing the usage of "CloudServicesNetworks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -189,7 +189,7 @@ public async Task CreateOrUpdate_CreateOrUpdateCloudServicesNetwork() { new EgressEndpoint("azure-resource-management",new EndpointDependency[] { -new EndpointDependency("https://storageaccountex.blob.core.windows.net") +new EndpointDependency("storageaccountex.blob.core.windows.net") { Port = 443L, } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkResource.cs index db158b34fe361..dbad93e3fbe10 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudCloudServicesNetworkResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudCloudServicesNetworkResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkCloudCloudServicesNetworks_ListCloudServicesNetworksForSubscription() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_ListBySubscription.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_ListBySubscription.json // this example is just showing the usage of "CloudServicesNetworks_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetNetworkCloudCloudServicesNetworks_ListCloudServicesNetworks [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCloudServicesNetwork() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Get.json // this example is just showing the usage of "CloudServicesNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,39 +79,12 @@ public async Task Get_GetCloudServicesNetwork() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Delete cloud services network - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteCloudServicesNetwork() - { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_Delete.json - // this example is just showing the usage of "CloudServicesNetworks_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkCloudCloudServicesNetworkResource created on azure - // for more information of creating NetworkCloudCloudServicesNetworkResource, please refer to the document of NetworkCloudCloudServicesNetworkResource - string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; - string resourceGroupName = "resourceGroupName"; - string cloudServicesNetworkName = "cloudServicesNetworkName"; - ResourceIdentifier networkCloudCloudServicesNetworkResourceId = NetworkCloudCloudServicesNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, cloudServicesNetworkName); - NetworkCloudCloudServicesNetworkResource networkCloudCloudServicesNetwork = client.GetNetworkCloudCloudServicesNetworkResource(networkCloudCloudServicesNetworkResourceId); - - // invoke the operation - await networkCloudCloudServicesNetwork.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // Patch cloud services network [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchCloudServicesNetwork() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/CloudServicesNetworks_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Patch.json // this example is just showing the usage of "CloudServicesNetworks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,7 +112,7 @@ public async Task Update_PatchCloudServicesNetwork() { new EgressEndpoint("azure-resource-management",new EndpointDependency[] { -new EndpointDependency("https://storageaccountex.blob.core.windows.net") +new EndpointDependency("storageaccountex.blob.core.windows.net") { Port = 443L, } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterCollection.cs index fb7a3366851cc..da914643e9c71 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterCollection.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Models; using Azure.ResourceManager.NetworkCloud.Models; using Azure.ResourceManager.Resources; @@ -21,7 +22,7 @@ public partial class Sample_NetworkCloudClusterCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListClustersForResourceGroup() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_ListByResourceGroup.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ListByResourceGroup.json // this example is just showing the usage of "Clusters_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +58,7 @@ public async Task GetAll_ListClustersForResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Get.json // this example is just showing the usage of "Clusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +92,7 @@ public async Task Get_GetCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Get.json // this example is just showing the usage of "Clusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +122,7 @@ public async Task Exists_GetCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Get.json // this example is just showing the usage of "Clusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +164,7 @@ public async Task GetIfExists_GetCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Create.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Create.json // this example is just showing the usage of "Clusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -216,12 +217,28 @@ public async Task CreateOrUpdate_CreateOrUpdateCluster() }, }, ClusterType.SingleRack, "1.0.0", new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName")) { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1")] = new UserAssignedIdentity(), +}, + }, AnalyticsWorkspaceId = new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), ClusterLocation = "Foo Street, 3rd Floor, row 9", ClusterServicePrincipal = new ServicePrincipalInformation("12345678-1234-1234-1234-123456789012", "00000008-0004-0004-0004-000000000012", "80000000-4000-4000-4000-120000000000") { Password = "{password}", }, + CommandOutputSettings = new CommandOutputSettings() + { + AssociatedIdentity = new IdentitySelector() + { + IdentityType = ManagedServiceIdentitySelectorType.UserAssignedIdentity, + UserAssignedIdentityResourceId = new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1"), + }, + ContainerUri = new Uri("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), + }, ComputeDeploymentThreshold = new ValidationThreshold(ValidationThresholdGrouping.PerCluster, ValidationThresholdType.PercentSuccess, 90L), ComputeRackDefinitions = { @@ -263,6 +280,16 @@ public async Task CreateOrUpdate_CreateOrUpdateCluster() Location = new AzureLocation("East US"), Name = "my-managed-rg", }, + RuntimeProtectionEnforcementLevel = RuntimeProtectionEnforcementLevel.OnDemand, + SecretArchive = new ClusterSecretArchive(new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName")) + { + UseKeyVault = ClusterSecretArchiveEnabled.True, + }, + UpdateStrategy = new ClusterUpdateStrategy(ClusterUpdateStrategyType.Rack, ValidationThresholdType.CountSuccess, 4L) + { + MaxUnavailable = 4L, + WaitTimeMinutes = 10L, + }, Tags = { ["key1"] = "myvalue1", diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterManagerCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterManagerCollection.cs index 23c799a83fc08..9c031046db5df 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterManagerCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterManagerCollection.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Models; using Azure.ResourceManager.NetworkCloud.Models; using Azure.ResourceManager.Resources; @@ -21,7 +22,7 @@ public partial class Sample_NetworkCloudClusterManagerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListClusterManagersForResourceGroup() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_ListByResourceGroup.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_ListByResourceGroup.json // this example is just showing the usage of "ClusterManagers_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +58,7 @@ public async Task GetAll_ListClusterManagersForResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetClusterManager() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Get.json // this example is just showing the usage of "ClusterManagers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +92,7 @@ public async Task Get_GetClusterManager() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetClusterManager() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Get.json // this example is just showing the usage of "ClusterManagers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +122,7 @@ public async Task Exists_GetClusterManager() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetClusterManager() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Get.json // this example is just showing the usage of "ClusterManagers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +164,7 @@ public async Task GetIfExists_GetClusterManager() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateClusterManager() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_Create.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Create.json // this example is just showing the usage of "ClusterManagers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -185,6 +186,63 @@ public async Task CreateOrUpdate_CreateOrUpdateClusterManager() string clusterManagerName = "clusterManagerName"; NetworkCloudClusterManagerData data = new NetworkCloudClusterManagerData(new AzureLocation("location"), new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName")) { + Identity = new ManagedServiceIdentity("SystemAssigned"), + AnalyticsWorkspaceId = new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), + ManagedResourceGroupConfiguration = new ManagedResourceGroupConfiguration() + { + Location = new AzureLocation("East US"), + Name = "my-managed-rg", + }, + Tags = +{ +["key1"] = "myvalue1", +["key2"] = "myvalue2", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, clusterManagerName, data); + NetworkCloudClusterManagerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkCloudClusterManagerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or update cluster manager with user assigned identity + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateClusterManagerWithUserAssignedIdentity() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Create_Uami.json + // this example is just showing the usage of "ClusterManagers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkCloudClusterManagerResource + NetworkCloudClusterManagerCollection collection = resourceGroupResource.GetNetworkCloudClusterManagers(); + + // invoke the operation + string clusterManagerName = "clusterManagerName"; + NetworkCloudClusterManagerData data = new NetworkCloudClusterManagerData(new AzureLocation("location"), new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName")) + { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1")] = new UserAssignedIdentity(), +}, + }, AnalyticsWorkspaceId = new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName"), ManagedResourceGroupConfiguration = new ManagedResourceGroupConfiguration() { diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterManagerResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterManagerResource.cs index 05c4536fa83ee..b0efa5f824409 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterManagerResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterManagerResource.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Models; using Azure.ResourceManager.NetworkCloud.Models; using Azure.ResourceManager.Resources; @@ -21,7 +22,7 @@ public partial class Sample_NetworkCloudClusterManagerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkCloudClusterManagers_ListClusterManagersForSubscription() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_ListBySubscription.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_ListBySubscription.json // this example is just showing the usage of "ClusterManagers_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +54,7 @@ public async Task GetNetworkCloudClusterManagers_ListClusterManagersForSubscript [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetClusterManager() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Get.json // this example is just showing the usage of "ClusterManagers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,39 +80,12 @@ public async Task Get_GetClusterManager() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Delete cluster manager - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteClusterManager() - { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_Delete.json - // this example is just showing the usage of "ClusterManagers_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkCloudClusterManagerResource created on azure - // for more information of creating NetworkCloudClusterManagerResource, please refer to the document of NetworkCloudClusterManagerResource - string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; - string resourceGroupName = "resourceGroupName"; - string clusterManagerName = "clusterManagerName"; - ResourceIdentifier networkCloudClusterManagerResourceId = NetworkCloudClusterManagerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterManagerName); - NetworkCloudClusterManagerResource networkCloudClusterManager = client.GetNetworkCloudClusterManagerResource(networkCloudClusterManagerResourceId); - - // invoke the operation - await networkCloudClusterManager.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // Patch cluster manager [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchClusterManager() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterManagers_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Patch.json // this example is just showing the usage of "ClusterManagers_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,6 +104,14 @@ public async Task Update_PatchClusterManager() // invoke the operation NetworkCloudClusterManagerPatch patch = new NetworkCloudClusterManagerPatch() { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1")] = null, +[new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2")] = new UserAssignedIdentity(), +}, + }, Tags = { ["key1"] = "myvalue1", diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationCollection.cs index 3c1c934864505..42d0cd3f47de9 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkCloudClusterMetricsConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListMetricsConfigurationsOfTheCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterMetricsConfigurations_ListByCluster.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_ListByCluster.json // this example is just showing the usage of "MetricsConfigurations_ListByCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListMetricsConfigurationsOfTheCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetMetricsConfigurationOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterMetricsConfigurations_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Get.json // this example is just showing the usage of "MetricsConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetMetricsConfigurationOfCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetMetricsConfigurationOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterMetricsConfigurations_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Get.json // this example is just showing the usage of "MetricsConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetMetricsConfigurationOfCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetMetricsConfigurationOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterMetricsConfigurations_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Get.json // this example is just showing the usage of "MetricsConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetMetricsConfigurationOfCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateMetricsConfigurationOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterMetricsConfigurations_Create.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Create.json // this example is just showing the usage of "MetricsConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationResource.cs index 4adf2da46ee3f..6c77355ee104c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterMetricsConfigurationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkCloudClusterMetricsConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetMetricsConfigurationOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterMetricsConfigurations_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Get.json // this example is just showing the usage of "MetricsConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,40 +47,12 @@ public async Task Get_GetMetricsConfigurationOfCluster() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Delete metrics configuration of cluster - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteMetricsConfigurationOfCluster() - { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterMetricsConfigurations_Delete.json - // this example is just showing the usage of "MetricsConfigurations_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkCloudClusterMetricsConfigurationResource created on azure - // for more information of creating NetworkCloudClusterMetricsConfigurationResource, please refer to the document of NetworkCloudClusterMetricsConfigurationResource - string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; - string resourceGroupName = "resourceGroupName"; - string clusterName = "clusterName"; - string metricsConfigurationName = "default"; - ResourceIdentifier networkCloudClusterMetricsConfigurationResourceId = NetworkCloudClusterMetricsConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, metricsConfigurationName); - NetworkCloudClusterMetricsConfigurationResource networkCloudClusterMetricsConfiguration = client.GetNetworkCloudClusterMetricsConfigurationResource(networkCloudClusterMetricsConfigurationResourceId); - - // invoke the operation - await networkCloudClusterMetricsConfiguration.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // Patch metrics configuration of cluster [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchMetricsConfigurationOfCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/ClusterMetricsConfigurations_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Patch.json // this example is just showing the usage of "MetricsConfigurations_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs index 8a32ef45818fb..9c38039cc4c0e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Models; using Azure.ResourceManager.NetworkCloud.Models; using Azure.ResourceManager.Resources; @@ -21,7 +22,7 @@ public partial class Sample_NetworkCloudClusterResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkCloudClusters_ListClustersForSubscription() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_ListBySubscription.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ListBySubscription.json // this example is just showing the usage of "Clusters_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +54,7 @@ public async Task GetNetworkCloudClusters_ListClustersForSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Get.json // this example is just showing the usage of "Clusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,39 +80,12 @@ public async Task Get_GetCluster() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Delete cluster - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteCluster() - { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Delete.json - // this example is just showing the usage of "Clusters_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkCloudClusterResource created on azure - // for more information of creating NetworkCloudClusterResource, please refer to the document of NetworkCloudClusterResource - string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; - string resourceGroupName = "resourceGroupName"; - string clusterName = "clusterName"; - ResourceIdentifier networkCloudClusterResourceId = NetworkCloudClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName); - NetworkCloudClusterResource networkCloudCluster = client.GetNetworkCloudClusterResource(networkCloudClusterResourceId); - - // invoke the operation - await networkCloudCluster.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // Patch cluster AggregatorOrSingleRackDefinition [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchClusterAggregatorOrSingleRackDefinition() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.json // this example is just showing the usage of "Clusters_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -179,12 +153,69 @@ public async Task Update_PatchClusterAggregatorOrSingleRackDefinition() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // Patch cluster command output + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_PatchClusterCommandOutput() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_CommandOutput.json + // this example is just showing the usage of "Clusters_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkCloudClusterResource created on azure + // for more information of creating NetworkCloudClusterResource, please refer to the document of NetworkCloudClusterResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + string clusterName = "clusterName"; + ResourceIdentifier networkCloudClusterResourceId = NetworkCloudClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName); + NetworkCloudClusterResource networkCloudCluster = client.GetNetworkCloudClusterResource(networkCloudClusterResourceId); + + // invoke the operation + NetworkCloudClusterPatch patch = new NetworkCloudClusterPatch() + { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1")] = null, +[new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2")] = new UserAssignedIdentity(), +}, + }, + Tags = +{ +["key1"] = "myvalue1", +["key2"] = "myvalue2", +}, + CommandOutputSettings = new CommandOutputSettings() + { + AssociatedIdentity = new IdentitySelector() + { + IdentityType = ManagedServiceIdentitySelectorType.UserAssignedIdentity, + UserAssignedIdentityResourceId = new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2"), + }, + ContainerUri = new Uri("https://myaccount.blob.core.windows.net/mycontainer?restype=container"), + }, + }; + ArmOperation lro = await networkCloudCluster.UpdateAsync(WaitUntil.Completed, patch); + NetworkCloudClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkCloudClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Patch cluster location [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchClusterLocation() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Patch_Location.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_Location.json // this example is just showing the usage of "Clusters_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -220,12 +251,174 @@ public async Task Update_PatchClusterLocation() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // Patch runtime protection configuration + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_PatchRuntimeProtectionConfiguration() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_RuntimeProtectionConfiguration.json + // this example is just showing the usage of "Clusters_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkCloudClusterResource created on azure + // for more information of creating NetworkCloudClusterResource, please refer to the document of NetworkCloudClusterResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + string clusterName = "clusterName"; + ResourceIdentifier networkCloudClusterResourceId = NetworkCloudClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName); + NetworkCloudClusterResource networkCloudCluster = client.GetNetworkCloudClusterResource(networkCloudClusterResourceId); + + // invoke the operation + NetworkCloudClusterPatch patch = new NetworkCloudClusterPatch() + { + Tags = +{ +["key1"] = "myvalue1", +["key2"] = "myvalue2", +}, + RuntimeProtectionEnforcementLevel = RuntimeProtectionEnforcementLevel.OnDemand, + }; + ArmOperation lro = await networkCloudCluster.UpdateAsync(WaitUntil.Completed, patch); + NetworkCloudClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkCloudClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Patch secret archive + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_PatchSecretArchive() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_SecretArchive.json + // this example is just showing the usage of "Clusters_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkCloudClusterResource created on azure + // for more information of creating NetworkCloudClusterResource, please refer to the document of NetworkCloudClusterResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + string clusterName = "clusterName"; + ResourceIdentifier networkCloudClusterResourceId = NetworkCloudClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName); + NetworkCloudClusterResource networkCloudCluster = client.GetNetworkCloudClusterResource(networkCloudClusterResourceId); + + // invoke the operation + NetworkCloudClusterPatch patch = new NetworkCloudClusterPatch() + { + Tags = +{ +["key1"] = "myvalue1", +["key2"] = "myvalue2", +}, + SecretArchive = new ClusterSecretArchive(new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName")) + { + UseKeyVault = ClusterSecretArchiveEnabled.True, + }, + }; + ArmOperation lro = await networkCloudCluster.UpdateAsync(WaitUntil.Completed, patch); + NetworkCloudClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkCloudClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Patch update strategy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_PatchUpdateStrategy() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_UpdateStrategy.json + // this example is just showing the usage of "Clusters_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkCloudClusterResource created on azure + // for more information of creating NetworkCloudClusterResource, please refer to the document of NetworkCloudClusterResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + string clusterName = "clusterName"; + ResourceIdentifier networkCloudClusterResourceId = NetworkCloudClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName); + NetworkCloudClusterResource networkCloudCluster = client.GetNetworkCloudClusterResource(networkCloudClusterResourceId); + + // invoke the operation + NetworkCloudClusterPatch patch = new NetworkCloudClusterPatch() + { + Tags = +{ +["key1"] = "myvalue1", +["key2"] = "myvalue2", +}, + UpdateStrategy = new ClusterUpdateStrategy(ClusterUpdateStrategyType.Rack, ValidationThresholdType.CountSuccess, 4L) + { + MaxUnavailable = 4L, + WaitTimeMinutes = 10L, + }, + }; + ArmOperation lro = await networkCloudCluster.UpdateAsync(WaitUntil.Completed, patch); + NetworkCloudClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkCloudClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Continue update cluster version + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ContinueUpdateVersion_ContinueUpdateClusterVersion() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ContinueUpdateVersion.json + // this example is just showing the usage of "Clusters_ContinueUpdateVersion" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkCloudClusterResource created on azure + // for more information of creating NetworkCloudClusterResource, please refer to the document of NetworkCloudClusterResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + string clusterName = "clusterName"; + ResourceIdentifier networkCloudClusterResourceId = NetworkCloudClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName); + NetworkCloudClusterResource networkCloudCluster = client.GetNetworkCloudClusterResource(networkCloudClusterResourceId); + + // invoke the operation + ClusterContinueUpdateVersionContent content = new ClusterContinueUpdateVersionContent() + { + MachineGroupTargetingMode = ClusterContinueUpdateVersionMachineGroupTargetingMode.AlphaByRack, + }; + ArmOperation lro = await networkCloudCluster.ContinueUpdateVersionAsync(WaitUntil.Completed, content); + NetworkCloudOperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + // Deploy cluster [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Deploy_DeployCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Deploy.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Deploy.json // this example is just showing the usage of "Clusters_Deploy" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -254,7 +447,7 @@ public async Task Deploy_DeployCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Deploy_DeployClusterSkippingValidation() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_Deploy_SkipValidation.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Deploy_SkipValidation.json // this example is just showing the usage of "Clusters_Deploy" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -284,12 +477,44 @@ public async Task Deploy_DeployClusterSkippingValidation() Console.WriteLine($"Succeeded: {result}"); } + // Execute a runtime protection scan on the cluster + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ScanRuntime_ExecuteARuntimeProtectionScanOnTheCluster() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ScanRuntime.json + // this example is just showing the usage of "Clusters_ScanRuntime" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkCloudClusterResource created on azure + // for more information of creating NetworkCloudClusterResource, please refer to the document of NetworkCloudClusterResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + string clusterName = "clusterName"; + ResourceIdentifier networkCloudClusterResourceId = NetworkCloudClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName); + NetworkCloudClusterResource networkCloudCluster = client.GetNetworkCloudClusterResource(networkCloudClusterResourceId); + + // invoke the operation + ClusterScanRuntimeContent content = new ClusterScanRuntimeContent() + { + ScanActivity = ClusterScanRuntimeParametersScanActivity.Scan, + }; + ArmOperation lro = await networkCloudCluster.ScanRuntimeAsync(WaitUntil.Completed, content: content); + NetworkCloudOperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + // Update cluster version [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateVersion_UpdateClusterVersion() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Clusters_UpdateVersion.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_UpdateVersion.json // this example is just showing the usage of "Clusters_UpdateVersion" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterCollection.cs index 4e686e6fea3f1..a029a0405f1bd 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_NetworkCloudKubernetesClusterCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListKubernetesClustersForResourceGroup() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_ListByResourceGroup.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_ListByResourceGroup.json // this example is just showing the usage of "KubernetesClusters_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ListKubernetesClustersForResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetKubernetesCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Get.json // this example is just showing the usage of "KubernetesClusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetKubernetesCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetKubernetesCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Get.json // this example is just showing the usage of "KubernetesClusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetKubernetesCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetKubernetesCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Get.json // this example is just showing the usage of "KubernetesClusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task GetIfExists_GetKubernetesCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateKubernetesCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_Create.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Create.json // this example is just showing the usage of "KubernetesClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -184,7 +184,7 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesCluster() // invoke the operation string kubernetesClusterName = "kubernetesClusterName"; - NetworkCloudKubernetesClusterData data = new NetworkCloudKubernetesClusterData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), new ControlPlaneNodeConfiguration(3L, "NC_G4_v1") + NetworkCloudKubernetesClusterData data = new NetworkCloudKubernetesClusterData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), new ControlPlaneNodeConfiguration(3L, "NC_XXXX") { AdministratorConfiguration = new AdministratorConfiguration() { @@ -200,7 +200,7 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesCluster() }, }, new InitialAgentPoolConfiguration[] { -new InitialAgentPoolConfiguration(3L,NetworkCloudAgentPoolMode.System,"SystemPool-1","NC_M16_v1") +new InitialAgentPoolConfiguration(3L,NetworkCloudAgentPoolMode.System,"SystemPool-1","NC_XXXX") { AdministratorConfiguration = new AdministratorConfiguration() { @@ -251,9 +251,12 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesCluster() { new KubernetesLabel("kubernetes.taint","true") }, -UpgradeMaxSurge = "1", +UpgradeSettings = new AgentPoolUpgradeSettings() +{ +MaxSurge = "1", +}, } - }, "1.24.12-1", new KubernetesClusterNetworkConfiguration(new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName")) + }, "1.XX.Y", new KubernetesClusterNetworkConfiguration(new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName")) { AttachedNetworkConfiguration = new AttachedNetworkConfiguration() { @@ -368,5 +371,183 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesCluster() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + // Create or update Kubernetes cluster with a layer 2 load balancer + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateKubernetesClusterWithALayer2LoadBalancer() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_L2LoadBalancer_Create.json + // this example is just showing the usage of "KubernetesClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkCloudKubernetesClusterResource + NetworkCloudKubernetesClusterCollection collection = resourceGroupResource.GetNetworkCloudKubernetesClusters(); + + // invoke the operation + string kubernetesClusterName = "kubernetesClusterName"; + NetworkCloudKubernetesClusterData data = new NetworkCloudKubernetesClusterData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), new ControlPlaneNodeConfiguration(3L, "NC_XXXX") + { + AdministratorConfiguration = new AdministratorConfiguration() + { + AdminUsername = "azure", + SshPublicKeys = +{ +new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm") +}, + }, + AvailabilityZones = +{ +"1","2","3" +}, + }, new InitialAgentPoolConfiguration[] + { +new InitialAgentPoolConfiguration(3L,NetworkCloudAgentPoolMode.System,"SystemPool-1","NC_XXXX") +{ +AdministratorConfiguration = new AdministratorConfiguration() +{ +AdminUsername = "azure", +SshPublicKeys = +{ +new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm") +}, +}, +AgentOptions = new NetworkCloudAgentConfiguration(96L) +{ +HugepagesSize = HugepagesSize.OneG, +}, +AttachedNetworkConfiguration = new AttachedNetworkConfiguration() +{ +L2Networks = +{ +new L2NetworkAttachmentConfiguration(new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")) +{ +PluginType = KubernetesPluginType.Dpdk, +} +}, +L3Networks = +{ +new L3NetworkAttachmentConfiguration(new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName")) +{ +IpamEnabled = L3NetworkConfigurationIpamEnabled.False, +PluginType = KubernetesPluginType.Sriov, +} +}, +TrunkedNetworks = +{ +new TrunkedNetworkAttachmentConfiguration(new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName")) +{ +PluginType = KubernetesPluginType.Macvlan, +} +}, +}, +AvailabilityZones = +{ +"1","2","3" +}, +Labels = +{ +new KubernetesLabel("kubernetes.label","true") +}, +Taints = +{ +new KubernetesLabel("kubernetes.taint","true") +}, +UpgradeSettings = new AgentPoolUpgradeSettings() +{ +MaxSurge = "1", +}, +} + }, "1.XX.Y", new KubernetesClusterNetworkConfiguration(new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName")) + { + AttachedNetworkConfiguration = new AttachedNetworkConfiguration() + { + L2Networks = + { +new L2NetworkAttachmentConfiguration(new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")) +{ +PluginType = KubernetesPluginType.Dpdk, +} + }, + L3Networks = + { +new L3NetworkAttachmentConfiguration(new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName")) +{ +IpamEnabled = L3NetworkConfigurationIpamEnabled.False, +PluginType = KubernetesPluginType.Sriov, +} + }, + TrunkedNetworks = + { +new TrunkedNetworkAttachmentConfiguration(new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName")) +{ +PluginType = KubernetesPluginType.Macvlan, +} + }, + }, + DnsServiceIP = IPAddress.Parse("198.51.101.2"), + L2ServiceLoadBalancerIPAddressPools = + { +new IPAddressPool(new string[] +{ +"198.51.102.2-198.51.102.254" +},"pool1") +{ +AutoAssign = BfdEnabled.True, +} + }, + PodCidrs = + { +"198.51.100.0/24" + }, + ServiceCidrs = + { +"198.51.101.0/24" + }, + }) + { + AadAdminGroupObjectIds = +{ +"ffffffff-ffff-ffff-ffff-ffffffffffff" +}, + AdministratorConfiguration = new AdministratorConfiguration() + { + AdminUsername = "azure", + SshPublicKeys = +{ +new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm") +}, + }, + ManagedResourceGroupConfiguration = new ManagedResourceGroupConfiguration() + { + Location = new AzureLocation("East US"), + Name = "my-managed-rg", + }, + Tags = +{ +["key1"] = "myvalue1", +["key2"] = "myvalue2", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, kubernetesClusterName, data); + NetworkCloudKubernetesClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkCloudKubernetesClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterFeatureCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterFeatureCollection.cs new file mode 100644 index 0000000000000..c7655568b3d1e --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterFeatureCollection.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud.Samples +{ + public partial class Sample_NetworkCloudKubernetesClusterFeatureCollection + { + // List features for the Kubernetes cluster. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListFeaturesForTheKubernetesCluster() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_ListByKubernetesCluster.json + // this example is just showing the usage of "KubernetesClusterFeatures_ListByKubernetesCluster" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkCloudKubernetesClusterResource created on azure + // for more information of creating NetworkCloudKubernetesClusterResource, please refer to the document of NetworkCloudKubernetesClusterResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + string kubernetesClusterName = "kubernetesClusterName"; + ResourceIdentifier networkCloudKubernetesClusterResourceId = NetworkCloudKubernetesClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, kubernetesClusterName); + NetworkCloudKubernetesClusterResource networkCloudKubernetesCluster = client.GetNetworkCloudKubernetesClusterResource(networkCloudKubernetesClusterResourceId); + + // get the collection of this NetworkCloudKubernetesClusterFeatureResource + NetworkCloudKubernetesClusterFeatureCollection collection = networkCloudKubernetesCluster.GetNetworkCloudKubernetesClusterFeatures(); + + // invoke the operation and iterate over the result + await foreach (NetworkCloudKubernetesClusterFeatureResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkCloudKubernetesClusterFeatureData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Kubernetes cluster feature + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetKubernetesClusterFeature() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Get.json + // this example is just showing the usage of "KubernetesClusterFeatures_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkCloudKubernetesClusterResource created on azure + // for more information of creating NetworkCloudKubernetesClusterResource, please refer to the document of NetworkCloudKubernetesClusterResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + string kubernetesClusterName = "kubernetesClusterName"; + ResourceIdentifier networkCloudKubernetesClusterResourceId = NetworkCloudKubernetesClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, kubernetesClusterName); + NetworkCloudKubernetesClusterResource networkCloudKubernetesCluster = client.GetNetworkCloudKubernetesClusterResource(networkCloudKubernetesClusterResourceId); + + // get the collection of this NetworkCloudKubernetesClusterFeatureResource + NetworkCloudKubernetesClusterFeatureCollection collection = networkCloudKubernetesCluster.GetNetworkCloudKubernetesClusterFeatures(); + + // invoke the operation + string featureName = "featureName"; + NetworkCloudKubernetesClusterFeatureResource result = await collection.GetAsync(featureName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkCloudKubernetesClusterFeatureData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Kubernetes cluster feature + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetKubernetesClusterFeature() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Get.json + // this example is just showing the usage of "KubernetesClusterFeatures_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkCloudKubernetesClusterResource created on azure + // for more information of creating NetworkCloudKubernetesClusterResource, please refer to the document of NetworkCloudKubernetesClusterResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + string kubernetesClusterName = "kubernetesClusterName"; + ResourceIdentifier networkCloudKubernetesClusterResourceId = NetworkCloudKubernetesClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, kubernetesClusterName); + NetworkCloudKubernetesClusterResource networkCloudKubernetesCluster = client.GetNetworkCloudKubernetesClusterResource(networkCloudKubernetesClusterResourceId); + + // get the collection of this NetworkCloudKubernetesClusterFeatureResource + NetworkCloudKubernetesClusterFeatureCollection collection = networkCloudKubernetesCluster.GetNetworkCloudKubernetesClusterFeatures(); + + // invoke the operation + string featureName = "featureName"; + bool result = await collection.ExistsAsync(featureName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Kubernetes cluster feature + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetKubernetesClusterFeature() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Get.json + // this example is just showing the usage of "KubernetesClusterFeatures_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkCloudKubernetesClusterResource created on azure + // for more information of creating NetworkCloudKubernetesClusterResource, please refer to the document of NetworkCloudKubernetesClusterResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + string kubernetesClusterName = "kubernetesClusterName"; + ResourceIdentifier networkCloudKubernetesClusterResourceId = NetworkCloudKubernetesClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, kubernetesClusterName); + NetworkCloudKubernetesClusterResource networkCloudKubernetesCluster = client.GetNetworkCloudKubernetesClusterResource(networkCloudKubernetesClusterResourceId); + + // get the collection of this NetworkCloudKubernetesClusterFeatureResource + NetworkCloudKubernetesClusterFeatureCollection collection = networkCloudKubernetesCluster.GetNetworkCloudKubernetesClusterFeatures(); + + // invoke the operation + string featureName = "featureName"; + NullableResponse response = await collection.GetIfExistsAsync(featureName); + NetworkCloudKubernetesClusterFeatureResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkCloudKubernetesClusterFeatureData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create or update Kubernetes cluster feature + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateKubernetesClusterFeature() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Create.json + // this example is just showing the usage of "KubernetesClusterFeatures_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkCloudKubernetesClusterResource created on azure + // for more information of creating NetworkCloudKubernetesClusterResource, please refer to the document of NetworkCloudKubernetesClusterResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + string kubernetesClusterName = "kubernetesClusterName"; + ResourceIdentifier networkCloudKubernetesClusterResourceId = NetworkCloudKubernetesClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, kubernetesClusterName); + NetworkCloudKubernetesClusterResource networkCloudKubernetesCluster = client.GetNetworkCloudKubernetesClusterResource(networkCloudKubernetesClusterResourceId); + + // get the collection of this NetworkCloudKubernetesClusterFeatureResource + NetworkCloudKubernetesClusterFeatureCollection collection = networkCloudKubernetesCluster.GetNetworkCloudKubernetesClusterFeatures(); + + // invoke the operation + string featureName = "featureName"; + NetworkCloudKubernetesClusterFeatureData data = new NetworkCloudKubernetesClusterFeatureData(new AzureLocation("location")) + { + Options = +{ +new StringKeyValuePair("featureOptionName","featureOptionValue") +}, + Tags = +{ +["key1"] = "myvalue1", +["key2"] = "myvalue2", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, featureName, data); + NetworkCloudKubernetesClusterFeatureResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkCloudKubernetesClusterFeatureData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterFeatureResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterFeatureResource.cs new file mode 100644 index 0000000000000..2686d45a81d15 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterFeatureResource.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud.Samples +{ + public partial class Sample_NetworkCloudKubernetesClusterFeatureResource + { + // Get Kubernetes cluster feature + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetKubernetesClusterFeature() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Get.json + // this example is just showing the usage of "KubernetesClusterFeatures_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkCloudKubernetesClusterFeatureResource created on azure + // for more information of creating NetworkCloudKubernetesClusterFeatureResource, please refer to the document of NetworkCloudKubernetesClusterFeatureResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + string kubernetesClusterName = "kubernetesClusterName"; + string featureName = "featureName"; + ResourceIdentifier networkCloudKubernetesClusterFeatureResourceId = NetworkCloudKubernetesClusterFeatureResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, kubernetesClusterName, featureName); + NetworkCloudKubernetesClusterFeatureResource networkCloudKubernetesClusterFeature = client.GetNetworkCloudKubernetesClusterFeatureResource(networkCloudKubernetesClusterFeatureResourceId); + + // invoke the operation + NetworkCloudKubernetesClusterFeatureResource result = await networkCloudKubernetesClusterFeature.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkCloudKubernetesClusterFeatureData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete Kubernetes cluster feature + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteKubernetesClusterFeature() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Delete.json + // this example is just showing the usage of "KubernetesClusterFeatures_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkCloudKubernetesClusterFeatureResource created on azure + // for more information of creating NetworkCloudKubernetesClusterFeatureResource, please refer to the document of NetworkCloudKubernetesClusterFeatureResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + string kubernetesClusterName = "kubernetesClusterName"; + string featureName = "featureName"; + ResourceIdentifier networkCloudKubernetesClusterFeatureResourceId = NetworkCloudKubernetesClusterFeatureResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, kubernetesClusterName, featureName); + NetworkCloudKubernetesClusterFeatureResource networkCloudKubernetesClusterFeature = client.GetNetworkCloudKubernetesClusterFeatureResource(networkCloudKubernetesClusterFeatureResourceId); + + // invoke the operation + ArmOperation lro = await networkCloudKubernetesClusterFeature.DeleteAsync(WaitUntil.Completed); + NetworkCloudOperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // Patch Kubernetes cluster feature + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_PatchKubernetesClusterFeature() + { + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Patch.json + // this example is just showing the usage of "KubernetesClusterFeatures_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkCloudKubernetesClusterFeatureResource created on azure + // for more information of creating NetworkCloudKubernetesClusterFeatureResource, please refer to the document of NetworkCloudKubernetesClusterFeatureResource + string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + string resourceGroupName = "resourceGroupName"; + string kubernetesClusterName = "kubernetesClusterName"; + string featureName = "featureName"; + ResourceIdentifier networkCloudKubernetesClusterFeatureResourceId = NetworkCloudKubernetesClusterFeatureResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, kubernetesClusterName, featureName); + NetworkCloudKubernetesClusterFeatureResource networkCloudKubernetesClusterFeature = client.GetNetworkCloudKubernetesClusterFeatureResource(networkCloudKubernetesClusterFeatureResourceId); + + // invoke the operation + NetworkCloudKubernetesClusterFeaturePatch patch = new NetworkCloudKubernetesClusterFeaturePatch() + { + Tags = +{ +["key1"] = "myvalue1", +["key2"] = "myvalue2", +}, + Options = +{ +new StringKeyValuePair("featureOptionName","featureOptionValue") +}, + }; + ArmOperation lro = await networkCloudKubernetesClusterFeature.UpdateAsync(WaitUntil.Completed, patch); + NetworkCloudKubernetesClusterFeatureResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkCloudKubernetesClusterFeatureData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs index 687bad97837f0..8a8780efd903d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudKubernetesClusterResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkCloudKubernetesClusters_ListKubernetesClustersForSubscription() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_ListBySubscription.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_ListBySubscription.json // this example is just showing the usage of "KubernetesClusters_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetNetworkCloudKubernetesClusters_ListKubernetesClustersForSub [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetKubernetesCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Get.json // this example is just showing the usage of "KubernetesClusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,39 +79,12 @@ public async Task Get_GetKubernetesCluster() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Delete Kubernetes cluster - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteKubernetesCluster() - { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_Delete.json - // this example is just showing the usage of "KubernetesClusters_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkCloudKubernetesClusterResource created on azure - // for more information of creating NetworkCloudKubernetesClusterResource, please refer to the document of NetworkCloudKubernetesClusterResource - string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; - string resourceGroupName = "resourceGroupName"; - string kubernetesClusterName = "kubernetesClusterName"; - ResourceIdentifier networkCloudKubernetesClusterResourceId = NetworkCloudKubernetesClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, kubernetesClusterName); - NetworkCloudKubernetesClusterResource networkCloudKubernetesCluster = client.GetNetworkCloudKubernetesClusterResource(networkCloudKubernetesClusterResourceId); - - // invoke the operation - await networkCloudKubernetesCluster.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // Patch Kubernetes cluster [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchKubernetesCluster() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Patch.json // this example is just showing the usage of "KubernetesClusters_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,8 +108,19 @@ public async Task Update_PatchKubernetesCluster() ["key1"] = "myvalue1", ["key2"] = "myvalue2", }, - ControlPlaneNodeCount = 3L, - KubernetesVersion = "1.24.12", + AdministratorSshPublicKeys = +{ +new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm") +}, + ControlPlaneNodeConfiguration = new ControlPlaneNodePatchConfiguration() + { + AdministratorSshPublicKeys = +{ +new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm") +}, + Count = 3L, + }, + KubernetesVersion = "1.XX.Y", }; ArmOperation lro = await networkCloudKubernetesCluster.UpdateAsync(WaitUntil.Completed, patch); NetworkCloudKubernetesClusterResource result = lro.Value; @@ -153,7 +137,7 @@ public async Task Update_PatchKubernetesCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RestartNode_RestartAKubernetesClusterNode() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/KubernetesClusters_RestartNode.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_RestartNode.json // this example is just showing the usage of "KubernetesClusters_RestartNode" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL2NetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL2NetworkCollection.cs index 0a1f2a253284b..3f9a27c9ebaa4 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL2NetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL2NetworkCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudL2NetworkCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListL2NetworksForResourceGroup() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_ListByResourceGroup.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_ListByResourceGroup.json // this example is just showing the usage of "L2Networks_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListL2NetworksForResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetL2Network() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Get.json // this example is just showing the usage of "L2Networks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetL2Network() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetL2Network() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Get.json // this example is just showing the usage of "L2Networks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetL2Network() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetL2Network() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Get.json // this example is just showing the usage of "L2Networks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_GetL2Network() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateL2Network() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_Create.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Create.json // this example is just showing the usage of "L2Networks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL2NetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL2NetworkResource.cs index c4ea10ac9534e..86c9e403e2dd0 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL2NetworkResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL2NetworkResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudL2NetworkResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkCloudL2Networks_ListL2NetworksForSubscription() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_ListBySubscription.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_ListBySubscription.json // this example is just showing the usage of "L2Networks_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetNetworkCloudL2Networks_ListL2NetworksForSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetL2Network() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Get.json // this example is just showing the usage of "L2Networks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,39 +79,12 @@ public async Task Get_GetL2Network() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Delete L2 network - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteL2Network() - { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_Delete.json - // this example is just showing the usage of "L2Networks_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkCloudL2NetworkResource created on azure - // for more information of creating NetworkCloudL2NetworkResource, please refer to the document of NetworkCloudL2NetworkResource - string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; - string resourceGroupName = "resourceGroupName"; - string l2NetworkName = "l2NetworkName"; - ResourceIdentifier networkCloudL2NetworkResourceId = NetworkCloudL2NetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l2NetworkName); - NetworkCloudL2NetworkResource networkCloudL2Network = client.GetNetworkCloudL2NetworkResource(networkCloudL2NetworkResourceId); - - // invoke the operation - await networkCloudL2Network.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // Patch L2 network [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchL2Network() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L2Networks_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Patch.json // this example is just showing the usage of "L2Networks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL3NetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL3NetworkCollection.cs index 169e55e0590b7..1631292325129 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL3NetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL3NetworkCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudL3NetworkCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListL3NetworksForResourceGroup() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_ListByResourceGroup.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_ListByResourceGroup.json // this example is just showing the usage of "L3Networks_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListL3NetworksForResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetL3network() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Get.json // this example is just showing the usage of "L3Networks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetL3network() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetL3network() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Get.json // this example is just showing the usage of "L3Networks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetL3network() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetL3network() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Get.json // this example is just showing the usage of "L3Networks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_GetL3network() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateL3Network() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_Create.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Create.json // this example is just showing the usage of "L3Networks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL3NetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL3NetworkResource.cs index 040691000c348..b619841501c7a 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL3NetworkResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudL3NetworkResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudL3NetworkResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkCloudL3Networks_ListL3NetworksForSubscription() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_ListBySubscription.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_ListBySubscription.json // this example is just showing the usage of "L3Networks_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetNetworkCloudL3Networks_ListL3NetworksForSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetL3network() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Get.json // this example is just showing the usage of "L3Networks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,39 +79,12 @@ public async Task Get_GetL3network() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Delete L3 network - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteL3Network() - { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_Delete.json - // this example is just showing the usage of "L3Networks_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkCloudL3NetworkResource created on azure - // for more information of creating NetworkCloudL3NetworkResource, please refer to the document of NetworkCloudL3NetworkResource - string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; - string resourceGroupName = "resourceGroupName"; - string l3NetworkName = "l3NetworkName"; - ResourceIdentifier networkCloudL3NetworkResourceId = NetworkCloudL3NetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3NetworkName); - NetworkCloudL3NetworkResource networkCloudL3Network = client.GetNetworkCloudL3NetworkResource(networkCloudL3NetworkResourceId); - - // invoke the operation - await networkCloudL3Network.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // Patch L3 network [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchL3Network() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/L3Networks_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Patch.json // this example is just showing the usage of "L3Networks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackCollection.cs index 5b4f66680c776..9f4e8b05ba19d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkCloudRackCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRacksForResourceGroup() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Racks_ListByResourceGroup.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_ListByResourceGroup.json // this example is just showing the usage of "Racks_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListRacksForResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRack() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Racks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Get.json // this example is just showing the usage of "Racks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetRack() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRack() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Racks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Get.json // this example is just showing the usage of "Racks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetRack() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRack() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Racks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Get.json // this example is just showing the usage of "Racks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackResource.cs index 2cf60e7ff1b58..0e91ebb5cd47e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudRackResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkCloudRacks_ListRacksForSubscription() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Racks_ListBySubscription.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_ListBySubscription.json // this example is just showing the usage of "Racks_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetNetworkCloudRacks_ListRacksForSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRack() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Racks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Get.json // this example is just showing the usage of "Racks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetRack() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchRack() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Racks_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Patch.json // this example is just showing the usage of "Racks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackSkuCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackSkuCollection.cs index 1d3a7e289eab0..d900a4ab0c2fd 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackSkuCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackSkuCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkCloudRackSkuCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRackSKUsForSubscription() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/RackSkus_ListBySubscription.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_ListBySubscription.json // this example is just showing the usage of "RackSkus_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task GetAll_ListRackSKUsForSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRackSKUResource() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/RackSkus_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_Get.json // this example is just showing the usage of "RackSkus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Get_GetRackSKUResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRackSKUResource() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/RackSkus_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_Get.json // this example is just showing the usage of "RackSkus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Exists_GetRackSKUResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRackSKUResource() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/RackSkus_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_Get.json // this example is just showing the usage of "RackSkus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackSkuResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackSkuResource.cs index e30e960586e6d..455af30f7c303 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackSkuResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudRackSkuResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkCloudRackSkuResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRackSKUResource() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/RackSkus_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_Get.json // this example is just showing the usage of "RackSkus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceCollection.cs index 169ea48030dd7..a51b87d453596 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkCloudStorageApplianceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListStorageAppliancesForResourceGroup() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_ListByResourceGroup.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_ListByResourceGroup.json // this example is just showing the usage of "StorageAppliances_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListStorageAppliancesForResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetStorageAppliance() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Get.json // this example is just showing the usage of "StorageAppliances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetStorageAppliance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetStorageAppliance() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Get.json // this example is just showing the usage of "StorageAppliances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetStorageAppliance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetStorageAppliance() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Get.json // this example is just showing the usage of "StorageAppliances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceResource.cs index 3dcaefaf77326..7dd98404b14d6 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudStorageApplianceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkCloudStorageAppliances_ListStorageAppliancesForSubscription() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_ListBySubscription.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_ListBySubscription.json // this example is just showing the usage of "StorageAppliances_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetNetworkCloudStorageAppliances_ListStorageAppliancesForSubsc [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetStorageAppliance() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Get.json // this example is just showing the usage of "StorageAppliances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetStorageAppliance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchStorageAppliance() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Patch.json // this example is just showing the usage of "StorageAppliances_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Update_PatchStorageAppliance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DisableRemoteVendorManagement_TurnOffRemoteVendorManagementForStorageAppliance() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_DisableRemoteVendorManagement.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_DisableRemoteVendorManagement.json // this example is just showing the usage of "StorageAppliances_DisableRemoteVendorManagement" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -153,7 +153,7 @@ public async Task DisableRemoteVendorManagement_TurnOffRemoteVendorManagementFor [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task EnableRemoteVendorManagement_TurnOnRemoteVendorManagementForStorageAppliance() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/StorageAppliances_EnableRemoteVendorManagement.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_EnableRemoteVendorManagement.json // this example is just showing the usage of "StorageAppliances_EnableRemoteVendorManagement" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudTrunkedNetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudTrunkedNetworkCollection.cs index 747872702754a..4e7c781446e16 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudTrunkedNetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudTrunkedNetworkCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudTrunkedNetworkCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListTrunkedNetworksForResourceGroup() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_ListByResourceGroup.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_ListByResourceGroup.json // this example is just showing the usage of "TrunkedNetworks_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListTrunkedNetworksForResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetTrunkedNetwork() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Get.json // this example is just showing the usage of "TrunkedNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetTrunkedNetwork() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetTrunkedNetwork() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Get.json // this example is just showing the usage of "TrunkedNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetTrunkedNetwork() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetTrunkedNetwork() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Get.json // this example is just showing the usage of "TrunkedNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_GetTrunkedNetwork() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateTrunkedNetwork() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_Create.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Create.json // this example is just showing the usage of "TrunkedNetworks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudTrunkedNetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudTrunkedNetworkResource.cs index ec7d4489ea4c0..0932c5605efb8 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudTrunkedNetworkResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudTrunkedNetworkResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudTrunkedNetworkResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkCloudTrunkedNetworks_ListTrunkedNetworksForSubscription() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_ListBySubscription.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_ListBySubscription.json // this example is just showing the usage of "TrunkedNetworks_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetNetworkCloudTrunkedNetworks_ListTrunkedNetworksForSubscript [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetTrunkedNetwork() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Get.json // this example is just showing the usage of "TrunkedNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,39 +79,12 @@ public async Task Get_GetTrunkedNetwork() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Delete trunked network - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteTrunkedNetwork() - { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_Delete.json - // this example is just showing the usage of "TrunkedNetworks_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkCloudTrunkedNetworkResource created on azure - // for more information of creating NetworkCloudTrunkedNetworkResource, please refer to the document of NetworkCloudTrunkedNetworkResource - string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; - string resourceGroupName = "resourceGroupName"; - string trunkedNetworkName = "trunkedNetworkName"; - ResourceIdentifier networkCloudTrunkedNetworkResourceId = NetworkCloudTrunkedNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trunkedNetworkName); - NetworkCloudTrunkedNetworkResource networkCloudTrunkedNetwork = client.GetNetworkCloudTrunkedNetworkResource(networkCloudTrunkedNetworkResourceId); - - // invoke the operation - await networkCloudTrunkedNetwork.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // Patch trunked network [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchTrunkedNetwork() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/TrunkedNetworks_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Patch.json // this example is just showing the usage of "TrunkedNetworks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineCollection.cs index 4810c4733c25e..d34da3221ccfa 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudVirtualMachineCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListVirtualMachinesForResourceGroup() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_ListByResourceGroup.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_ListByResourceGroup.json // this example is just showing the usage of "VirtualMachines_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListVirtualMachinesForResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Get.json // this example is just showing the usage of "VirtualMachines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetVirtualMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetVirtualMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Get.json // this example is just showing the usage of "VirtualMachines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetVirtualMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetVirtualMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Get.json // this example is just showing the usage of "VirtualMachines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_GetVirtualMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateVirtualMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Create.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Create.json // this example is just showing the usage of "VirtualMachines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -183,7 +183,7 @@ public async Task CreateOrUpdate_CreateOrUpdateVirtualMachine() // invoke the operation string virtualMachineName = "virtualMachineName"; - NetworkCloudVirtualMachineData data = new NetworkCloudVirtualMachineData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), "username", new NetworkAttachment("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", VirtualMachineIPAllocationMethod.Dynamic), 2L, 8L, new NetworkCloudStorageProfile(new NetworkCloudOSDisk(120L) + NetworkCloudVirtualMachineData data = new NetworkCloudVirtualMachineData(new AzureLocation("location"), new ExtendedLocation("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", "CustomLocation"), "username", new NetworkAttachment(new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName"), VirtualMachineIPAllocationMethod.Dynamic), 2L, 8L, new NetworkCloudStorageProfile(new NetworkCloudOSDisk(120L) { CreateOption = OSDiskCreateOption.Ephemeral, DeleteOption = OSDiskDeleteOption.Delete, @@ -198,7 +198,7 @@ public async Task CreateOrUpdate_CreateOrUpdateVirtualMachine() BootMethod = VirtualMachineBootMethod.Uefi, NetworkAttachments = { -new NetworkAttachment("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName",VirtualMachineIPAllocationMethod.Dynamic) +new NetworkAttachment(new ResourceIdentifier("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"),VirtualMachineIPAllocationMethod.Dynamic) { DefaultGateway = DefaultGateway.True, IPv4Address = "198.51.100.1", diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineConsoleCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineConsoleCollection.cs index cf47dfcc2e371..b042214a5b614 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineConsoleCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineConsoleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkCloudVirtualMachineConsoleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListConsolesOfTheVirtualMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Consoles_ListByVirtualMachine.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_ListByVirtualMachine.json // this example is just showing the usage of "Consoles_ListByVirtualMachine" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListConsolesOfTheVirtualMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualMachineConsole() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Consoles_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Get.json // this example is just showing the usage of "Consoles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetVirtualMachineConsole() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetVirtualMachineConsole() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Consoles_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Get.json // this example is just showing the usage of "Consoles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetVirtualMachineConsole() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetVirtualMachineConsole() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Consoles_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Get.json // this example is just showing the usage of "Consoles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetVirtualMachineConsole() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateVirtualMachineConsole() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Consoles_Create.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Create.json // this example is just showing the usage of "Consoles_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineConsoleResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineConsoleResource.cs index 1f489cd2ec785..9919d2c37f102 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineConsoleResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineConsoleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkCloudVirtualMachineConsoleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualMachineConsole() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Consoles_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Get.json // this example is just showing the usage of "Consoles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,40 +47,12 @@ public async Task Get_GetVirtualMachineConsole() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Delete virtual machine console - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteVirtualMachineConsole() - { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Consoles_Delete.json - // this example is just showing the usage of "Consoles_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkCloudVirtualMachineConsoleResource created on azure - // for more information of creating NetworkCloudVirtualMachineConsoleResource, please refer to the document of NetworkCloudVirtualMachineConsoleResource - string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; - string resourceGroupName = "resourceGroupName"; - string virtualMachineName = "virtualMachineName"; - string consoleName = "default"; - ResourceIdentifier networkCloudVirtualMachineConsoleResourceId = NetworkCloudVirtualMachineConsoleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualMachineName, consoleName); - NetworkCloudVirtualMachineConsoleResource networkCloudVirtualMachineConsole = client.GetNetworkCloudVirtualMachineConsoleResource(networkCloudVirtualMachineConsoleResourceId); - - // invoke the operation - await networkCloudVirtualMachineConsole.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // Patch virtual machine console [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchVirtualMachineConsole() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Consoles_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Patch.json // this example is just showing the usage of "Consoles_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineResource.cs index f992c10792f03..d6546691dd99d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudVirtualMachineResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkCloudVirtualMachines_ListVirtualMachinesForSubscription() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_ListBySubscription.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_ListBySubscription.json // this example is just showing the usage of "VirtualMachines_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetNetworkCloudVirtualMachines_ListVirtualMachinesForSubscript [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Get.json // this example is just showing the usage of "VirtualMachines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,39 +79,12 @@ public async Task Get_GetVirtualMachine() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Delete virtual machine - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteVirtualMachine() - { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Delete.json - // this example is just showing the usage of "VirtualMachines_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkCloudVirtualMachineResource created on azure - // for more information of creating NetworkCloudVirtualMachineResource, please refer to the document of NetworkCloudVirtualMachineResource - string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; - string resourceGroupName = "resourceGroupName"; - string virtualMachineName = "virtualMachineName"; - ResourceIdentifier networkCloudVirtualMachineResourceId = NetworkCloudVirtualMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualMachineName); - NetworkCloudVirtualMachineResource networkCloudVirtualMachine = client.GetNetworkCloudVirtualMachineResource(networkCloudVirtualMachineResourceId); - - // invoke the operation - await networkCloudVirtualMachine.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // Patch virtual machine [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchVirtualMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Patch.json // this example is just showing the usage of "VirtualMachines_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -155,7 +128,7 @@ public async Task Update_PatchVirtualMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PowerOff_PowerOffVirtualMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_PowerOff.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_PowerOff.json // this example is just showing the usage of "VirtualMachines_PowerOff" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,7 +160,7 @@ public async Task PowerOff_PowerOffVirtualMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Reimage_ReimageVirtualMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Reimage.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Reimage.json // this example is just showing the usage of "VirtualMachines_Reimage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -215,7 +188,7 @@ public async Task Reimage_ReimageVirtualMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Restart_RestartVirtualMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Restart.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Restart.json // this example is just showing the usage of "VirtualMachines_Restart" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +216,7 @@ public async Task Restart_RestartVirtualMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Start_StartVirtualMachine() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/VirtualMachines_Start.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Start.json // this example is just showing the usage of "VirtualMachines_Start" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVolumeCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVolumeCollection.cs index d6df6aeb4c8c0..dfd403a08fdf2 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVolumeCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVolumeCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudVolumeCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListVolumesForResourceGroup() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_ListByResourceGroup.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_ListByResourceGroup.json // this example is just showing the usage of "Volumes_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListVolumesForResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVolume() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Get.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetVolume() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetVolume() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Get.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetVolume() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetVolume() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Get.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_GetVolume() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateVolume() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_Create.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Create.json // this example is just showing the usage of "Volumes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVolumeResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVolumeResource.cs index 541dfc8f41a2d..7db9a3f4c5ca4 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVolumeResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVolumeResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkCloudVolumeResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkCloudVolumes_ListVolumeForSubscription() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_ListBySubscription.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_ListBySubscription.json // this example is just showing the usage of "Volumes_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetNetworkCloudVolumes_ListVolumeForSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVolume() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_Get.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Get.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,39 +79,12 @@ public async Task Get_GetVolume() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Delete volume - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteVolume() - { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_Delete.json - // this example is just showing the usage of "Volumes_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkCloudVolumeResource created on azure - // for more information of creating NetworkCloudVolumeResource, please refer to the document of NetworkCloudVolumeResource - string subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; - string resourceGroupName = "resourceGroupName"; - string volumeName = "volumeName"; - ResourceIdentifier networkCloudVolumeResourceId = NetworkCloudVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, volumeName); - NetworkCloudVolumeResource networkCloudVolume = client.GetNetworkCloudVolumeResource(networkCloudVolumeResourceId); - - // invoke the operation - await networkCloudVolume.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - // Patch volume [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchVolume() { - // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2023-07-01/examples/Volumes_Patch.json + // Generated from example definition: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Patch.json // this example is just showing the usage of "Volumes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/ArmNetworkCloudModelFactory.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/ArmNetworkCloudModelFactory.cs new file mode 100644 index 0000000000000..1a8cd10c1e422 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/ArmNetworkCloudModelFactory.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Net; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public static partial class ArmNetworkCloudModelFactory + { + /// Initializes a new instance of . + /// The resource ID of the agent pool that this node belongs to. This value is not represented on control plane nodes. + /// The availability zone this node is running within. + /// The resource ID of the bare metal machine that hosts this node. + /// The number of CPU cores configured for this node, derived from the VM SKU specified. + /// The detailed state of this node. + /// The descriptive message about the current detailed status. + /// The size of the disk configured for this node. + /// The machine image used to deploy this node. + /// The currently running version of Kubernetes and bundled features running on this node. + /// The list of labels on this node that have been assigned to the agent pool containing this node. + /// The amount of memory configured for this node, derived from the vm SKU specified. + /// The mode of the agent pool containing this node. Not applicable for control plane nodes. + /// The name of this node, as realized in the Kubernetes cluster. + /// The NetworkAttachments made to this node. + /// The power state of this node. + /// The role of this node in the cluster. + /// The list of taints that have been assigned to the agent pool containing this node. + /// The VM SKU name that was used to create this cluster node. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static KubernetesClusterNode KubernetesClusterNode(string agentPoolId = null, string availabilityZone = null, string bareMetalMachineId = null, long? cpuCores = null, KubernetesClusterNodeDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, long? diskSizeGB = null, string image = null, string kubernetesVersion = null, IEnumerable labels = null, long? memorySizeGB = null, NetworkCloudAgentPoolMode? mode = null, string name = null, IEnumerable networkAttachments = null, KubernetesNodePowerState? powerState = null, KubernetesNodeRole? role = null, IEnumerable taints = null, string vmSkuName = null) + { + labels ??= new List(); + networkAttachments ??= new List(); + taints ??= new List(); + + return new KubernetesClusterNode( + new ResourceIdentifier(agentPoolId), + availabilityZone, + new ResourceIdentifier(bareMetalMachineId), + cpuCores, + detailedStatus, + detailedStatusMessage, + diskSizeGB, + image, + kubernetesVersion, + labels?.ToList(), + memorySizeGB, + mode, + name, + networkAttachments?.ToList(), + powerState, + role, + taints?.ToList(), + vmSkuName, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The extended location of the cluster associated with the resource. + /// The administrator credentials to be used for the nodes in this agent pool. + /// The configurations that will be applied to each agent in this agent pool. + /// The configuration of networks being attached to the agent pool for use by the workloads that run on this Kubernetes cluster. + /// The list of availability zones of the Network Cloud cluster used for the provisioning of nodes in this agent pool. If not specified, all availability zones will be used. + /// The number of virtual machines that use this configuration. + /// The current status of the agent pool. + /// The descriptive message about the current detailed status. + /// The Kubernetes version running in this agent pool. + /// The labels applied to the nodes in this agent pool. + /// The selection of how this agent pool is utilized, either as a system pool or a user pool. System pools run the features and critical services for the Kubernetes Cluster, while user pools are dedicated to user workloads. Every Kubernetes cluster must contain at least one system node pool with at least one node. + /// The provisioning state of the agent pool. + /// The taints applied to the nodes in this agent pool. + /// The configuration of the agent pool. + /// The name of the VM SKU that determines the size of resources allocated for node VMs. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetworkCloudAgentPoolData NetworkCloudAgentPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, AdministratorConfiguration administratorConfiguration = null, NetworkCloudAgentConfiguration agentOptions = null, AttachedNetworkConfiguration attachedNetworkConfiguration = null, IEnumerable availabilityZones = null, long count = default, AgentPoolDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, string kubernetesVersion = null, IEnumerable labels = null, NetworkCloudAgentPoolMode mode = default, AgentPoolProvisioningState? provisioningState = null, IEnumerable taints = null, string upgradeMaxSurge = null, string vmSkuName = null) + { + tags ??= new Dictionary(); + availabilityZones ??= new List(); + labels ??= new List(); + taints ??= new List(); + + return new NetworkCloudAgentPoolData( + id, + name, + resourceType, + systemData, + tags, + location, + extendedLocation, + administratorConfiguration, + agentOptions, + attachedNetworkConfiguration, + availabilityZones?.ToList(), + count, + detailedStatus, + detailedStatusMessage, + kubernetesVersion, + labels?.ToList(), + mode, + provisioningState, + taints?.ToList(), + new AgentPoolUpgradeSettings() + { + MaxSurge = upgradeMaxSurge + }, + vmSkuName, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// The resource ID of the associated network attached to the virtual machine. + /// It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources. + /// + /// + /// The indicator of whether this is the default gateway. + /// Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be specified as True. + /// + /// + /// The IP allocation mechanism for the virtual machine. + /// Dynamic and Static are only valid for l3Network which may also specify Disabled. + /// Otherwise, Disabled is the only permitted value. + /// + /// + /// The IPv4 address of the virtual machine. + /// + /// This field is used only if the attached network has IPAllocationType of IPV4 or DualStack. + /// + /// If IPAllocationMethod is: + /// Static - this field must contain a user specified IPv4 address from within the subnet specified in the attached network. + /// Dynamic - this field is read-only, but will be populated with an address from within the subnet specified in the attached network. + /// Disabled - this field will be empty. + /// + /// + /// The IPv6 address of the virtual machine. + /// + /// This field is used only if the attached network has IPAllocationType of IPV6 or DualStack. + /// + /// If IPAllocationMethod is: + /// Static - this field must contain an IPv6 address range from within the range specified in the attached network. + /// Dynamic - this field is read-only, but will be populated with an range from within the subnet specified in the attached network. + /// Disabled - this field will be empty. + /// + /// The MAC address of the interface for the virtual machine that corresponds to this network attachment. + /// + /// The associated network's interface name. + /// If specified, the network attachment name has a maximum length of 15 characters and must be unique to this virtual machine. + /// If the user doesn’t specify this value, the default interface name of the network resource will be used. + /// For a CloudServicesNetwork resource, this name will be ignored. + /// + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetworkAttachment NetworkAttachment(string attachedNetworkId = null, DefaultGateway? defaultGateway = null, VirtualMachineIPAllocationMethod ipAllocationMethod = default, string ipv4Address = null, string ipv6Address = null, string macAddress = null, string networkAttachmentName = null) + { + return new NetworkAttachment( + new ResourceIdentifier(attachedNetworkId), + defaultGateway, + ipAllocationMethod, + ipv4Address, + ipv6Address, + macAddress, + networkAttachmentName, + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/NetworkCloudArmOperation.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/LongRunningOperation/CustomNetworkCloudArmOperation.cs similarity index 85% rename from sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/NetworkCloudArmOperation.cs rename to sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/LongRunningOperation/CustomNetworkCloudArmOperation.cs index af79bc8b55856..3ea18e01fd379 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/NetworkCloudArmOperation.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/LongRunningOperation/CustomNetworkCloudArmOperation.cs @@ -1,8 +1,6 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -16,7 +14,7 @@ namespace Azure.ResourceManager.NetworkCloud { #pragma warning disable SA1649 // File name should match first type name - internal class NetworkCloudArmOperation : ArmOperation + internal class CustomNetworkCloudArmOperation : ArmOperation #pragma warning restore SA1649 // File name should match first type name { private readonly OperationInternal _operation; @@ -24,19 +22,19 @@ internal class NetworkCloudArmOperation : ArmOperation private readonly NextLinkOperationImplementation _nextLinkOperation; private readonly string _operationId; - /// Initializes a new instance of NetworkCloudArmOperation for mocking. - protected NetworkCloudArmOperation() + /// Initializes a new instance of CustomNetworkCloudArmOperation for mocking. + protected CustomNetworkCloudArmOperation() { } - internal NetworkCloudArmOperation(Response response, RehydrationToken? rehydrationToken = null) + internal CustomNetworkCloudArmOperation(Response response, RehydrationToken? rehydrationToken = null) { _operation = OperationInternal.Succeeded(response); _completeRehydrationToken = rehydrationToken; _operationId = GetOperationId(rehydrationToken); } - internal NetworkCloudArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + internal CustomNetworkCloudArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) { var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/InitialAgentPoolConfiguration.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/InitialAgentPoolConfiguration.cs new file mode 100644 index 0000000000000..f2df9038b7349 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/InitialAgentPoolConfiguration.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class InitialAgentPoolConfiguration + { + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. + [EditorBrowsable(EditorBrowsableState.Never)] + public string UpgradeMaxSurge + { + get => UpgradeSettings is null ? default : UpgradeSettings.MaxSurge; + set + { + if (UpgradeSettings is null) + UpgradeSettings = new AgentPoolUpgradeSettings(); + UpgradeSettings.MaxSurge = value; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/KubernetesClusterNode.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/KubernetesClusterNode.cs new file mode 100644 index 0000000000000..e35d1ac54f677 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/KubernetesClusterNode.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class KubernetesClusterNode + { + /// The resource ID of the bare metal machine that hosts this node. + [EditorBrowsable(EditorBrowsableState.Never)] + public string BareMetalMachineId + { + get => BareMetalMachineArmId is null ? default : BareMetalMachineArmId.ToString(); + } + + /// The resource ID of the agent pool that this node belongs to. This value is not represented on control plane nodes. + [EditorBrowsable(EditorBrowsableState.Never)] + public string AgentPoolId + { + get => AgentPoolArmId is null ? default : AgentPoolArmId.ToString(); + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/NetworkAttachment.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/NetworkAttachment.cs new file mode 100644 index 0000000000000..ba6892db84d07 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/NetworkAttachment.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class NetworkAttachment + { + /// Initializes a new instance of . + /// + /// The resource ID of the associated network attached to the virtual machine. + /// It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources. + /// + /// + /// The IP allocation mechanism for the virtual machine. + /// Dynamic and Static are only valid for l3Network which may also specify Disabled. + /// Otherwise, Disabled is the only permitted value. + /// + /// is null. + public NetworkAttachment(string attachedNetworkId, VirtualMachineIPAllocationMethod ipAllocationMethod) + { + Argument.AssertNotNull(attachedNetworkId, nameof(attachedNetworkId)); + + AttachedNetworkId = attachedNetworkId; + IPAllocationMethod = ipAllocationMethod; + } + + /// + /// The resource ID of the associated network attached to the virtual machine. + /// It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public string AttachedNetworkId + { + get => AttachedNetworkArmId is null ? default : AttachedNetworkArmId.ToString(); + set + { + AttachedNetworkArmId = new ResourceIdentifier(value); + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/NetworkCloudAgentPoolPatch.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/NetworkCloudAgentPoolPatch.cs new file mode 100644 index 0000000000000..79844ac92cda4 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/NetworkCloudAgentPoolPatch.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class NetworkCloudAgentPoolPatch + { + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. + [EditorBrowsable(EditorBrowsableState.Never)] + public string UpgradeMaxSurge + { + get => UpgradeSettings is null ? default : UpgradeSettings.MaxSurge; + set + { + if (UpgradeSettings is null) + UpgradeSettings = new AgentPoolUpgradeSettings(); + UpgradeSettings.MaxSurge = value; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/NetworkCloudKubernetesClusterPatch.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/NetworkCloudKubernetesClusterPatch.cs new file mode 100644 index 0000000000000..f1e1ccd46a782 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/Models/NetworkCloudKubernetesClusterPatch.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class NetworkCloudKubernetesClusterPatch + { + /// The number of virtual machines that use this configuration. + [EditorBrowsable(EditorBrowsableState.Never)] + public long? ControlPlaneNodeCount + { + get => ControlPlaneNodeConfiguration is null ? default : ControlPlaneNodeConfiguration.Count; + set + { + if (ControlPlaneNodeConfiguration is null) + ControlPlaneNodeConfiguration = new ControlPlaneNodePatchConfiguration(); + ControlPlaneNodeConfiguration.Count = value; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolData.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolData.cs new file mode 100644 index 0000000000000..cd7fe75c4a636 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolData.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudAgentPoolData + { + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. + [EditorBrowsable(EditorBrowsableState.Never)] + public string UpgradeMaxSurge + { + get => UpgradeSettings is null ? default : UpgradeSettings.MaxSurge; + set + { + if (UpgradeSettings is null) + UpgradeSettings = new AgentPoolUpgradeSettings(); + UpgradeSettings.MaxSurge = value; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolResource.cs new file mode 100644 index 0000000000000..22c2cc46d0653 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudAgentPoolResource.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudAgentPoolResource + { + /// + /// Delete the provided Kubernetes cluster agent pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName} + /// + /// + /// Operation Id + /// AgentPools_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudAgentPoolAgentPoolsClientDiagnostics.CreateScope("NetworkCloudAgentPoolResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudAgentPoolAgentPoolsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudAgentPoolAgentPoolsClientDiagnostics, Pipeline, _networkCloudAgentPoolAgentPoolsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided Kubernetes cluster agent pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName} + /// + /// + /// Operation Id + /// AgentPools_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudAgentPoolAgentPoolsClientDiagnostics.CreateScope("NetworkCloudAgentPoolResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudAgentPoolAgentPoolsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudAgentPoolAgentPoolsClientDiagnostics, Pipeline, _networkCloudAgentPoolAgentPoolsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided Kubernetes cluster agent pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName} + /// + /// + /// Operation Id + /// AgentPools_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudAgentPoolAgentPoolsClientDiagnostics.CreateScope("NetworkCloudAgentPoolResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudAgentPoolAgentPoolsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CustomNetworkCloudArmOperation(_networkCloudAgentPoolAgentPoolsClientDiagnostics, Pipeline, _networkCloudAgentPoolAgentPoolsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided Kubernetes cluster agent pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName} + /// + /// + /// Operation Id + /// AgentPools_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable (EditorBrowsableState.Never)] + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudAgentPoolAgentPoolsClientDiagnostics.CreateScope("NetworkCloudAgentPoolResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudAgentPoolAgentPoolsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new CustomNetworkCloudArmOperation(_networkCloudAgentPoolAgentPoolsClientDiagnostics, Pipeline, _networkCloudAgentPoolAgentPoolsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineKeySetResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineKeySetResource.cs new file mode 100644 index 0000000000000..928b99c4ac40b --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBareMetalMachineKeySetResource.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudBareMetalMachineKeySetResource + { + /// + /// Delete the bare metal machine key set of the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName} + /// + /// + /// Operation Id + /// BareMetalMachineKeySets_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineKeySetResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics, Pipeline, _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the bare metal machine key set of the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName} + /// + /// + /// Operation Id + /// BareMetalMachineKeySets_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineKeySetResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics, Pipeline, _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the bare metal machine key set of the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName} + /// + /// + /// Operation Id + /// BareMetalMachineKeySets_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineKeySetResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CustomNetworkCloudArmOperation(_networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics, Pipeline, _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the bare metal machine key set of the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName} + /// + /// + /// Operation Id + /// BareMetalMachineKeySets_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineKeySetResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new CustomNetworkCloudArmOperation(_networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics, Pipeline, _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBmcKeySetResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBmcKeySetResource.cs new file mode 100644 index 0000000000000..6ed10d51b212d --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudBmcKeySetResource.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudBmcKeySetResource + { + /// + /// Delete the baseboard management controller key set of the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName} + /// + /// + /// Operation Id + /// BmcKeySets_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudBmcKeySetBmcKeySetsClientDiagnostics.CreateScope("NetworkCloudBmcKeySetResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudBmcKeySetBmcKeySetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBmcKeySetBmcKeySetsClientDiagnostics, Pipeline, _networkCloudBmcKeySetBmcKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the baseboard management controller key set of the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName} + /// + /// + /// Operation Id + /// BmcKeySets_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudBmcKeySetBmcKeySetsClientDiagnostics.CreateScope("NetworkCloudBmcKeySetResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudBmcKeySetBmcKeySetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBmcKeySetBmcKeySetsClientDiagnostics, Pipeline, _networkCloudBmcKeySetBmcKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the baseboard management controller key set of the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName} + /// + /// + /// Operation Id + /// BmcKeySets_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudBmcKeySetBmcKeySetsClientDiagnostics.CreateScope("NetworkCloudBmcKeySetResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudBmcKeySetBmcKeySetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CustomNetworkCloudArmOperation(_networkCloudBmcKeySetBmcKeySetsClientDiagnostics, Pipeline, _networkCloudBmcKeySetBmcKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the baseboard management controller key set of the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName} + /// + /// + /// Operation Id + /// BmcKeySets_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudBmcKeySetBmcKeySetsClientDiagnostics.CreateScope("NetworkCloudBmcKeySetResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudBmcKeySetBmcKeySetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new CustomNetworkCloudArmOperation(_networkCloudBmcKeySetBmcKeySetsClientDiagnostics, Pipeline, _networkCloudBmcKeySetBmcKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudCloudServicesNetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudCloudServicesNetworkResource.cs new file mode 100644 index 0000000000000..07410a2c3d7d8 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudCloudServicesNetworkResource.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudCloudServicesNetworkResource + { + /// + /// Delete the provided cloud services network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName} + /// + /// + /// Operation Id + /// CloudServicesNetworks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics.CreateScope("NetworkCloudCloudServicesNetworkResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics, Pipeline, _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided cloud services network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName} + /// + /// + /// Operation Id + /// CloudServicesNetworks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics.CreateScope("NetworkCloudCloudServicesNetworkResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics, Pipeline, _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided cloud services network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName} + /// + /// + /// Operation Id + /// CloudServicesNetworks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics.CreateScope("NetworkCloudCloudServicesNetworkResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CustomNetworkCloudArmOperation(_networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics, Pipeline, _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided cloud services network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName} + /// + /// + /// Operation Id + /// CloudServicesNetworks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics.CreateScope("NetworkCloudCloudServicesNetworkResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new CustomNetworkCloudArmOperation(_networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics, Pipeline, _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterManagerResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterManagerResource.cs new file mode 100644 index 0000000000000..0b36a1dca4469 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterManagerResource.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudClusterManagerResource + { + /// + /// Delete the provided cluster manager. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName} + /// + /// + /// Operation Id + /// ClusterManagers_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudClusterManagerClusterManagersClientDiagnostics.CreateScope("NetworkCloudClusterManagerResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudClusterManagerClusterManagersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterManagerClusterManagersClientDiagnostics, Pipeline, _networkCloudClusterManagerClusterManagersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided cluster manager. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName} + /// + /// + /// Operation Id + /// ClusterManagers_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudClusterManagerClusterManagersClientDiagnostics.CreateScope("NetworkCloudClusterManagerResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudClusterManagerClusterManagersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterManagerClusterManagersClientDiagnostics, Pipeline, _networkCloudClusterManagerClusterManagersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided cluster manager. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName} + /// + /// + /// Operation Id + /// ClusterManagers_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudClusterManagerClusterManagersClientDiagnostics.CreateScope("NetworkCloudClusterManagerResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudClusterManagerClusterManagersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CustomNetworkCloudArmOperation(_networkCloudClusterManagerClusterManagersClientDiagnostics, Pipeline, _networkCloudClusterManagerClusterManagersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided cluster manager. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName} + /// + /// + /// Operation Id + /// ClusterManagers_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudClusterManagerClusterManagersClientDiagnostics.CreateScope("NetworkCloudClusterManagerResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudClusterManagerClusterManagersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new CustomNetworkCloudArmOperation(_networkCloudClusterManagerClusterManagersClientDiagnostics, Pipeline, _networkCloudClusterManagerClusterManagersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterMetricsConfigurationResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterMetricsConfigurationResource.cs new file mode 100644 index 0000000000000..2903009e3328a --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterMetricsConfigurationResource.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudClusterMetricsConfigurationResource + { + /// + /// Delete the metrics configuration of the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName} + /// + /// + /// Operation Id + /// MetricsConfigurations_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics.CreateScope("NetworkCloudClusterMetricsConfigurationResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics, Pipeline, _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the metrics configuration of the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName} + /// + /// + /// Operation Id + /// MetricsConfigurations_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics.CreateScope("NetworkCloudClusterMetricsConfigurationResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics, Pipeline, _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the metrics configuration of the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName} + /// + /// + /// Operation Id + /// MetricsConfigurations_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics.CreateScope("NetworkCloudClusterMetricsConfigurationResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CustomNetworkCloudArmOperation(_networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics, Pipeline, _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the metrics configuration of the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName} + /// + /// + /// Operation Id + /// MetricsConfigurations_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics.CreateScope("NetworkCloudClusterMetricsConfigurationResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new CustomNetworkCloudArmOperation(_networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics, Pipeline, _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterResource.cs new file mode 100644 index 0000000000000..59afbbe7361a3 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudClusterResource.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudClusterResource + { + /// + /// Delete the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName} + /// + /// + /// Operation Id + /// Clusters_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudClusterClustersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName} + /// + /// + /// Operation Id + /// Clusters_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudClusterClustersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName} + /// + /// + /// Operation Id + /// Clusters_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudClusterClustersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CustomNetworkCloudArmOperation(_networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName} + /// + /// + /// Operation Id + /// Clusters_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudClusterClustersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new CustomNetworkCloudArmOperation(_networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterResource.cs new file mode 100644 index 0000000000000..c8acdd78fca33 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudKubernetesClusterResource.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudKubernetesClusterResource + { + /// + /// Delete the provided Kubernetes cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName} + /// + /// + /// Operation Id + /// KubernetesClusters_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudKubernetesClusterKubernetesClustersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided Kubernetes cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName} + /// + /// + /// Operation Id + /// KubernetesClusters_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudKubernetesClusterKubernetesClustersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided Kubernetes cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName} + /// + /// + /// Operation Id + /// KubernetesClusters_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudKubernetesClusterKubernetesClustersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CustomNetworkCloudArmOperation(_networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided Kubernetes cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName} + /// + /// + /// Operation Id + /// KubernetesClusters_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudKubernetesClusterKubernetesClustersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new CustomNetworkCloudArmOperation(_networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL2NetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL2NetworkResource.cs new file mode 100644 index 0000000000000..e90482787ef58 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL2NetworkResource.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudL2NetworkResource + { + /// + /// Delete the provided layer 2 (L2) network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName} + /// + /// + /// Operation Id + /// L2Networks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudL2NetworkL2NetworksClientDiagnostics.CreateScope("NetworkCloudL2NetworkResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudL2NetworkL2NetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudL2NetworkL2NetworksClientDiagnostics, Pipeline, _networkCloudL2NetworkL2NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided layer 2 (L2) network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName} + /// + /// + /// Operation Id + /// L2Networks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudL2NetworkL2NetworksClientDiagnostics.CreateScope("NetworkCloudL2NetworkResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudL2NetworkL2NetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudL2NetworkL2NetworksClientDiagnostics, Pipeline, _networkCloudL2NetworkL2NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided layer 2 (L2) network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName} + /// + /// + /// Operation Id + /// L2Networks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudL2NetworkL2NetworksClientDiagnostics.CreateScope("NetworkCloudL2NetworkResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudL2NetworkL2NetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CustomNetworkCloudArmOperation(_networkCloudL2NetworkL2NetworksClientDiagnostics, Pipeline, _networkCloudL2NetworkL2NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided layer 2 (L2) network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName} + /// + /// + /// Operation Id + /// L2Networks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudL2NetworkL2NetworksClientDiagnostics.CreateScope("NetworkCloudL2NetworkResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudL2NetworkL2NetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new CustomNetworkCloudArmOperation(_networkCloudL2NetworkL2NetworksClientDiagnostics, Pipeline, _networkCloudL2NetworkL2NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL3NetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL3NetworkResource.cs new file mode 100644 index 0000000000000..7b4c76cd6f73e --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudL3NetworkResource.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudL3NetworkResource + { + /// + /// Delete the provided layer 3 (L3) network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName} + /// + /// + /// Operation Id + /// L3Networks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudL3NetworkL3NetworksClientDiagnostics.CreateScope("NetworkCloudL3NetworkResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudL3NetworkL3NetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudL3NetworkL3NetworksClientDiagnostics, Pipeline, _networkCloudL3NetworkL3NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided layer 3 (L3) network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName} + /// + /// + /// Operation Id + /// L3Networks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudL3NetworkL3NetworksClientDiagnostics.CreateScope("NetworkCloudL3NetworkResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudL3NetworkL3NetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudL3NetworkL3NetworksClientDiagnostics, Pipeline, _networkCloudL3NetworkL3NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided layer 3 (L3) network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName} + /// + /// + /// Operation Id + /// L3Networks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudL3NetworkL3NetworksClientDiagnostics.CreateScope("NetworkCloudL3NetworkResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudL3NetworkL3NetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CustomNetworkCloudArmOperation(_networkCloudL3NetworkL3NetworksClientDiagnostics, Pipeline, _networkCloudL3NetworkL3NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided layer 3 (L3) network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName} + /// + /// + /// Operation Id + /// L3Networks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudL3NetworkL3NetworksClientDiagnostics.CreateScope("NetworkCloudL3NetworkResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudL3NetworkL3NetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new CustomNetworkCloudArmOperation(_networkCloudL3NetworkL3NetworksClientDiagnostics, Pipeline, _networkCloudL3NetworkL3NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudTrunkedNetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudTrunkedNetworkResource.cs new file mode 100644 index 0000000000000..604cf37487e83 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudTrunkedNetworkResource.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudTrunkedNetworkResource + { + /// + /// Delete the provided trunked network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName} + /// + /// + /// Operation Id + /// TrunkedNetworks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics.CreateScope("NetworkCloudTrunkedNetworkResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudTrunkedNetworkTrunkedNetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics, Pipeline, _networkCloudTrunkedNetworkTrunkedNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided trunked network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName} + /// + /// + /// Operation Id + /// TrunkedNetworks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics.CreateScope("NetworkCloudTrunkedNetworkResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudTrunkedNetworkTrunkedNetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics, Pipeline, _networkCloudTrunkedNetworkTrunkedNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided trunked network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName} + /// + /// + /// Operation Id + /// TrunkedNetworks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics.CreateScope("NetworkCloudTrunkedNetworkResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudTrunkedNetworkTrunkedNetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CustomNetworkCloudArmOperation(_networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics, Pipeline, _networkCloudTrunkedNetworkTrunkedNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided trunked network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName} + /// + /// + /// Operation Id + /// TrunkedNetworks_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics.CreateScope("NetworkCloudTrunkedNetworkResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudTrunkedNetworkTrunkedNetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new CustomNetworkCloudArmOperation(_networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics, Pipeline, _networkCloudTrunkedNetworkTrunkedNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineConsoleResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineConsoleResource.cs new file mode 100644 index 0000000000000..31e0910665256 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineConsoleResource.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudVirtualMachineConsoleResource + { + /// + /// Delete the provided virtual machine console. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName} + /// + /// + /// Operation Id + /// Consoles_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudVirtualMachineConsoleConsolesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineConsoleResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudVirtualMachineConsoleConsolesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineConsoleConsolesClientDiagnostics, Pipeline, _networkCloudVirtualMachineConsoleConsolesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided virtual machine console. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName} + /// + /// + /// Operation Id + /// Consoles_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudVirtualMachineConsoleConsolesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineConsoleResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudVirtualMachineConsoleConsolesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineConsoleConsolesClientDiagnostics, Pipeline, _networkCloudVirtualMachineConsoleConsolesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided virtual machine console. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName} + /// + /// + /// Operation Id + /// Consoles_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudVirtualMachineConsoleConsolesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineConsoleResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudVirtualMachineConsoleConsolesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CustomNetworkCloudArmOperation(_networkCloudVirtualMachineConsoleConsolesClientDiagnostics, Pipeline, _networkCloudVirtualMachineConsoleConsolesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided virtual machine console. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName} + /// + /// + /// Operation Id + /// Consoles_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudVirtualMachineConsoleConsolesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineConsoleResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudVirtualMachineConsoleConsolesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new CustomNetworkCloudArmOperation(_networkCloudVirtualMachineConsoleConsolesClientDiagnostics, Pipeline, _networkCloudVirtualMachineConsoleConsolesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineResource.cs new file mode 100644 index 0000000000000..73c4db75361a6 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVirtualMachineResource.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudVirtualMachineResource + { + /// + /// Delete the provided virtual machine. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName} + /// + /// + /// Operation Id + /// VirtualMachines_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudVirtualMachineVirtualMachinesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided virtual machine. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName} + /// + /// + /// Operation Id + /// VirtualMachines_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudVirtualMachineVirtualMachinesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided virtual machine. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName} + /// + /// + /// Operation Id + /// VirtualMachines_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudVirtualMachineVirtualMachinesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CustomNetworkCloudArmOperation(_networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided virtual machine. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName} + /// + /// + /// Operation Id + /// VirtualMachines_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudVirtualMachineVirtualMachinesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new CustomNetworkCloudArmOperation(_networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVolumeResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVolumeResource.cs new file mode 100644 index 0000000000000..758a0eb5cdc14 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Custom/NetworkCloudVolumeResource.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudVolumeResource + { + /// + /// Delete the provided volume. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName} + /// + /// + /// Operation Id + /// Volumes_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteWithResponseAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudVolumeVolumesClientDiagnostics.CreateScope("NetworkCloudVolumeResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudVolumeVolumesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVolumeVolumesClientDiagnostics, Pipeline, _networkCloudVolumeVolumesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided volume. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName} + /// + /// + /// Operation Id + /// Volumes_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation DeleteWithResponse(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudVolumeVolumesClientDiagnostics.CreateScope("NetworkCloudVolumeResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudVolumeVolumesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVolumeVolumesClientDiagnostics, Pipeline, _networkCloudVolumeVolumesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided volume. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName} + /// + /// + /// Operation Id + /// Volumes_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudVolumeVolumesClientDiagnostics.CreateScope("NetworkCloudVolumeResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudVolumeVolumesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CustomNetworkCloudArmOperation(_networkCloudVolumeVolumesClientDiagnostics, Pipeline, _networkCloudVolumeVolumesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided volume. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName} + /// + /// + /// Operation Id + /// Volumes_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudVolumeVolumesClientDiagnostics.CreateScope("NetworkCloudVolumeResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudVolumeVolumesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new CustomNetworkCloudArmOperation(_networkCloudVolumeVolumesClientDiagnostics, Pipeline, _networkCloudVolumeVolumesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/ArmNetworkCloudModelFactory.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/ArmNetworkCloudModelFactory.cs index 9042c31f924c4..cad2c14b4955d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/ArmNetworkCloudModelFactory.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/ArmNetworkCloudModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Net; using Azure.Core; @@ -39,8 +40,10 @@ public static partial class ArmNetworkCloudModelFactory /// Field Deprecated. These fields will be empty/omitted. The list of the resource IDs for the HybridAksClusters that have nodes hosted on this bare metal machine. /// The name of this machine represented by the host object in the Cluster's Kubernetes control plane. /// The version of Kubernetes running on this machine. + /// The cluster version that has been applied to this machine during deployment or a version update. /// The custom details provided by the customer. /// The OS-level hostname assigned to this machine. + /// The list of roles that are assigned to the cluster node running on this machine. /// The unique internal identifier of the bare metal machine SKU. /// The IPv4 address that is assigned to the bare metal machine during the cluster deployment. /// The IPv6 address that is assigned to the bare metal machine during the cluster deployment. @@ -50,15 +53,19 @@ public static partial class ArmNetworkCloudModelFactory /// The resource ID of the rack where this bare metal machine resides. /// The rack slot in which this bare metal machine is located, ordered from the bottom up i.e. the lowest slot is 1. /// The indicator of whether the bare metal machine is ready to receive workloads. + /// The runtime protection status of the bare metal machine. + /// The list of statuses that represent secret rotation activity. /// The serial number of the bare metal machine. /// The discovered value of the machine's service tag. /// Field Deprecated. These fields will be empty/omitted. The list of the resource IDs for the VirtualMachines that are hosted on this bare metal machine. /// A new instance for mocking. - public static NetworkCloudBareMetalMachineData NetworkCloudBareMetalMachineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, IEnumerable associatedResourceIds = null, string bmcConnectionString = null, AdministrativeCredentials bmcCredentials = null, string bmcMacAddress = null, string bootMacAddress = null, ResourceIdentifier clusterId = null, BareMetalMachineCordonStatus? cordonStatus = null, BareMetalMachineDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, HardwareInventory hardwareInventory = null, HardwareValidationStatus hardwareValidationStatus = null, IEnumerable hybridAksClustersAssociatedIds = null, string kubernetesNodeName = null, string kubernetesVersion = null, string machineDetails = null, string machineName = null, string machineSkuId = null, IPAddress oamIPv4Address = null, string oamIPv6Address = null, string osImage = null, BareMetalMachinePowerState? powerState = null, BareMetalMachineProvisioningState? provisioningState = null, ResourceIdentifier rackId = null, long rackSlot = default, BareMetalMachineReadyState? readyState = null, string serialNumber = null, string serviceTag = null, IEnumerable virtualMachinesAssociatedIds = null) + public static NetworkCloudBareMetalMachineData NetworkCloudBareMetalMachineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, IEnumerable associatedResourceIds = null, string bmcConnectionString = null, AdministrativeCredentials bmcCredentials = null, string bmcMacAddress = null, string bootMacAddress = null, ResourceIdentifier clusterId = null, BareMetalMachineCordonStatus? cordonStatus = null, BareMetalMachineDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, HardwareInventory hardwareInventory = null, HardwareValidationStatus hardwareValidationStatus = null, IEnumerable hybridAksClustersAssociatedIds = null, string kubernetesNodeName = null, string kubernetesVersion = null, string machineClusterVersion = null, string machineDetails = null, string machineName = null, IEnumerable machineRoles = null, string machineSkuId = null, IPAddress oamIPv4Address = null, string oamIPv6Address = null, string osImage = null, BareMetalMachinePowerState? powerState = null, BareMetalMachineProvisioningState? provisioningState = null, ResourceIdentifier rackId = null, long rackSlot = default, BareMetalMachineReadyState? readyState = null, RuntimeProtectionStatus runtimeProtectionStatus = null, IEnumerable secretRotationStatus = null, string serialNumber = null, string serviceTag = null, IEnumerable virtualMachinesAssociatedIds = null) { tags ??= new Dictionary(); associatedResourceIds ??= new List(); hybridAksClustersAssociatedIds ??= new List(); + machineRoles ??= new List(); + secretRotationStatus ??= new List(); virtualMachinesAssociatedIds ??= new List(); return new NetworkCloudBareMetalMachineData( @@ -83,8 +90,10 @@ public static NetworkCloudBareMetalMachineData NetworkCloudBareMetalMachineData( hybridAksClustersAssociatedIds?.ToList(), kubernetesNodeName, kubernetesVersion, + machineClusterVersion, machineDetails, machineName, + machineRoles?.ToList(), machineSkuId, oamIPv4Address, oamIPv6Address, @@ -94,6 +103,8 @@ public static NetworkCloudBareMetalMachineData NetworkCloudBareMetalMachineData( rackId, rackSlot, readyState, + runtimeProtectionStatus, + secretRotationStatus?.ToList(), serialNumber, serviceTag, virtualMachinesAssociatedIds?.ToList(), @@ -154,6 +165,52 @@ public static HardwareValidationStatus HardwareValidationStatus(DateTimeOffset? return new HardwareValidationStatus(lastValidationOn, result, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The timestamp when the malware definitions were last updated. + /// The version of the malware definitions. + /// The timestamp of the most recently completed scan, or empty if there has never been a scan. + /// The timestamp of the most recently scheduled scan, or empty if no scan has been scheduled. + /// The timestamp of the most recently started scan, or empty if there has never been a scan. + /// A new instance for mocking. + public static RuntimeProtectionStatus RuntimeProtectionStatus(DateTimeOffset? definitionsLastUpdated = null, string definitionsVersion = null, DateTimeOffset? scanCompletedOn = null, DateTimeOffset? scanScheduledOn = null, DateTimeOffset? scanStartedOn = null) + { + return new RuntimeProtectionStatus( + definitionsLastUpdated, + definitionsVersion, + scanCompletedOn, + scanScheduledOn, + scanStartedOn, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The maximum number of days the secret may be used before it must be changed. + /// The date and time when the secret was last changed. + /// The number of days a secret exists before rotations will be attempted. + /// The reference to the secret in a key vault. + /// The type name used to identify the purpose of the secret. + /// A new instance for mocking. + public static SecretRotationStatus SecretRotationStatus(long? expirePeriodDays = null, DateTimeOffset? lastRotationOn = null, long? rotationPeriodDays = null, SecretArchiveReference secretArchiveReference = null, string secretType = null) + { + return new SecretRotationStatus( + expirePeriodDays, + lastRotationOn, + rotationPeriodDays, + secretArchiveReference, + secretType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource ID of the key vault containing the secret. + /// The name of the secret in the key vault. + /// The version of the secret in the key vault. + /// A new instance for mocking. + public static SecretArchiveReference SecretArchiveReference(ResourceIdentifier keyVaultId = null, string secretName = null, string secretVersion = null) + { + return new SecretArchiveReference(keyVaultId, secretName, secretVersion, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -212,6 +269,7 @@ public static NetworkCloudCloudServicesNetworkData NetworkCloudCloudServicesNetw /// The systemData. /// The tags. /// The location. + /// The identity of the cluster manager. /// The resource ID of the Log Analytics workspace that is used for the logs collection. /// Field deprecated, this value will no longer influence the cluster manager allocation process and will be removed in a future version. The Azure availability zones within the region that will be used to support the cluster manager resource. /// The list of the cluster versions the manager supports. It is used as input in clusterVersion property of a cluster resource. @@ -223,7 +281,7 @@ public static NetworkCloudCloudServicesNetworkData NetworkCloudCloudServicesNetw /// The provisioning state of the cluster manager. /// Field deprecated, this value will no longer influence the cluster manager allocation process and will be removed in a future version. The size of the Azure virtual machines to use for hosting the cluster manager resource. /// A new instance for mocking. - public static NetworkCloudClusterManagerData NetworkCloudClusterManagerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier analyticsWorkspaceId = null, IEnumerable availabilityZones = null, IEnumerable clusterVersions = null, ClusterManagerDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, ResourceIdentifier fabricControllerId = null, ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, ExtendedLocation managerExtendedLocation = null, ClusterManagerProvisioningState? provisioningState = null, string vmSize = null) + public static NetworkCloudClusterManagerData NetworkCloudClusterManagerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ResourceIdentifier analyticsWorkspaceId = null, IEnumerable availabilityZones = null, IEnumerable clusterVersions = null, ClusterManagerDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, ResourceIdentifier fabricControllerId = null, ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, ExtendedLocation managerExtendedLocation = null, ClusterManagerProvisioningState? provisioningState = null, string vmSize = null) { tags ??= new Dictionary(); availabilityZones ??= new List(); @@ -236,6 +294,7 @@ public static NetworkCloudClusterManagerData NetworkCloudClusterManagerData(Reso systemData, tags, location, + identity, analyticsWorkspaceId, availabilityZones?.ToList(), clusterVersions?.ToList(), @@ -266,6 +325,7 @@ public static ClusterAvailableVersion ClusterAvailableVersion(string supportExpi /// The tags. /// The location. /// The extended location of the cluster manager associated with the cluster. + /// The identity for the resource. /// The rack definition that is intended to reflect only a single rack in a single rack cluster, or an aggregator rack in a multi-rack cluster. /// The resource ID of the Log Analytics Workspace that will be used for storing relevant logs. /// The list of cluster runtime version upgrades available for this cluster. @@ -278,6 +338,7 @@ public static ClusterAvailableVersion ClusterAvailableVersion(string supportExpi /// The service principal to be used by the cluster during Arc Appliance installation. /// The type of rack configuration for the cluster. /// The current runtime version of the cluster. + /// The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. /// The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. /// /// The list of rack definitions for the compute racks in a multi-rack @@ -290,10 +351,13 @@ public static ClusterAvailableVersion ClusterAvailableVersion(string supportExpi /// The count of Manual Action Taken (MAT) events that have not been validated. /// The resource ID of the Network Fabric associated with the cluster. /// The provisioning state of the cluster. + /// The settings for cluster runtime protection. + /// The configuration for use of a key vault to store secrets for later retrieval by the operator. /// The support end date of the runtime version of the cluster. + /// The strategy for updating the cluster. /// The list of workload resource IDs that are hosted within this cluster. /// A new instance for mocking. - public static NetworkCloudClusterData NetworkCloudClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, NetworkCloudRackDefinition aggregatorOrSingleRackDefinition = null, ResourceIdentifier analyticsWorkspaceId = null, IEnumerable availableUpgradeVersions = null, ClusterCapacity clusterCapacity = null, ClusterConnectionStatus? clusterConnectionStatus = null, ExtendedLocation clusterExtendedLocation = null, string clusterLocation = null, ClusterManagerConnectionStatus? clusterManagerConnectionStatus = null, ResourceIdentifier clusterManagerId = null, ServicePrincipalInformation clusterServicePrincipal = null, ClusterType clusterType = default, string clusterVersion = null, ValidationThreshold computeDeploymentThreshold = null, IEnumerable computeRackDefinitions = null, ClusterDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, ExtendedLocation hybridAksExtendedLocation = null, ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, long? manualActionCount = null, ResourceIdentifier networkFabricId = null, ClusterProvisioningState? provisioningState = null, DateTimeOffset? supportExpireOn = null, IEnumerable workloadResourceIds = null) + public static NetworkCloudClusterData NetworkCloudClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, ManagedServiceIdentity identity = null, NetworkCloudRackDefinition aggregatorOrSingleRackDefinition = null, ResourceIdentifier analyticsWorkspaceId = null, IEnumerable availableUpgradeVersions = null, ClusterCapacity clusterCapacity = null, ClusterConnectionStatus? clusterConnectionStatus = null, ExtendedLocation clusterExtendedLocation = null, string clusterLocation = null, ClusterManagerConnectionStatus? clusterManagerConnectionStatus = null, ResourceIdentifier clusterManagerId = null, ServicePrincipalInformation clusterServicePrincipal = null, ClusterType clusterType = default, string clusterVersion = null, CommandOutputSettings commandOutputSettings = null, ValidationThreshold computeDeploymentThreshold = null, IEnumerable computeRackDefinitions = null, ClusterDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, ExtendedLocation hybridAksExtendedLocation = null, ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, long? manualActionCount = null, ResourceIdentifier networkFabricId = null, ClusterProvisioningState? provisioningState = null, RuntimeProtectionEnforcementLevel? runtimeProtectionEnforcementLevel = null, ClusterSecretArchive secretArchive = null, DateTimeOffset? supportExpireOn = null, ClusterUpdateStrategy updateStrategy = null, IEnumerable workloadResourceIds = null) { tags ??= new Dictionary(); availableUpgradeVersions ??= new List(); @@ -308,6 +372,7 @@ public static NetworkCloudClusterData NetworkCloudClusterData(ResourceIdentifier tags, location, extendedLocation, + identity, aggregatorOrSingleRackDefinition, analyticsWorkspaceId, availableUpgradeVersions?.ToList(), @@ -320,6 +385,7 @@ public static NetworkCloudClusterData NetworkCloudClusterData(ResourceIdentifier clusterServicePrincipal, clusterType, clusterVersion, + commandOutputSettings, computeDeploymentThreshold, computeRackDefinitions?.ToList(), detailedStatus, @@ -329,7 +395,10 @@ public static NetworkCloudClusterData NetworkCloudClusterData(ResourceIdentifier manualActionCount, networkFabricId, provisioningState, + runtimeProtectionEnforcementLevel != null ? new RuntimeProtectionConfiguration(runtimeProtectionEnforcementLevel, serializedAdditionalRawData: null) : null, + secretArchive, supportExpireOn, + updateStrategy, workloadResourceIds?.ToList(), serializedAdditionalRawData: null); } @@ -382,14 +451,14 @@ public static ClusterAvailableUpgradeVersion ClusterAvailableUpgradeVersion(Cont } /// Initializes a new instance of . - /// The remaining appliance-based storage in GB available for workload use. + /// The remaining appliance-based storage in GB available for workload use. Measured in gibibytes. /// The remaining number of cores that are available in this cluster for workload use. - /// The remaining machine or host-based storage in GB available for workload use. - /// The remaining memory in GB that are available in this cluster for workload use. - /// The total appliance-based storage in GB supported by this cluster for workload use. + /// The remaining machine or host-based storage in GB available for workload use. Measured in gibibytes. + /// The remaining memory in GB that are available in this cluster for workload use. Measured in gibibytes. + /// The total appliance-based storage in GB supported by this cluster for workload use. Measured in gibibytes. /// The total number of cores that are supported by this cluster for workload use. - /// The total machine or host-based storage in GB supported by this cluster for workload use. - /// The total memory supported by this cluster for workload use. + /// The total machine or host-based storage in GB supported by this cluster for workload use. Measured in gibibytes. + /// The total memory supported by this cluster for workload use. Measured in gibibytes. /// A new instance for mocking. public static ClusterCapacity ClusterCapacity(long? availableApplianceStorageGB = null, long? availableCoreCount = null, long? availableHostStorageGB = null, long? availableMemoryGB = null, long? totalApplianceStorageGB = null, long? totalCoreCount = null, long? totalHostStorageGB = null, long? totalMemoryGB = null) { @@ -425,7 +494,7 @@ public static ClusterCapacity ClusterCapacity(long? availableApplianceStorageGB /// The descriptive message about the current detailed status. /// The current feature settings. /// The agent pools that are created with this Kubernetes cluster for running critical system services and workloads. This data in this field is only used during creation, and the field will be empty following the creation of the Kubernetes Cluster. After creation, the management of agent pools is done using the agentPools sub-resource. - /// The Kubernetes version for this cluster. Accepts n.n, n.n.n, and n.n.n-n format. The interpreted version used will be resolved into this field after creation or update. + /// The Kubernetes version for this cluster. /// The configuration of the managed resource group associated with the resource. /// The configuration of the Kubernetes cluster networking, including the attachment of networks that span the cluster. /// The details of the nodes in this cluster. @@ -490,17 +559,17 @@ public static FeatureStatus FeatureStatus(FeatureDetailedStatus? detailedStatus } /// Initializes a new instance of . - /// The resource ID of the agent pool that this node belongs to. This value is not represented on control plane nodes. + /// The resource ID of the agent pool that this node belongs to. This value is not represented on control plane nodes. /// The availability zone this node is running within. - /// The resource ID of the bare metal machine that hosts this node. + /// The resource ID of the bare metal machine that hosts this node. /// The number of CPU cores configured for this node, derived from the VM SKU specified. /// The detailed state of this node. /// The descriptive message about the current detailed status. - /// The size of the disk configured for this node. + /// The size of the disk configured for this node. Allocations are measured in gibibytes. /// The machine image used to deploy this node. /// The currently running version of Kubernetes and bundled features running on this node. /// The list of labels on this node that have been assigned to the agent pool containing this node. - /// The amount of memory configured for this node, derived from the vm SKU specified. + /// The amount of memory configured for this node, derived from the vm SKU specified. Allocations are measured in gibibytes. /// The mode of the agent pool containing this node. Not applicable for control plane nodes. /// The name of this node, as realized in the Kubernetes cluster. /// The NetworkAttachments made to this node. @@ -509,16 +578,16 @@ public static FeatureStatus FeatureStatus(FeatureDetailedStatus? detailedStatus /// The list of taints that have been assigned to the agent pool containing this node. /// The VM SKU name that was used to create this cluster node. /// A new instance for mocking. - public static KubernetesClusterNode KubernetesClusterNode(string agentPoolId = null, string availabilityZone = null, string bareMetalMachineId = null, long? cpuCores = null, KubernetesClusterNodeDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, long? diskSizeGB = null, string image = null, string kubernetesVersion = null, IEnumerable labels = null, long? memorySizeGB = null, NetworkCloudAgentPoolMode? mode = null, string name = null, IEnumerable networkAttachments = null, KubernetesNodePowerState? powerState = null, KubernetesNodeRole? role = null, IEnumerable taints = null, string vmSkuName = null) + public static KubernetesClusterNode KubernetesClusterNode(ResourceIdentifier agentPoolArmId = null, string availabilityZone = null, ResourceIdentifier bareMetalMachineArmId = null, long? cpuCores = null, KubernetesClusterNodeDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, long? diskSizeGB = null, string image = null, string kubernetesVersion = null, IEnumerable labels = null, long? memorySizeGB = null, NetworkCloudAgentPoolMode? mode = null, string name = null, IEnumerable networkAttachments = null, KubernetesNodePowerState? powerState = null, KubernetesNodeRole? role = null, IEnumerable taints = null, string vmSkuName = null) { labels ??= new List(); networkAttachments ??= new List(); taints ??= new List(); return new KubernetesClusterNode( - agentPoolId, + agentPoolArmId, availabilityZone, - bareMetalMachineId, + bareMetalMachineArmId, cpuCores, detailedStatus, detailedStatusMessage, @@ -538,7 +607,7 @@ public static KubernetesClusterNode KubernetesClusterNode(string agentPoolId = n } /// Initializes a new instance of . - /// + /// /// The resource ID of the associated network attached to the virtual machine. /// It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources. /// @@ -579,10 +648,10 @@ public static KubernetesClusterNode KubernetesClusterNode(string agentPoolId = n /// For a CloudServicesNetwork resource, this name will be ignored. /// /// A new instance for mocking. - public static NetworkAttachment NetworkAttachment(string attachedNetworkId = null, DefaultGateway? defaultGateway = null, VirtualMachineIPAllocationMethod ipAllocationMethod = default, string ipv4Address = null, string ipv6Address = null, string macAddress = null, string networkAttachmentName = null) + public static NetworkAttachment NetworkAttachment(ResourceIdentifier attachedNetworkArmId = null, DefaultGateway? defaultGateway = null, VirtualMachineIPAllocationMethod ipAllocationMethod = default, string ipv4Address = null, string ipv6Address = null, string macAddress = null, string networkAttachmentName = null) { return new NetworkAttachment( - attachedNetworkId, + attachedNetworkArmId, defaultGateway, ipAllocationMethod, ipv4Address, @@ -747,7 +816,7 @@ public static NetworkCloudRackSkuData NetworkCloudRackSkuData(ResourceIdentifier /// The list of disks. /// The generation of the architecture. /// The hardware version of the machine. - /// The maximum amount of memory in GB. + /// The maximum amount of memory. Measured in gibibytes. /// The model of the machine. /// The list of network interfaces. /// The count of SMT and physical core threads for this machine. @@ -775,7 +844,7 @@ public static MachineSkuSlot MachineSkuSlot(long? rackSlot = null, BootstrapProt } /// Initializes a new instance of . - /// The maximum amount of storage in GB. + /// The maximum amount of storage. Measured in gibibytes. /// The connection type of the rack SKU resource. /// The disk type of rack SKU resource. /// A new instance for mocking. @@ -790,7 +859,7 @@ public static MachineDisk MachineDisk(long? capacityGB = null, MachineSkuDiskCon /// The model name of the device. /// The physical slot for this device. /// The number of ports on the device. - /// The maximum amount of data in GB that the line card transmits through a port at any given second. + /// The maximum amount of data in gigabits that the line card transmits through a port at any given second. /// The vendor name of the device. /// A new instance for mocking. public static NetworkCloudNetworkInterface NetworkCloudNetworkInterface(string address = null, DeviceConnectionType? deviceConnectionType = null, string model = null, long? physicalSlot = null, long? portCount = null, long? portSpeed = null, string vendor = null) @@ -808,7 +877,7 @@ public static NetworkCloudNetworkInterface NetworkCloudNetworkInterface(string a /// Initializes a new instance of . /// The position in the rack for the storage appliance. - /// The maximum capacity of the storage appliance. + /// The maximum capacity of the storage appliance. Measured in gibibytes. /// The model of the storage appliance. /// A new instance for mocking. public static StorageApplianceSkuSlot StorageApplianceSkuSlot(long? rackSlot = null, long? capacityGB = null, string model = null) @@ -871,17 +940,22 @@ public static NetworkCloudRackData NetworkCloudRackData(ResourceIdentifier id = /// The detailed status of the storage appliance. /// The descriptive message about the current detailed status. /// The endpoint for the management interface of the storage appliance. + /// The manufacturer of the storage appliance. + /// The model of the storage appliance. /// The provisioning state of the storage appliance. /// The resource ID of the rack where this storage appliance resides. /// The slot the storage appliance is in the rack based on the BOM configuration. /// The indicator of whether the storage appliance supports remote vendor management. /// The indicator of whether the remote vendor management feature is enabled or disabled, or unsupported if it is an unsupported feature. + /// The list of statuses that represent secret rotation activity. /// The serial number for the storage appliance. /// The SKU for the storage appliance. + /// The version of the storage appliance. /// A new instance for mocking. - public static NetworkCloudStorageApplianceData NetworkCloudStorageApplianceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, AdministrativeCredentials administratorCredentials = null, long? capacity = null, long? capacityUsed = null, ResourceIdentifier clusterId = null, StorageApplianceDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, IPAddress managementIPv4Address = null, StorageApplianceProvisioningState? provisioningState = null, ResourceIdentifier rackId = null, long rackSlot = default, RemoteVendorManagementFeature? remoteVendorManagementFeature = null, RemoteVendorManagementStatus? remoteVendorManagementStatus = null, string serialNumber = null, string storageApplianceSkuId = null) + public static NetworkCloudStorageApplianceData NetworkCloudStorageApplianceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, AdministrativeCredentials administratorCredentials = null, long? capacity = null, long? capacityUsed = null, ResourceIdentifier clusterId = null, StorageApplianceDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, IPAddress managementIPv4Address = null, string manufacturer = null, string model = null, StorageApplianceProvisioningState? provisioningState = null, ResourceIdentifier rackId = null, long rackSlot = default, RemoteVendorManagementFeature? remoteVendorManagementFeature = null, RemoteVendorManagementStatus? remoteVendorManagementStatus = null, IEnumerable secretRotationStatus = null, string serialNumber = null, string storageApplianceSkuId = null, string version = null) { tags ??= new Dictionary(); + secretRotationStatus ??= new List(); return new NetworkCloudStorageApplianceData( id, @@ -898,13 +972,17 @@ public static NetworkCloudStorageApplianceData NetworkCloudStorageApplianceData( detailedStatus, detailedStatusMessage, managementIPv4Address, + manufacturer, + model, provisioningState, rackId, rackSlot, remoteVendorManagementFeature, remoteVendorManagementStatus, + secretRotationStatus?.ToList(), serialNumber, storageApplianceSkuId, + version, serializedAdditionalRawData: null); } @@ -969,7 +1047,7 @@ public static NetworkCloudTrunkedNetworkData NetworkCloudTrunkedNetworkData(Reso /// The extended location of the cluster associated with the resource. /// The name of the administrator to which the ssh public keys will be added into the authorized keys. /// The cluster availability zone containing this virtual machine. - /// The resource ID of the bare metal machine the virtual machine has landed to. + /// The resource ID of the bare metal machine that hosts the virtual machine. /// Selects the boot method for the virtual machine. /// The cloud service network that provides platform-level services for the virtual machine. /// The resource ID of the cluster the virtual machine is created for. @@ -977,7 +1055,7 @@ public static NetworkCloudTrunkedNetworkData NetworkCloudTrunkedNetworkData(Reso /// The more detailed status of the virtual machine. /// The descriptive message about the current detailed status. /// Field Deprecated, the value will be ignored if provided. The indicator of whether one of the specified CPU cores is isolated to run the emulator thread for this virtual machine. - /// The memory size of the virtual machine in GB. + /// The memory size of the virtual machine. Allocations are measured in gibibytes. /// The list of network attachments to the virtual machine. /// The Base64 encoded cloud-init network data. /// The scheduling hints for the virtual machine. @@ -1073,30 +1151,38 @@ public static NetworkCloudVolumeData NetworkCloudVolumeData(ResourceIdentifier i } /// Initializes a new instance of . + /// The end time of the operation. + /// If present, details of the operation error. /// Fully qualified ID for the async operation. - /// Fully qualified ID of the resource against which the original async operation was started. /// Name of the async operation. - /// Operation status. + /// The operations list. /// Percent of the operation that is complete. + /// Fully qualified ID of the resource against which the original async operation was started. /// The start time of the operation. - /// The end time of the operation. - /// The operations list. - /// If present, details of the operation error. + /// Operation status. + /// For actions that run commands or scripts, the exit code of the script execution. + /// For actions that run commands or scripts, the leading bytes of the output of the script execution. + /// For actions that run commands or scripts, a reference to the location of the result. + /// For actions that run commands or scripts, the URL where the full output of the script output can be retrieved. /// A new instance for mocking. - public static NetworkCloudOperationStatusResult NetworkCloudOperationStatusResult(ResourceIdentifier id = null, ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null) + public static NetworkCloudOperationStatusResult NetworkCloudOperationStatusResult(DateTimeOffset? endOn = null, ResponseError error = null, ResourceIdentifier id = null, string name = null, IEnumerable operations = null, float? percentComplete = null, ResourceIdentifier resourceId = null, DateTimeOffset? startOn = null, string status = null, string exitCode = null, string outputHead = null, Uri resultRef = null, Uri resultUri = null) { operations ??= new List(); return new NetworkCloudOperationStatusResult( + endOn, + error, id, - resourceId, name, - status, + operations?.ToList(), percentComplete, + resourceId, startOn, - endOn, - operations?.ToList(), - error, + status, + exitCode, + outputHead, + resultRef, + resultUri, serializedAdditionalRawData: null); } @@ -1287,10 +1373,10 @@ public static NetworkCloudClusterMetricsConfigurationData NetworkCloudClusterMet /// The selection of how this agent pool is utilized, either as a system pool or a user pool. System pools run the features and critical services for the Kubernetes Cluster, while user pools are dedicated to user workloads. Every Kubernetes cluster must contain at least one system node pool with at least one node. /// The provisioning state of the agent pool. /// The taints applied to the nodes in this agent pool. - /// The configuration of the agent pool. + /// The configuration of the agent pool. /// The name of the VM SKU that determines the size of resources allocated for node VMs. /// A new instance for mocking. - public static NetworkCloudAgentPoolData NetworkCloudAgentPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, AdministratorConfiguration administratorConfiguration = null, NetworkCloudAgentConfiguration agentOptions = null, AttachedNetworkConfiguration attachedNetworkConfiguration = null, IEnumerable availabilityZones = null, long count = default, AgentPoolDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, string kubernetesVersion = null, IEnumerable labels = null, NetworkCloudAgentPoolMode mode = default, AgentPoolProvisioningState? provisioningState = null, IEnumerable taints = null, string upgradeMaxSurge = null, string vmSkuName = null) + public static NetworkCloudAgentPoolData NetworkCloudAgentPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, AdministratorConfiguration administratorConfiguration = null, NetworkCloudAgentConfiguration agentOptions = null, AttachedNetworkConfiguration attachedNetworkConfiguration = null, IEnumerable availabilityZones = null, long count = default, AgentPoolDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, string kubernetesVersion = null, IEnumerable labels = null, NetworkCloudAgentPoolMode mode = default, AgentPoolProvisioningState? provisioningState = null, IEnumerable taints = null, AgentPoolUpgradeSettings upgradeSettings = null, string vmSkuName = null) { tags ??= new Dictionary(); availabilityZones ??= new List(); @@ -1317,11 +1403,48 @@ public static NetworkCloudAgentPoolData NetworkCloudAgentPoolData(ResourceIdenti mode, provisioningState, taints?.ToList(), - upgradeMaxSurge != null ? new AgentPoolUpgradeSettings(upgradeMaxSurge, serializedAdditionalRawData: null) : null, + upgradeSettings, vmSkuName, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The lifecycle indicator of the feature. + /// The detailed status of the feature. + /// The descriptive message for the detailed status of the feature. + /// The configured options for the feature. + /// The provisioning state of the Kubernetes cluster feature. + /// The indicator of if the feature is required or optional. Optional features may be deleted by the user, while required features are managed with the kubernetes cluster lifecycle. + /// The version of the feature. + /// A new instance for mocking. + public static NetworkCloudKubernetesClusterFeatureData NetworkCloudKubernetesClusterFeatureData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, KubernetesClusterFeatureAvailabilityLifecycle? availabilityLifecycle = null, KubernetesClusterFeatureDetailedStatus? detailedStatus = null, string detailedStatusMessage = null, IEnumerable options = null, KubernetesClusterFeatureProvisioningState? provisioningState = null, KubernetesClusterFeatureRequired? required = null, string version = null) + { + tags ??= new Dictionary(); + options ??= new List(); + + return new NetworkCloudKubernetesClusterFeatureData( + id, + name, + resourceType, + systemData, + tags, + location, + availabilityLifecycle, + detailedStatus, + detailedStatusMessage, + options?.ToList(), + provisioningState, + required, + version, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -1361,5 +1484,159 @@ public static NetworkCloudVirtualMachineConsoleData NetworkCloudVirtualMachineCo virtualMachineAccessId, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The extended location of the cluster associated with the resource. + /// The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. + /// The connection string for the baseboard management controller including IP address and protocol. + /// The credentials of the baseboard management controller on this bare metal machine. + /// The MAC address of the BMC device. + /// The MAC address of a NIC connected to the PXE network. + /// The resource ID of the cluster this bare metal machine is associated with. + /// The cordon status of the bare metal machine. + /// The more detailed status of the bare metal machine. + /// The descriptive message about the current detailed status. + /// The hardware inventory, including information acquired from the model/sku information and from the ironic inspector. + /// The details of the latest hardware validation performed for this bare metal machine. + /// Field Deprecated. These fields will be empty/omitted. The list of the resource IDs for the HybridAksClusters that have nodes hosted on this bare metal machine. + /// The name of this machine represented by the host object in the Cluster's Kubernetes control plane. + /// The version of Kubernetes running on this machine. + /// The custom details provided by the customer. + /// The OS-level hostname assigned to this machine. + /// The unique internal identifier of the bare metal machine SKU. + /// The IPv4 address that is assigned to the bare metal machine during the cluster deployment. + /// The IPv6 address that is assigned to the bare metal machine during the cluster deployment. + /// The image that is currently provisioned to the OS disk. + /// The power state derived from the baseboard management controller. + /// The provisioning state of the bare metal machine. + /// The resource ID of the rack where this bare metal machine resides. + /// The rack slot in which this bare metal machine is located, ordered from the bottom up i.e. the lowest slot is 1. + /// The indicator of whether the bare metal machine is ready to receive workloads. + /// The serial number of the bare metal machine. + /// The discovered value of the machine's service tag. + /// Field Deprecated. These fields will be empty/omitted. The list of the resource IDs for the VirtualMachines that are hosted on this bare metal machine. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetworkCloudBareMetalMachineData NetworkCloudBareMetalMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedLocation extendedLocation, IEnumerable associatedResourceIds, string bmcConnectionString, AdministrativeCredentials bmcCredentials, string bmcMacAddress, string bootMacAddress, ResourceIdentifier clusterId, BareMetalMachineCordonStatus? cordonStatus, BareMetalMachineDetailedStatus? detailedStatus, string detailedStatusMessage, HardwareInventory hardwareInventory, HardwareValidationStatus hardwareValidationStatus, IEnumerable hybridAksClustersAssociatedIds, string kubernetesNodeName, string kubernetesVersion, string machineDetails, string machineName, string machineSkuId, IPAddress oamIPv4Address, string oamIPv6Address, string osImage, BareMetalMachinePowerState? powerState, BareMetalMachineProvisioningState? provisioningState, ResourceIdentifier rackId, long rackSlot, BareMetalMachineReadyState? readyState, string serialNumber, string serviceTag, IEnumerable virtualMachinesAssociatedIds) + { + return NetworkCloudBareMetalMachineData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, extendedLocation: extendedLocation, associatedResourceIds: associatedResourceIds, bmcConnectionString: bmcConnectionString, bmcCredentials: bmcCredentials, bmcMacAddress: bmcMacAddress, bootMacAddress: bootMacAddress, clusterId: clusterId, cordonStatus: cordonStatus, detailedStatus: detailedStatus, detailedStatusMessage: detailedStatusMessage, hardwareInventory: hardwareInventory, hardwareValidationStatus: hardwareValidationStatus, hybridAksClustersAssociatedIds: hybridAksClustersAssociatedIds, kubernetesNodeName: kubernetesNodeName, kubernetesVersion: kubernetesVersion, machineClusterVersion: default, machineDetails: machineDetails, machineName: machineName, machineRoles: default, machineSkuId: machineSkuId, oamIPv4Address: oamIPv4Address, oamIPv6Address: oamIPv6Address, osImage: osImage, powerState: powerState, provisioningState: provisioningState, rackId: rackId, rackSlot: rackSlot, readyState: readyState, runtimeProtectionStatus: default, secretRotationStatus: default, serialNumber: serialNumber, serviceTag: serviceTag, virtualMachinesAssociatedIds: virtualMachinesAssociatedIds); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource ID of the Log Analytics workspace that is used for the logs collection. + /// Field deprecated, this value will no longer influence the cluster manager allocation process and will be removed in a future version. The Azure availability zones within the region that will be used to support the cluster manager resource. + /// The list of the cluster versions the manager supports. It is used as input in clusterVersion property of a cluster resource. + /// The detailed status that provides additional information about the cluster manager. + /// The descriptive message about the current detailed status. + /// The resource ID of the fabric controller that has one to one mapping with the cluster manager. + /// The configuration of the managed resource group associated with the resource. + /// The extended location (custom location) that represents the cluster manager's control plane location. This extended location is used when creating cluster and rack manifest resources. + /// The provisioning state of the cluster manager. + /// Field deprecated, this value will no longer influence the cluster manager allocation process and will be removed in a future version. The size of the Azure virtual machines to use for hosting the cluster manager resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetworkCloudClusterManagerData NetworkCloudClusterManagerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceIdentifier analyticsWorkspaceId, IEnumerable availabilityZones, IEnumerable clusterVersions, ClusterManagerDetailedStatus? detailedStatus, string detailedStatusMessage, ResourceIdentifier fabricControllerId, ManagedResourceGroupConfiguration managedResourceGroupConfiguration, ExtendedLocation managerExtendedLocation, ClusterManagerProvisioningState? provisioningState, string vmSize) + { + return NetworkCloudClusterManagerData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, identity: default, analyticsWorkspaceId: analyticsWorkspaceId, availabilityZones: availabilityZones, clusterVersions: clusterVersions, detailedStatus: detailedStatus, detailedStatusMessage: detailedStatusMessage, fabricControllerId: fabricControllerId, managedResourceGroupConfiguration: managedResourceGroupConfiguration, managerExtendedLocation: managerExtendedLocation, provisioningState: provisioningState, vmSize: vmSize); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The extended location of the cluster manager associated with the cluster. + /// The rack definition that is intended to reflect only a single rack in a single rack cluster, or an aggregator rack in a multi-rack cluster. + /// The resource ID of the Log Analytics Workspace that will be used for storing relevant logs. + /// The list of cluster runtime version upgrades available for this cluster. + /// The capacity supported by this cluster. + /// The latest heartbeat status between the cluster manager and the cluster. + /// The extended location (custom location) that represents the cluster's control plane location. This extended location is used to route the requests of child objects of the cluster that are handled by the platform operator. + /// The customer-provided location information to identify where the cluster resides. + /// The latest connectivity status between cluster manager and the cluster. + /// The resource ID of the cluster manager that manages this cluster. This is set by the Cluster Manager when the cluster is created. + /// The service principal to be used by the cluster during Arc Appliance installation. + /// The type of rack configuration for the cluster. + /// The current runtime version of the cluster. + /// The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. + /// + /// The list of rack definitions for the compute racks in a multi-rack + /// cluster, or an empty list in a single-rack cluster. + /// + /// The current detailed status of the cluster. + /// The descriptive message about the detailed status. + /// Field Deprecated. This field will not be populated in an upcoming version. The extended location (custom location) that represents the Hybrid AKS control plane location. This extended location is used when creating provisioned clusters (Hybrid AKS clusters). + /// The configuration of the managed resource group associated with the resource. + /// The count of Manual Action Taken (MAT) events that have not been validated. + /// The resource ID of the Network Fabric associated with the cluster. + /// The provisioning state of the cluster. + /// The support end date of the runtime version of the cluster. + /// The list of workload resource IDs that are hosted within this cluster. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetworkCloudClusterData NetworkCloudClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedLocation extendedLocation, NetworkCloudRackDefinition aggregatorOrSingleRackDefinition, ResourceIdentifier analyticsWorkspaceId, IEnumerable availableUpgradeVersions, ClusterCapacity clusterCapacity, ClusterConnectionStatus? clusterConnectionStatus, ExtendedLocation clusterExtendedLocation, string clusterLocation, ClusterManagerConnectionStatus? clusterManagerConnectionStatus, ResourceIdentifier clusterManagerId, ServicePrincipalInformation clusterServicePrincipal, ClusterType clusterType, string clusterVersion, ValidationThreshold computeDeploymentThreshold, IEnumerable computeRackDefinitions, ClusterDetailedStatus? detailedStatus, string detailedStatusMessage, ExtendedLocation hybridAksExtendedLocation, ManagedResourceGroupConfiguration managedResourceGroupConfiguration, long? manualActionCount, ResourceIdentifier networkFabricId, ClusterProvisioningState? provisioningState, DateTimeOffset? supportExpireOn, IEnumerable workloadResourceIds) + { + return NetworkCloudClusterData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, extendedLocation: extendedLocation, identity: default, aggregatorOrSingleRackDefinition: aggregatorOrSingleRackDefinition, analyticsWorkspaceId: analyticsWorkspaceId, availableUpgradeVersions: availableUpgradeVersions, clusterCapacity: clusterCapacity, clusterConnectionStatus: clusterConnectionStatus, clusterExtendedLocation: clusterExtendedLocation, clusterLocation: clusterLocation, clusterManagerConnectionStatus: clusterManagerConnectionStatus, clusterManagerId: clusterManagerId, clusterServicePrincipal: clusterServicePrincipal, clusterType: clusterType, clusterVersion: clusterVersion, commandOutputSettings: default, computeDeploymentThreshold: computeDeploymentThreshold, computeRackDefinitions: computeRackDefinitions, detailedStatus: detailedStatus, detailedStatusMessage: detailedStatusMessage, hybridAksExtendedLocation: hybridAksExtendedLocation, managedResourceGroupConfiguration: managedResourceGroupConfiguration, manualActionCount: manualActionCount, networkFabricId: networkFabricId, provisioningState: provisioningState, runtimeProtectionEnforcementLevel: default, secretArchive: default, supportExpireOn: supportExpireOn, updateStrategy: default, workloadResourceIds: workloadResourceIds); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The extended location of the cluster associated with the resource. + /// The credentials of the administrative interface on this storage appliance. + /// The total capacity of the storage appliance. + /// The amount of storage consumed. + /// The resource ID of the cluster this storage appliance is associated with. + /// The detailed status of the storage appliance. + /// The descriptive message about the current detailed status. + /// The endpoint for the management interface of the storage appliance. + /// The provisioning state of the storage appliance. + /// The resource ID of the rack where this storage appliance resides. + /// The slot the storage appliance is in the rack based on the BOM configuration. + /// The indicator of whether the storage appliance supports remote vendor management. + /// The indicator of whether the remote vendor management feature is enabled or disabled, or unsupported if it is an unsupported feature. + /// The serial number for the storage appliance. + /// The SKU for the storage appliance. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetworkCloudStorageApplianceData NetworkCloudStorageApplianceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedLocation extendedLocation, AdministrativeCredentials administratorCredentials, long? capacity, long? capacityUsed, ResourceIdentifier clusterId, StorageApplianceDetailedStatus? detailedStatus, string detailedStatusMessage, IPAddress managementIPv4Address, StorageApplianceProvisioningState? provisioningState, ResourceIdentifier rackId, long rackSlot, RemoteVendorManagementFeature? remoteVendorManagementFeature, RemoteVendorManagementStatus? remoteVendorManagementStatus, string serialNumber, string storageApplianceSkuId) + { + return NetworkCloudStorageApplianceData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, extendedLocation: extendedLocation, administratorCredentials: administratorCredentials, capacity: capacity, capacityUsed: capacityUsed, clusterId: clusterId, detailedStatus: detailedStatus, detailedStatusMessage: detailedStatusMessage, managementIPv4Address: managementIPv4Address, manufacturer: default, model: default, provisioningState: provisioningState, rackId: rackId, rackSlot: rackSlot, remoteVendorManagementFeature: remoteVendorManagementFeature, remoteVendorManagementStatus: remoteVendorManagementStatus, secretRotationStatus: default, serialNumber: serialNumber, storageApplianceSkuId: storageApplianceSkuId, version: default); + } + + /// Initializes a new instance of . + /// Fully qualified ID for the async operation. + /// Fully qualified ID of the resource against which the original async operation was started. + /// Name of the async operation. + /// Operation status. + /// Percent of the operation that is complete. + /// The start time of the operation. + /// The end time of the operation. + /// The operations list. + /// If present, details of the operation error. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetworkCloudOperationStatusResult NetworkCloudOperationStatusResult(ResourceIdentifier id, ResourceIdentifier resourceId, string name, string status, float? percentComplete, DateTimeOffset? startOn, DateTimeOffset? endOn, IEnumerable operations, ResponseError error) + { + return NetworkCloudOperationStatusResult(endOn: endOn, error: error, id: id, name: name, operations: operations, percentComplete: percentComplete, resourceId: resourceId, startOn: startOn, status: status, exitCode: default, outputHead: default, resultRef: default, resultUri: default); + } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/MockableNetworkCloudArmClient.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/MockableNetworkCloudArmClient.cs index d848fab98de0b..0821244c90051 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/MockableNetworkCloudArmClient.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/MockableNetworkCloudArmClient.cs @@ -238,6 +238,18 @@ public virtual NetworkCloudAgentPoolResource GetNetworkCloudAgentPoolResource(Re return new NetworkCloudAgentPoolResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual NetworkCloudKubernetesClusterFeatureResource GetNetworkCloudKubernetesClusterFeatureResource(ResourceIdentifier id) + { + NetworkCloudKubernetesClusterFeatureResource.ValidateResourceId(id); + return new NetworkCloudKubernetesClusterFeatureResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/MockableNetworkCloudResourceGroupResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/MockableNetworkCloudResourceGroupResource.cs index a9742c995f2b4..ca796a7b7a223 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/MockableNetworkCloudResourceGroupResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/MockableNetworkCloudResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual NetworkCloudBareMetalMachineCollection GetNetworkCloudBareMetalMa /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetNet /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -122,7 +122,7 @@ public virtual NetworkCloudCloudServicesNetworkCollection GetNetworkCloudCloudSe /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -191,7 +191,7 @@ public virtual NetworkCloudClusterManagerCollection GetNetworkCloudClusterManage /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task> GetNetwo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -260,7 +260,7 @@ public virtual NetworkCloudClusterCollection GetNetworkCloudClusters() /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -291,7 +291,7 @@ public virtual async Task> GetNetworkCloud /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -329,7 +329,7 @@ public virtual NetworkCloudKubernetesClusterCollection GetNetworkCloudKubernetes /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> GetNe /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual NetworkCloudL2NetworkCollection GetNetworkCloudL2Networks() /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -429,7 +429,7 @@ public virtual async Task> GetNetworkClo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -467,7 +467,7 @@ public virtual NetworkCloudL3NetworkCollection GetNetworkCloudL3Networks() /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -498,7 +498,7 @@ public virtual async Task> GetNetworkClo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -536,7 +536,7 @@ public virtual NetworkCloudRackCollection GetNetworkCloudRacks() /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -567,7 +567,7 @@ public virtual async Task> GetNetworkCloudRac /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -605,7 +605,7 @@ public virtual NetworkCloudStorageApplianceCollection GetNetworkCloudStorageAppl /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -636,7 +636,7 @@ public virtual async Task> GetNet /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -674,7 +674,7 @@ public virtual NetworkCloudTrunkedNetworkCollection GetNetworkCloudTrunkedNetwor /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -705,7 +705,7 @@ public virtual async Task> GetNetwo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -743,7 +743,7 @@ public virtual NetworkCloudVirtualMachineCollection GetNetworkCloudVirtualMachin /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -774,7 +774,7 @@ public virtual async Task> GetNetwo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -812,7 +812,7 @@ public virtual NetworkCloudVolumeCollection GetNetworkCloudVolumes() /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -843,7 +843,7 @@ public virtual async Task> GetNetworkCloudV /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/MockableNetworkCloudSubscriptionResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/MockableNetworkCloudSubscriptionResource.cs index 269aec7bd0b9c..66a9bfec887fb 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/MockableNetworkCloudSubscriptionResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/MockableNetworkCloudSubscriptionResource.cs @@ -105,7 +105,7 @@ public virtual NetworkCloudRackSkuCollection GetNetworkCloudRackSkus() /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -136,7 +136,7 @@ public virtual async Task> GetNetworkCloud /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual Response GetNetworkCloudRackSku(stri /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -197,7 +197,7 @@ public virtual AsyncPageable GetNetworkClo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual Pageable GetNetworkCloudBar /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual AsyncPageable GetNetwor /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual Pageable GetNetworkClou /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual AsyncPageable GetNetworkCloud /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -347,7 +347,7 @@ public virtual Pageable GetNetworkCloudClust /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -377,7 +377,7 @@ public virtual AsyncPageable GetNetworkCloudCluster /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Pageable GetNetworkCloudClusters(Can /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -437,7 +437,7 @@ public virtual AsyncPageable GetNetworkCl /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -467,7 +467,7 @@ public virtual Pageable GetNetworkCloudKu /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -497,7 +497,7 @@ public virtual AsyncPageable GetNetworkCloudL2Net /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -527,7 +527,7 @@ public virtual Pageable GetNetworkCloudL2Networks /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -557,7 +557,7 @@ public virtual AsyncPageable GetNetworkCloudL3Net /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -587,7 +587,7 @@ public virtual Pageable GetNetworkCloudL3Networks /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -617,7 +617,7 @@ public virtual AsyncPageable GetNetworkCloudRacksAsync /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -647,7 +647,7 @@ public virtual Pageable GetNetworkCloudRacks(Cancellat /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -677,7 +677,7 @@ public virtual AsyncPageable GetNetworkClo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -707,7 +707,7 @@ public virtual Pageable GetNetworkCloudSto /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -737,7 +737,7 @@ public virtual AsyncPageable GetNetworkCloud /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -767,7 +767,7 @@ public virtual Pageable GetNetworkCloudTrunk /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -797,7 +797,7 @@ public virtual AsyncPageable GetNetworkCloud /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -827,7 +827,7 @@ public virtual Pageable GetNetworkCloudVirtu /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -857,7 +857,7 @@ public virtual AsyncPageable GetNetworkCloudVolumesA /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/NetworkCloudExtensions.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/NetworkCloudExtensions.cs index 860453f09fc29..5974282eb6062 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/NetworkCloudExtensions.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Extensions/NetworkCloudExtensions.cs @@ -355,6 +355,25 @@ public static NetworkCloudAgentPoolResource GetNetworkCloudAgentPoolResource(thi return GetMockableNetworkCloudArmClient(client).GetNetworkCloudAgentPoolResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static NetworkCloudKubernetesClusterFeatureResource GetNetworkCloudKubernetesClusterFeatureResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNetworkCloudArmClient(client).GetNetworkCloudKubernetesClusterFeatureResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -404,7 +423,7 @@ public static NetworkCloudBareMetalMachineCollection GetNetworkCloudBareMetalMac /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -442,7 +461,7 @@ public static async Task> GetNetw /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -497,7 +516,7 @@ public static NetworkCloudCloudServicesNetworkCollection GetNetworkCloudCloudSer /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -535,7 +554,7 @@ public static async Task> Get /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -590,7 +609,7 @@ public static NetworkCloudClusterManagerCollection GetNetworkCloudClusterManager /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -628,7 +647,7 @@ public static async Task> GetNetwor /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -683,7 +702,7 @@ public static NetworkCloudClusterCollection GetNetworkCloudClusters(this Resourc /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -721,7 +740,7 @@ public static async Task> GetNetworkCloudC /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -776,7 +795,7 @@ public static NetworkCloudKubernetesClusterCollection GetNetworkCloudKubernetesC /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -814,7 +833,7 @@ public static async Task> GetNet /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -869,7 +888,7 @@ public static NetworkCloudL2NetworkCollection GetNetworkCloudL2Networks(this Res /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -907,7 +926,7 @@ public static async Task> GetNetworkClou /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -962,7 +981,7 @@ public static NetworkCloudL3NetworkCollection GetNetworkCloudL3Networks(this Res /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1000,7 +1019,7 @@ public static async Task> GetNetworkClou /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1055,7 +1074,7 @@ public static NetworkCloudRackCollection GetNetworkCloudRacks(this ResourceGroup /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1093,7 +1112,7 @@ public static async Task> GetNetworkCloudRack /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1148,7 +1167,7 @@ public static NetworkCloudStorageApplianceCollection GetNetworkCloudStorageAppli /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1186,7 +1205,7 @@ public static async Task> GetNetw /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1241,7 +1260,7 @@ public static NetworkCloudTrunkedNetworkCollection GetNetworkCloudTrunkedNetwork /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1279,7 +1298,7 @@ public static async Task> GetNetwor /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1334,7 +1353,7 @@ public static NetworkCloudVirtualMachineCollection GetNetworkCloudVirtualMachine /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1372,7 +1391,7 @@ public static async Task> GetNetwor /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1427,7 +1446,7 @@ public static NetworkCloudVolumeCollection GetNetworkCloudVolumes(this ResourceG /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1465,7 +1484,7 @@ public static async Task> GetNetworkCloudVo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1520,7 +1539,7 @@ public static NetworkCloudRackSkuCollection GetNetworkCloudRackSkus(this Subscri /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1558,7 +1577,7 @@ public static async Task> GetNetworkCloudR /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1596,7 +1615,7 @@ public static Response GetNetworkCloudRackSku(this /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1632,7 +1651,7 @@ public static AsyncPageable GetNetworkClou /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1668,7 +1687,7 @@ public static Pageable GetNetworkCloudBare /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1704,7 +1723,7 @@ public static AsyncPageable GetNetwork /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1740,7 +1759,7 @@ public static Pageable GetNetworkCloud /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1776,7 +1795,7 @@ public static AsyncPageable GetNetworkCloudC /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1812,7 +1831,7 @@ public static Pageable GetNetworkCloudCluste /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1848,7 +1867,7 @@ public static AsyncPageable GetNetworkCloudClusters /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1884,7 +1903,7 @@ public static Pageable GetNetworkCloudClusters(this /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1920,7 +1939,7 @@ public static AsyncPageable GetNetworkClo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1956,7 +1975,7 @@ public static Pageable GetNetworkCloudKub /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1992,7 +2011,7 @@ public static AsyncPageable GetNetworkCloudL2Netw /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -2028,7 +2047,7 @@ public static Pageable GetNetworkCloudL2Networks( /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -2064,7 +2083,7 @@ public static AsyncPageable GetNetworkCloudL3Netw /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -2100,7 +2119,7 @@ public static Pageable GetNetworkCloudL3Networks( /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -2136,7 +2155,7 @@ public static AsyncPageable GetNetworkCloudRacksAsync( /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -2172,7 +2191,7 @@ public static Pageable GetNetworkCloudRacks(this Subsc /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -2208,7 +2227,7 @@ public static AsyncPageable GetNetworkClou /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -2244,7 +2263,7 @@ public static Pageable GetNetworkCloudStor /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -2280,7 +2299,7 @@ public static AsyncPageable GetNetworkCloudT /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -2316,7 +2335,7 @@ public static Pageable GetNetworkCloudTrunke /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -2352,7 +2371,7 @@ public static AsyncPageable GetNetworkCloudV /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -2388,7 +2407,7 @@ public static Pageable GetNetworkCloudVirtua /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -2424,7 +2443,7 @@ public static AsyncPageable GetNetworkCloudVolumesAs /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/NetworkCloudKubernetesClusterFeatureOperationSource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/NetworkCloudKubernetesClusterFeatureOperationSource.cs new file mode 100644 index 0000000000000..62a518764ca1d --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/NetworkCloudKubernetesClusterFeatureOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud +{ + internal class NetworkCloudKubernetesClusterFeatureOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkCloudKubernetesClusterFeatureOperationSource(ArmClient client) + { + _client = client; + } + + NetworkCloudKubernetesClusterFeatureResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkCloudKubernetesClusterFeatureData.DeserializeNetworkCloudKubernetesClusterFeatureData(document.RootElement); + return new NetworkCloudKubernetesClusterFeatureResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkCloudKubernetesClusterFeatureData.DeserializeNetworkCloudKubernetesClusterFeatureData(document.RootElement); + return new NetworkCloudKubernetesClusterFeatureResource(_client, data); + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministratorConfigurationPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministratorConfigurationPatch.Serialization.cs new file mode 100644 index 0000000000000..4a488b9cd36be --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministratorConfigurationPatch.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + internal partial class AdministratorConfigurationPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AdministratorConfigurationPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(SshPublicKeys)) + { + writer.WritePropertyName("sshPublicKeys"u8); + writer.WriteStartArray(); + foreach (var item in SshPublicKeys) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AdministratorConfigurationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AdministratorConfigurationPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAdministratorConfigurationPatch(document.RootElement, options); + } + + internal static AdministratorConfigurationPatch DeserializeAdministratorConfigurationPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList sshPublicKeys = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sshPublicKeys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkCloudSshPublicKey.DeserializeNetworkCloudSshPublicKey(item, options)); + } + sshPublicKeys = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AdministratorConfigurationPatch(sshPublicKeys ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AdministratorConfigurationPatch)} does not support writing '{options.Format}' format."); + } + } + + AdministratorConfigurationPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAdministratorConfigurationPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AdministratorConfigurationPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministratorConfigurationPatch.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministratorConfigurationPatch.cs new file mode 100644 index 0000000000000..dcc4df4d461b7 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AdministratorConfigurationPatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// AdministratorConfigurationPatch represents the patching capabilities for the administrator configuration. + internal partial class AdministratorConfigurationPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AdministratorConfigurationPatch() + { + SshPublicKeys = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// SshPublicKey represents the public key used to authenticate with a resource through SSH. + /// Keeps track of any properties unknown to the library. + internal AdministratorConfigurationPatch(IList sshPublicKeys, IDictionary serializedAdditionalRawData) + { + SshPublicKeys = sshPublicKeys; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// SshPublicKey represents the public key used to authenticate with a resource through SSH. + public IList SshPublicKeys { get; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolUpgradeSettings.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolUpgradeSettings.Serialization.cs index 457acd4b8ee8a..a9f27e3110328 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolUpgradeSettings.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolUpgradeSettings.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.NetworkCloud.Models { - internal partial class AgentPoolUpgradeSettings : IUtf8JsonSerializable, IJsonModel + public partial class AgentPoolUpgradeSettings : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -34,11 +34,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AgentPoolUpgradeSettings)} does not support writing '{format}' format."); } + if (Optional.IsDefined(DrainTimeout)) + { + writer.WritePropertyName("drainTimeout"u8); + writer.WriteNumberValue(DrainTimeout.Value); + } if (Optional.IsDefined(MaxSurge)) { writer.WritePropertyName("maxSurge"u8); writer.WriteStringValue(MaxSurge); } + if (Optional.IsDefined(MaxUnavailable)) + { + writer.WritePropertyName("maxUnavailable"u8); + writer.WriteStringValue(MaxUnavailable); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -76,23 +86,39 @@ internal static AgentPoolUpgradeSettings DeserializeAgentPoolUpgradeSettings(Jso { return null; } + long? drainTimeout = default; string maxSurge = default; + string maxUnavailable = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("drainTimeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + drainTimeout = property.Value.GetInt64(); + continue; + } if (property.NameEquals("maxSurge"u8)) { maxSurge = property.Value.GetString(); continue; } + if (property.NameEquals("maxUnavailable"u8)) + { + maxUnavailable = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new AgentPoolUpgradeSettings(maxSurge, serializedAdditionalRawData); + return new AgentPoolUpgradeSettings(drainTimeout, maxSurge, maxUnavailable, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolUpgradeSettings.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolUpgradeSettings.cs index 578bc0c6f2f80..62b0b9191035e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolUpgradeSettings.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/AgentPoolUpgradeSettings.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.NetworkCloud.Models { /// AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool. - internal partial class AgentPoolUpgradeSettings + public partial class AgentPoolUpgradeSettings { /// /// Keeps track of any properties unknown to the library. @@ -51,15 +51,23 @@ public AgentPoolUpgradeSettings() } /// Initializes a new instance of . - /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. + /// The maximum time in seconds that is allowed for a node drain to complete before proceeding with the upgrade of the agent pool. If not specified during creation, a value of 1800 seconds is used. + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified during creation, a value of 1 is used. One of MaxSurge and MaxUnavailable must be greater than 0. + /// The maximum number or percentage of nodes that can be unavailable during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified during creation, a value of 0 is used. One of MaxSurge and MaxUnavailable must be greater than 0. /// Keeps track of any properties unknown to the library. - internal AgentPoolUpgradeSettings(string maxSurge, IDictionary serializedAdditionalRawData) + internal AgentPoolUpgradeSettings(long? drainTimeout, string maxSurge, string maxUnavailable, IDictionary serializedAdditionalRawData) { + DrainTimeout = drainTimeout; MaxSurge = maxSurge; + MaxUnavailable = maxUnavailable; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. + /// The maximum time in seconds that is allowed for a node drain to complete before proceeding with the upgrade of the agent pool. If not specified during creation, a value of 1800 seconds is used. + public long? DrainTimeout { get; set; } + /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified during creation, a value of 1 is used. One of MaxSurge and MaxUnavailable must be greater than 0. public string MaxSurge { get; set; } + /// The maximum number or percentage of nodes that can be unavailable during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified during creation, a value of 0 is used. One of MaxSurge and MaxUnavailable must be greater than 0. + public string MaxUnavailable { get; set; } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BgpServiceLoadBalancerConfiguration.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BgpServiceLoadBalancerConfiguration.cs index 81466dc7f315d..a35f115917aa2 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BgpServiceLoadBalancerConfiguration.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/BgpServiceLoadBalancerConfiguration.cs @@ -57,7 +57,7 @@ public BgpServiceLoadBalancerConfiguration() /// The association of IP address pools to the communities and peers, allowing for announcement of IPs. /// The list of additional BgpPeer entities that the Kubernetes cluster will peer with. All peering must be explicitly defined. /// The indicator to specify if the load balancer peers with the network fabric. - /// The list of pools of IP addresses that can be allocated to Load Balancer services. + /// The list of pools of IP addresses that can be allocated to load balancer services. /// Keeps track of any properties unknown to the library. internal BgpServiceLoadBalancerConfiguration(IList bgpAdvertisements, IList bgpPeers, FabricPeeringEnabled? fabricPeeringEnabled, IList ipAddressPools, IDictionary serializedAdditionalRawData) { @@ -74,7 +74,7 @@ internal BgpServiceLoadBalancerConfiguration(IList bgpAdvertis public IList BgpPeers { get; } /// The indicator to specify if the load balancer peers with the network fabric. public FabricPeeringEnabled? FabricPeeringEnabled { get; set; } - /// The list of pools of IP addresses that can be allocated to Load Balancer services. + /// The list of pools of IP addresses that can be allocated to load balancer services. public IList IPAddressPools { get; } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterCapacity.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterCapacity.cs index f90788d4f922d..165a87b89d76f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterCapacity.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterCapacity.cs @@ -51,14 +51,14 @@ internal ClusterCapacity() } /// Initializes a new instance of . - /// The remaining appliance-based storage in GB available for workload use. + /// The remaining appliance-based storage in GB available for workload use. Measured in gibibytes. /// The remaining number of cores that are available in this cluster for workload use. - /// The remaining machine or host-based storage in GB available for workload use. - /// The remaining memory in GB that are available in this cluster for workload use. - /// The total appliance-based storage in GB supported by this cluster for workload use. + /// The remaining machine or host-based storage in GB available for workload use. Measured in gibibytes. + /// The remaining memory in GB that are available in this cluster for workload use. Measured in gibibytes. + /// The total appliance-based storage in GB supported by this cluster for workload use. Measured in gibibytes. /// The total number of cores that are supported by this cluster for workload use. - /// The total machine or host-based storage in GB supported by this cluster for workload use. - /// The total memory supported by this cluster for workload use. + /// The total machine or host-based storage in GB supported by this cluster for workload use. Measured in gibibytes. + /// The total memory supported by this cluster for workload use. Measured in gibibytes. /// Keeps track of any properties unknown to the library. internal ClusterCapacity(long? availableApplianceStorageGB, long? availableCoreCount, long? availableHostStorageGB, long? availableMemoryGB, long? totalApplianceStorageGB, long? totalCoreCount, long? totalHostStorageGB, long? totalMemoryGB, IDictionary serializedAdditionalRawData) { @@ -73,21 +73,21 @@ internal ClusterCapacity(long? availableApplianceStorageGB, long? availableCoreC _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The remaining appliance-based storage in GB available for workload use. + /// The remaining appliance-based storage in GB available for workload use. Measured in gibibytes. public long? AvailableApplianceStorageGB { get; } /// The remaining number of cores that are available in this cluster for workload use. public long? AvailableCoreCount { get; } - /// The remaining machine or host-based storage in GB available for workload use. + /// The remaining machine or host-based storage in GB available for workload use. Measured in gibibytes. public long? AvailableHostStorageGB { get; } - /// The remaining memory in GB that are available in this cluster for workload use. + /// The remaining memory in GB that are available in this cluster for workload use. Measured in gibibytes. public long? AvailableMemoryGB { get; } - /// The total appliance-based storage in GB supported by this cluster for workload use. + /// The total appliance-based storage in GB supported by this cluster for workload use. Measured in gibibytes. public long? TotalApplianceStorageGB { get; } /// The total number of cores that are supported by this cluster for workload use. public long? TotalCoreCount { get; } - /// The total machine or host-based storage in GB supported by this cluster for workload use. + /// The total machine or host-based storage in GB supported by this cluster for workload use. Measured in gibibytes. public long? TotalHostStorageGB { get; } - /// The total memory supported by this cluster for workload use. + /// The total memory supported by this cluster for workload use. Measured in gibibytes. public long? TotalMemoryGB { get; } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterConnectionStatus.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterConnectionStatus.cs index d8a9de06dbb7f..8a7a5d09c4e0c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterConnectionStatus.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterConnectionStatus.cs @@ -23,11 +23,14 @@ public ClusterConnectionStatus(string value) } private const string ConnectedValue = "Connected"; + private const string DisconnectedValue = "Disconnected"; private const string TimeoutValue = "Timeout"; private const string UndefinedValue = "Undefined"; /// Connected. public static ClusterConnectionStatus Connected { get; } = new ClusterConnectionStatus(ConnectedValue); + /// Disconnected. + public static ClusterConnectionStatus Disconnected { get; } = new ClusterConnectionStatus(DisconnectedValue); /// Timeout. public static ClusterConnectionStatus Timeout { get; } = new ClusterConnectionStatus(TimeoutValue); /// Undefined. diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterContinueUpdateVersionContent.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterContinueUpdateVersionContent.Serialization.cs new file mode 100644 index 0000000000000..9f22798c433f9 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterContinueUpdateVersionContent.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class ClusterContinueUpdateVersionContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClusterContinueUpdateVersionContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MachineGroupTargetingMode)) + { + writer.WritePropertyName("machineGroupTargetingMode"u8); + writer.WriteStringValue(MachineGroupTargetingMode.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ClusterContinueUpdateVersionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClusterContinueUpdateVersionContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeClusterContinueUpdateVersionContent(document.RootElement, options); + } + + internal static ClusterContinueUpdateVersionContent DeserializeClusterContinueUpdateVersionContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ClusterContinueUpdateVersionMachineGroupTargetingMode? machineGroupTargetingMode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("machineGroupTargetingMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + machineGroupTargetingMode = new ClusterContinueUpdateVersionMachineGroupTargetingMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ClusterContinueUpdateVersionContent(machineGroupTargetingMode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ClusterContinueUpdateVersionContent)} does not support writing '{options.Format}' format."); + } + } + + ClusterContinueUpdateVersionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeClusterContinueUpdateVersionContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ClusterContinueUpdateVersionContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterContinueUpdateVersionContent.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterContinueUpdateVersionContent.cs new file mode 100644 index 0000000000000..921e98453205d --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterContinueUpdateVersionContent.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// ClusterContinueUpdateVersionParameters represents the body of the request to continue the update of a cluster version. + public partial class ClusterContinueUpdateVersionContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ClusterContinueUpdateVersionContent() + { + } + + /// Initializes a new instance of . + /// The mode by which the cluster will target the next grouping of servers to continue the update. + /// Keeps track of any properties unknown to the library. + internal ClusterContinueUpdateVersionContent(ClusterContinueUpdateVersionMachineGroupTargetingMode? machineGroupTargetingMode, IDictionary serializedAdditionalRawData) + { + MachineGroupTargetingMode = machineGroupTargetingMode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The mode by which the cluster will target the next grouping of servers to continue the update. + public ClusterContinueUpdateVersionMachineGroupTargetingMode? MachineGroupTargetingMode { get; set; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterContinueUpdateVersionMachineGroupTargetingMode.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterContinueUpdateVersionMachineGroupTargetingMode.cs new file mode 100644 index 0000000000000..9577982c2acad --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterContinueUpdateVersionMachineGroupTargetingMode.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// The mode by which the cluster will target the next grouping of servers to continue the update. + public readonly partial struct ClusterContinueUpdateVersionMachineGroupTargetingMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ClusterContinueUpdateVersionMachineGroupTargetingMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AlphaByRackValue = "AlphaByRack"; + + /// AlphaByRack. + public static ClusterContinueUpdateVersionMachineGroupTargetingMode AlphaByRack { get; } = new ClusterContinueUpdateVersionMachineGroupTargetingMode(AlphaByRackValue); + /// Determines if two values are the same. + public static bool operator ==(ClusterContinueUpdateVersionMachineGroupTargetingMode left, ClusterContinueUpdateVersionMachineGroupTargetingMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ClusterContinueUpdateVersionMachineGroupTargetingMode left, ClusterContinueUpdateVersionMachineGroupTargetingMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ClusterContinueUpdateVersionMachineGroupTargetingMode(string value) => new ClusterContinueUpdateVersionMachineGroupTargetingMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ClusterContinueUpdateVersionMachineGroupTargetingMode other && Equals(other); + /// + public bool Equals(ClusterContinueUpdateVersionMachineGroupTargetingMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterDetailedStatus.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterDetailedStatus.cs index e3a9271fd2ef3..0a7315e846ce7 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterDetailedStatus.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterDetailedStatus.cs @@ -26,6 +26,7 @@ public ClusterDetailedStatus(string value) private const string DeployingValue = "Deploying"; private const string RunningValue = "Running"; private const string UpdatingValue = "Updating"; + private const string UpdatePausedValue = "UpdatePaused"; private const string DegradedValue = "Degraded"; private const string DeletingValue = "Deleting"; private const string DisconnectedValue = "Disconnected"; @@ -39,6 +40,8 @@ public ClusterDetailedStatus(string value) public static ClusterDetailedStatus Running { get; } = new ClusterDetailedStatus(RunningValue); /// Updating. public static ClusterDetailedStatus Updating { get; } = new ClusterDetailedStatus(UpdatingValue); + /// UpdatePaused. + public static ClusterDetailedStatus UpdatePaused { get; } = new ClusterDetailedStatus(UpdatePausedValue); /// Degraded. public static ClusterDetailedStatus Degraded { get; } = new ClusterDetailedStatus(DegradedValue); /// Deleting. diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterScanRuntimeContent.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterScanRuntimeContent.Serialization.cs new file mode 100644 index 0000000000000..6047286f2ac06 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterScanRuntimeContent.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class ClusterScanRuntimeContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClusterScanRuntimeContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ScanActivity)) + { + writer.WritePropertyName("scanActivity"u8); + writer.WriteStringValue(ScanActivity.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ClusterScanRuntimeContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClusterScanRuntimeContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeClusterScanRuntimeContent(document.RootElement, options); + } + + internal static ClusterScanRuntimeContent DeserializeClusterScanRuntimeContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ClusterScanRuntimeParametersScanActivity? scanActivity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scanActivity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scanActivity = new ClusterScanRuntimeParametersScanActivity(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ClusterScanRuntimeContent(scanActivity, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ClusterScanRuntimeContent)} does not support writing '{options.Format}' format."); + } + } + + ClusterScanRuntimeContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeClusterScanRuntimeContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ClusterScanRuntimeContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterScanRuntimeContent.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterScanRuntimeContent.cs new file mode 100644 index 0000000000000..9433a29c64f45 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterScanRuntimeContent.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// ClusterScanRuntimeParameters defines the parameters for the cluster scan runtime operation. + public partial class ClusterScanRuntimeContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ClusterScanRuntimeContent() + { + } + + /// Initializes a new instance of . + /// The choice of if the scan operation should run the scan. + /// Keeps track of any properties unknown to the library. + internal ClusterScanRuntimeContent(ClusterScanRuntimeParametersScanActivity? scanActivity, IDictionary serializedAdditionalRawData) + { + ScanActivity = scanActivity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The choice of if the scan operation should run the scan. + public ClusterScanRuntimeParametersScanActivity? ScanActivity { get; set; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterScanRuntimeParametersScanActivity.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterScanRuntimeParametersScanActivity.cs new file mode 100644 index 0000000000000..88e7842d138ae --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterScanRuntimeParametersScanActivity.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// The choice of if the scan operation should run the scan. + public readonly partial struct ClusterScanRuntimeParametersScanActivity : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ClusterScanRuntimeParametersScanActivity(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ScanValue = "Scan"; + private const string SkipValue = "Skip"; + + /// Scan. + public static ClusterScanRuntimeParametersScanActivity Scan { get; } = new ClusterScanRuntimeParametersScanActivity(ScanValue); + /// Skip. + public static ClusterScanRuntimeParametersScanActivity Skip { get; } = new ClusterScanRuntimeParametersScanActivity(SkipValue); + /// Determines if two values are the same. + public static bool operator ==(ClusterScanRuntimeParametersScanActivity left, ClusterScanRuntimeParametersScanActivity right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ClusterScanRuntimeParametersScanActivity left, ClusterScanRuntimeParametersScanActivity right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ClusterScanRuntimeParametersScanActivity(string value) => new ClusterScanRuntimeParametersScanActivity(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ClusterScanRuntimeParametersScanActivity other && Equals(other); + /// + public bool Equals(ClusterScanRuntimeParametersScanActivity other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterSecretArchive.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterSecretArchive.Serialization.cs new file mode 100644 index 0000000000000..a2f316b30324a --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterSecretArchive.Serialization.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class ClusterSecretArchive : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClusterSecretArchive)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("keyVaultId"u8); + writer.WriteStringValue(KeyVaultId); + if (Optional.IsDefined(UseKeyVault)) + { + writer.WritePropertyName("useKeyVault"u8); + writer.WriteStringValue(UseKeyVault.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ClusterSecretArchive IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClusterSecretArchive)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeClusterSecretArchive(document.RootElement, options); + } + + internal static ClusterSecretArchive DeserializeClusterSecretArchive(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier keyVaultId = default; + ClusterSecretArchiveEnabled? useKeyVault = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyVaultId"u8)) + { + keyVaultId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("useKeyVault"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useKeyVault = new ClusterSecretArchiveEnabled(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ClusterSecretArchive(keyVaultId, useKeyVault, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ClusterSecretArchive)} does not support writing '{options.Format}' format."); + } + } + + ClusterSecretArchive IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeClusterSecretArchive(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ClusterSecretArchive)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterSecretArchive.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterSecretArchive.cs new file mode 100644 index 0000000000000..4b43a6efb9bda --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterSecretArchive.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// ClusterSecretArchive configures the key vault to archive the secrets of the cluster for later retrieval. + public partial class ClusterSecretArchive + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The resource ID of the key vault to archive the secrets of the cluster. + /// is null. + public ClusterSecretArchive(ResourceIdentifier keyVaultId) + { + Argument.AssertNotNull(keyVaultId, nameof(keyVaultId)); + + KeyVaultId = keyVaultId; + } + + /// Initializes a new instance of . + /// The resource ID of the key vault to archive the secrets of the cluster. + /// The indicator if the specified key vault should be used to archive the secrets of the cluster. + /// Keeps track of any properties unknown to the library. + internal ClusterSecretArchive(ResourceIdentifier keyVaultId, ClusterSecretArchiveEnabled? useKeyVault, IDictionary serializedAdditionalRawData) + { + KeyVaultId = keyVaultId; + UseKeyVault = useKeyVault; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ClusterSecretArchive() + { + } + + /// The resource ID of the key vault to archive the secrets of the cluster. + public ResourceIdentifier KeyVaultId { get; set; } + /// The indicator if the specified key vault should be used to archive the secrets of the cluster. + public ClusterSecretArchiveEnabled? UseKeyVault { get; set; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterSecretArchiveEnabled.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterSecretArchiveEnabled.cs new file mode 100644 index 0000000000000..a0f74bb07afcd --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterSecretArchiveEnabled.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// The indicator if the specified key vault should be used to archive the secrets of the cluster. + public readonly partial struct ClusterSecretArchiveEnabled : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ClusterSecretArchiveEnabled(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TrueValue = "True"; + private const string FalseValue = "False"; + + /// True. + public static ClusterSecretArchiveEnabled True { get; } = new ClusterSecretArchiveEnabled(TrueValue); + /// False. + public static ClusterSecretArchiveEnabled False { get; } = new ClusterSecretArchiveEnabled(FalseValue); + /// Determines if two values are the same. + public static bool operator ==(ClusterSecretArchiveEnabled left, ClusterSecretArchiveEnabled right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ClusterSecretArchiveEnabled left, ClusterSecretArchiveEnabled right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ClusterSecretArchiveEnabled(string value) => new ClusterSecretArchiveEnabled(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ClusterSecretArchiveEnabled other && Equals(other); + /// + public bool Equals(ClusterSecretArchiveEnabled other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateStrategy.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateStrategy.Serialization.cs new file mode 100644 index 0000000000000..1adea3ab52d38 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateStrategy.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class ClusterUpdateStrategy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClusterUpdateStrategy)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MaxUnavailable)) + { + writer.WritePropertyName("maxUnavailable"u8); + writer.WriteNumberValue(MaxUnavailable.Value); + } + writer.WritePropertyName("strategyType"u8); + writer.WriteStringValue(StrategyType.ToString()); + writer.WritePropertyName("thresholdType"u8); + writer.WriteStringValue(ThresholdType.ToString()); + writer.WritePropertyName("thresholdValue"u8); + writer.WriteNumberValue(ThresholdValue); + if (Optional.IsDefined(WaitTimeMinutes)) + { + writer.WritePropertyName("waitTimeMinutes"u8); + writer.WriteNumberValue(WaitTimeMinutes.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ClusterUpdateStrategy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClusterUpdateStrategy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeClusterUpdateStrategy(document.RootElement, options); + } + + internal static ClusterUpdateStrategy DeserializeClusterUpdateStrategy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? maxUnavailable = default; + ClusterUpdateStrategyType strategyType = default; + ValidationThresholdType thresholdType = default; + long thresholdValue = default; + long? waitTimeMinutes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxUnavailable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxUnavailable = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("strategyType"u8)) + { + strategyType = new ClusterUpdateStrategyType(property.Value.GetString()); + continue; + } + if (property.NameEquals("thresholdType"u8)) + { + thresholdType = new ValidationThresholdType(property.Value.GetString()); + continue; + } + if (property.NameEquals("thresholdValue"u8)) + { + thresholdValue = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("waitTimeMinutes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + waitTimeMinutes = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ClusterUpdateStrategy( + maxUnavailable, + strategyType, + thresholdType, + thresholdValue, + waitTimeMinutes, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ClusterUpdateStrategy)} does not support writing '{options.Format}' format."); + } + } + + ClusterUpdateStrategy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeClusterUpdateStrategy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ClusterUpdateStrategy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateStrategy.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateStrategy.cs new file mode 100644 index 0000000000000..1fc2b06748a3f --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateStrategy.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// ClusterUpdateStrategy represents the strategy for updating the cluster. + public partial class ClusterUpdateStrategy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The mode of operation for runtime protection. + /// Selection of how the threshold should be evaluated. + /// The numeric threshold value. + public ClusterUpdateStrategy(ClusterUpdateStrategyType strategyType, ValidationThresholdType thresholdType, long thresholdValue) + { + StrategyType = strategyType; + ThresholdType = thresholdType; + ThresholdValue = thresholdValue; + } + + /// Initializes a new instance of . + /// + /// The maximum number of worker nodes that can be offline within the increment of update, e.g., rack-by-rack. + /// Limited by the maximum number of machines in the increment. Defaults to the whole increment size. + /// + /// The mode of operation for runtime protection. + /// Selection of how the threshold should be evaluated. + /// The numeric threshold value. + /// The time to wait between the increments of update defined by the strategy. + /// Keeps track of any properties unknown to the library. + internal ClusterUpdateStrategy(long? maxUnavailable, ClusterUpdateStrategyType strategyType, ValidationThresholdType thresholdType, long thresholdValue, long? waitTimeMinutes, IDictionary serializedAdditionalRawData) + { + MaxUnavailable = maxUnavailable; + StrategyType = strategyType; + ThresholdType = thresholdType; + ThresholdValue = thresholdValue; + WaitTimeMinutes = waitTimeMinutes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ClusterUpdateStrategy() + { + } + + /// + /// The maximum number of worker nodes that can be offline within the increment of update, e.g., rack-by-rack. + /// Limited by the maximum number of machines in the increment. Defaults to the whole increment size. + /// + public long? MaxUnavailable { get; set; } + /// The mode of operation for runtime protection. + public ClusterUpdateStrategyType StrategyType { get; set; } + /// Selection of how the threshold should be evaluated. + public ValidationThresholdType ThresholdType { get; set; } + /// The numeric threshold value. + public long ThresholdValue { get; set; } + /// The time to wait between the increments of update defined by the strategy. + public long? WaitTimeMinutes { get; set; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateStrategyType.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateStrategyType.cs new file mode 100644 index 0000000000000..205bec0c83bca --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ClusterUpdateStrategyType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// The mode of operation for runtime protection. + public readonly partial struct ClusterUpdateStrategyType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ClusterUpdateStrategyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RackValue = "Rack"; + private const string PauseAfterRackValue = "PauseAfterRack"; + + /// Rack. + public static ClusterUpdateStrategyType Rack { get; } = new ClusterUpdateStrategyType(RackValue); + /// PauseAfterRack. + public static ClusterUpdateStrategyType PauseAfterRack { get; } = new ClusterUpdateStrategyType(PauseAfterRackValue); + /// Determines if two values are the same. + public static bool operator ==(ClusterUpdateStrategyType left, ClusterUpdateStrategyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ClusterUpdateStrategyType left, ClusterUpdateStrategyType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ClusterUpdateStrategyType(string value) => new ClusterUpdateStrategyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ClusterUpdateStrategyType other && Equals(other); + /// + public bool Equals(ClusterUpdateStrategyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/CommandOutputSettings.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/CommandOutputSettings.Serialization.cs new file mode 100644 index 0000000000000..1ce79c91c007f --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/CommandOutputSettings.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class CommandOutputSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CommandOutputSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AssociatedIdentity)) + { + writer.WritePropertyName("associatedIdentity"u8); + writer.WriteObjectValue(AssociatedIdentity, options); + } + if (Optional.IsDefined(ContainerUri)) + { + writer.WritePropertyName("containerUrl"u8); + writer.WriteStringValue(ContainerUri.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CommandOutputSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CommandOutputSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCommandOutputSettings(document.RootElement, options); + } + + internal static CommandOutputSettings DeserializeCommandOutputSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IdentitySelector associatedIdentity = default; + Uri containerUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("associatedIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + associatedIdentity = IdentitySelector.DeserializeIdentitySelector(property.Value, options); + continue; + } + if (property.NameEquals("containerUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerUrl = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CommandOutputSettings(associatedIdentity, containerUrl, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CommandOutputSettings)} does not support writing '{options.Format}' format."); + } + } + + CommandOutputSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCommandOutputSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CommandOutputSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/CommandOutputSettings.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/CommandOutputSettings.cs new file mode 100644 index 0000000000000..50136bdb94ef8 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/CommandOutputSettings.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// CommandOutputSettings represents the settings for commands run within the cluster such as bare metal machine run read-only commands. + public partial class CommandOutputSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CommandOutputSettings() + { + } + + /// Initializes a new instance of . + /// The selection of the managed identity to use with this storage account container. The identity type must be either system assigned or user assigned. + /// The URL of the storage account container that is to be used by the specified identities. + /// Keeps track of any properties unknown to the library. + internal CommandOutputSettings(IdentitySelector associatedIdentity, Uri containerUri, IDictionary serializedAdditionalRawData) + { + AssociatedIdentity = associatedIdentity; + ContainerUri = containerUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The selection of the managed identity to use with this storage account container. The identity type must be either system assigned or user assigned. + public IdentitySelector AssociatedIdentity { get; set; } + /// The URL of the storage account container that is to be used by the specified identities. + public Uri ContainerUri { get; set; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ConsoleEnabled.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ConsoleEnabled.cs index 43501a32d6cc9..ec9c3d13af775 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ConsoleEnabled.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ConsoleEnabled.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.NetworkCloud.Models { - /// The credentials used to login to the image repository that has access to the specified image. + /// The indicator of whether the console access is enabled. public readonly partial struct ConsoleEnabled : IEquatable { private readonly string _value; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodePatchConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodePatchConfiguration.Serialization.cs index 99f70b794d4c8..d3d3b24e9690e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodePatchConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodePatchConfiguration.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.NetworkCloud.Models { - internal partial class ControlPlaneNodePatchConfiguration : IUtf8JsonSerializable, IJsonModel + public partial class ControlPlaneNodePatchConfiguration : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -34,6 +34,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ControlPlaneNodePatchConfiguration)} does not support writing '{format}' format."); } + if (Optional.IsDefined(AdministratorConfiguration)) + { + writer.WritePropertyName("administratorConfiguration"u8); + writer.WriteObjectValue(AdministratorConfiguration, options); + } if (Optional.IsDefined(Count)) { writer.WritePropertyName("count"u8); @@ -76,11 +81,21 @@ internal static ControlPlaneNodePatchConfiguration DeserializeControlPlaneNodePa { return null; } + AdministratorConfigurationPatch administratorConfiguration = default; long? count = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("administratorConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administratorConfiguration = AdministratorConfigurationPatch.DeserializeAdministratorConfigurationPatch(property.Value, options); + continue; + } if (property.NameEquals("count"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -96,7 +111,7 @@ internal static ControlPlaneNodePatchConfiguration DeserializeControlPlaneNodePa } } serializedAdditionalRawData = rawDataDictionary; - return new ControlPlaneNodePatchConfiguration(count, serializedAdditionalRawData); + return new ControlPlaneNodePatchConfiguration(administratorConfiguration, count, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodePatchConfiguration.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodePatchConfiguration.cs index 593e23ff0f7c6..37fca0c3068f3 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodePatchConfiguration.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ControlPlaneNodePatchConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.NetworkCloud.Models { /// ControlPlaneNodePatchConfiguration represents the properties of the control plane that can be patched for this Kubernetes cluster. - internal partial class ControlPlaneNodePatchConfiguration + public partial class ControlPlaneNodePatchConfiguration { /// /// Keeps track of any properties unknown to the library. @@ -51,14 +51,29 @@ public ControlPlaneNodePatchConfiguration() } /// Initializes a new instance of . + /// The configuration of administrator credentials for the control plane nodes. /// The number of virtual machines that use this configuration. /// Keeps track of any properties unknown to the library. - internal ControlPlaneNodePatchConfiguration(long? count, IDictionary serializedAdditionalRawData) + internal ControlPlaneNodePatchConfiguration(AdministratorConfigurationPatch administratorConfiguration, long? count, IDictionary serializedAdditionalRawData) { + AdministratorConfiguration = administratorConfiguration; Count = count; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The configuration of administrator credentials for the control plane nodes. + internal AdministratorConfigurationPatch AdministratorConfiguration { get; set; } + /// SshPublicKey represents the public key used to authenticate with a resource through SSH. + public IList AdministratorSshPublicKeys + { + get + { + if (AdministratorConfiguration is null) + AdministratorConfiguration = new AdministratorConfigurationPatch(); + return AdministratorConfiguration.SshPublicKeys; + } + } + /// The number of virtual machines that use this configuration. public long? Count { get; set; } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IPAddressPool.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IPAddressPool.cs index 78678c5e121d1..5efb40d5f81e0 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IPAddressPool.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IPAddressPool.cs @@ -47,7 +47,7 @@ public partial class IPAddressPool private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The list of IP address ranges. Each range can be a either a subnet in CIDR format or an explicit start-end range of IP addresses. + /// The list of IP address ranges. Each range can be a either a subnet in CIDR format or an explicit start-end range of IP addresses. For a BGP service load balancer configuration, only CIDR format is supported and excludes /32 (IPv4) and /128 (IPv6) prefixes. /// The name used to identify this IP address pool for association with a BGP advertisement. /// or is null. public IPAddressPool(IEnumerable addresses, string name) @@ -60,7 +60,7 @@ public IPAddressPool(IEnumerable addresses, string name) } /// Initializes a new instance of . - /// The list of IP address ranges. Each range can be a either a subnet in CIDR format or an explicit start-end range of IP addresses. + /// The list of IP address ranges. Each range can be a either a subnet in CIDR format or an explicit start-end range of IP addresses. For a BGP service load balancer configuration, only CIDR format is supported and excludes /32 (IPv4) and /128 (IPv6) prefixes. /// The indicator to determine if automatic allocation from the pool should occur. /// The name used to identify this IP address pool for association with a BGP advertisement. /// The indicator to prevent the use of IP addresses ending with .0 and .255 for this pool. Enabling this option will only use IP addresses between .1 and .254 inclusive. @@ -79,7 +79,7 @@ internal IPAddressPool() { } - /// The list of IP address ranges. Each range can be a either a subnet in CIDR format or an explicit start-end range of IP addresses. + /// The list of IP address ranges. Each range can be a either a subnet in CIDR format or an explicit start-end range of IP addresses. For a BGP service load balancer configuration, only CIDR format is supported and excludes /32 (IPv4) and /128 (IPv6) prefixes. public IList Addresses { get; } /// The indicator to determine if automatic allocation from the pool should occur. public BfdEnabled? AutoAssign { get; set; } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IdentitySelector.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IdentitySelector.Serialization.cs new file mode 100644 index 0000000000000..cb19f46f31319 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IdentitySelector.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class IdentitySelector : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IdentitySelector)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IdentityType)) + { + writer.WritePropertyName("identityType"u8); + writer.WriteStringValue(IdentityType.Value.ToString()); + } + if (Optional.IsDefined(UserAssignedIdentityResourceId)) + { + writer.WritePropertyName("userAssignedIdentityResourceId"u8); + writer.WriteStringValue(UserAssignedIdentityResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + IdentitySelector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IdentitySelector)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIdentitySelector(document.RootElement, options); + } + + internal static IdentitySelector DeserializeIdentitySelector(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedServiceIdentitySelectorType? identityType = default; + ResourceIdentifier userAssignedIdentityResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identityType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identityType = new ManagedServiceIdentitySelectorType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentityResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedIdentityResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new IdentitySelector(identityType, userAssignedIdentityResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(IdentitySelector)} does not support writing '{options.Format}' format."); + } + } + + IdentitySelector IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeIdentitySelector(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IdentitySelector)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IdentitySelector.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IdentitySelector.cs new file mode 100644 index 0000000000000..63a3f680c3f8b --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/IdentitySelector.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// IdentitySelector represents the selection of a managed identity for use. + public partial class IdentitySelector + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public IdentitySelector() + { + } + + /// Initializes a new instance of . + /// The type of managed identity that is being selected. + /// The user assigned managed identity resource ID to use. Mutually exclusive with a system assigned identity type. + /// Keeps track of any properties unknown to the library. + internal IdentitySelector(ManagedServiceIdentitySelectorType? identityType, ResourceIdentifier userAssignedIdentityResourceId, IDictionary serializedAdditionalRawData) + { + IdentityType = identityType; + UserAssignedIdentityResourceId = userAssignedIdentityResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of managed identity that is being selected. + public ManagedServiceIdentitySelectorType? IdentityType { get; set; } + /// The user assigned managed identity resource ID to use. Mutually exclusive with a system assigned identity type. + public ResourceIdentifier UserAssignedIdentityResourceId { get; set; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/InitialAgentPoolConfiguration.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/InitialAgentPoolConfiguration.cs index d4131d9a76505..6faec8c221485 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/InitialAgentPoolConfiguration.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/InitialAgentPoolConfiguration.cs @@ -118,19 +118,7 @@ internal InitialAgentPoolConfiguration() /// The taints applied to the nodes in this agent pool. public IList Taints { get; } /// The configuration of the agent pool. - internal AgentPoolUpgradeSettings UpgradeSettings { get; set; } - /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. - public string UpgradeMaxSurge - { - get => UpgradeSettings is null ? default : UpgradeSettings.MaxSurge; - set - { - if (UpgradeSettings is null) - UpgradeSettings = new AgentPoolUpgradeSettings(); - UpgradeSettings.MaxSurge = value; - } - } - + public AgentPoolUpgradeSettings UpgradeSettings { get; set; } /// The name of the VM SKU that determines the size of resources allocated for node VMs. public string VmSkuName { get; set; } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUser.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUser.Serialization.cs index a2e07e3667b64..130f32abe033b 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUser.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUser.Serialization.cs @@ -43,6 +43,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("sshPublicKey"u8); writer.WriteObjectValue(SshPublicKey, options); + if (Optional.IsDefined(UserPrincipalName)) + { + writer.WritePropertyName("userPrincipalName"u8); + writer.WriteStringValue(UserPrincipalName); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -83,6 +88,7 @@ internal static KeySetUser DeserializeKeySetUser(JsonElement element, ModelReade string azureUserName = default; string description = default; NetworkCloudSshPublicKey sshPublicKey = default; + string userPrincipalName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -102,13 +108,18 @@ internal static KeySetUser DeserializeKeySetUser(JsonElement element, ModelReade sshPublicKey = NetworkCloudSshPublicKey.DeserializeNetworkCloudSshPublicKey(property.Value, options); continue; } + if (property.NameEquals("userPrincipalName"u8)) + { + userPrincipalName = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new KeySetUser(azureUserName, description, sshPublicKey, serializedAdditionalRawData); + return new KeySetUser(azureUserName, description, sshPublicKey, userPrincipalName, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUser.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUser.cs index 00f2c8e0cdffe..3357605af9243 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUser.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KeySetUser.cs @@ -62,12 +62,14 @@ public KeySetUser(string azureUserName, NetworkCloudSshPublicKey sshPublicKey) /// The user name that will be used for access. /// The free-form description for this user. /// The SSH public key that will be provisioned for user access. The user is expected to have the corresponding SSH private key for logging in. + /// The user principal name (email format) used to validate this user's group membership. /// Keeps track of any properties unknown to the library. - internal KeySetUser(string azureUserName, string description, NetworkCloudSshPublicKey sshPublicKey, IDictionary serializedAdditionalRawData) + internal KeySetUser(string azureUserName, string description, NetworkCloudSshPublicKey sshPublicKey, string userPrincipalName, IDictionary serializedAdditionalRawData) { AzureUserName = azureUserName; Description = description; SshPublicKey = sshPublicKey; + UserPrincipalName = userPrincipalName; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -88,5 +90,8 @@ public string KeyData get => SshPublicKey is null ? default : SshPublicKey.KeyData; set => SshPublicKey = new NetworkCloudSshPublicKey(value); } + + /// The user principal name (email format) used to validate this user's group membership. + public string UserPrincipalName { get; set; } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureAvailabilityLifecycle.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureAvailabilityLifecycle.cs new file mode 100644 index 0000000000000..3b0cbbe5a52d6 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureAvailabilityLifecycle.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// The lifecycle indicator of the feature. + public readonly partial struct KubernetesClusterFeatureAvailabilityLifecycle : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public KubernetesClusterFeatureAvailabilityLifecycle(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PreviewValue = "Preview"; + private const string GenerallyAvailableValue = "GenerallyAvailable"; + + /// Preview. + public static KubernetesClusterFeatureAvailabilityLifecycle Preview { get; } = new KubernetesClusterFeatureAvailabilityLifecycle(PreviewValue); + /// GenerallyAvailable. + public static KubernetesClusterFeatureAvailabilityLifecycle GenerallyAvailable { get; } = new KubernetesClusterFeatureAvailabilityLifecycle(GenerallyAvailableValue); + /// Determines if two values are the same. + public static bool operator ==(KubernetesClusterFeatureAvailabilityLifecycle left, KubernetesClusterFeatureAvailabilityLifecycle right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(KubernetesClusterFeatureAvailabilityLifecycle left, KubernetesClusterFeatureAvailabilityLifecycle right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator KubernetesClusterFeatureAvailabilityLifecycle(string value) => new KubernetesClusterFeatureAvailabilityLifecycle(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is KubernetesClusterFeatureAvailabilityLifecycle other && Equals(other); + /// + public bool Equals(KubernetesClusterFeatureAvailabilityLifecycle other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureDetailedStatus.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureDetailedStatus.cs new file mode 100644 index 0000000000000..4ce19092a1576 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureDetailedStatus.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// The detailed status of the feature. + public readonly partial struct KubernetesClusterFeatureDetailedStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public KubernetesClusterFeatureDetailedStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ErrorValue = "Error"; + private const string ProvisioningValue = "Provisioning"; + private const string InstalledValue = "Installed"; + + /// Error. + public static KubernetesClusterFeatureDetailedStatus Error { get; } = new KubernetesClusterFeatureDetailedStatus(ErrorValue); + /// Provisioning. + public static KubernetesClusterFeatureDetailedStatus Provisioning { get; } = new KubernetesClusterFeatureDetailedStatus(ProvisioningValue); + /// Installed. + public static KubernetesClusterFeatureDetailedStatus Installed { get; } = new KubernetesClusterFeatureDetailedStatus(InstalledValue); + /// Determines if two values are the same. + public static bool operator ==(KubernetesClusterFeatureDetailedStatus left, KubernetesClusterFeatureDetailedStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(KubernetesClusterFeatureDetailedStatus left, KubernetesClusterFeatureDetailedStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator KubernetesClusterFeatureDetailedStatus(string value) => new KubernetesClusterFeatureDetailedStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is KubernetesClusterFeatureDetailedStatus other && Equals(other); + /// + public bool Equals(KubernetesClusterFeatureDetailedStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureList.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureList.Serialization.cs new file mode 100644 index 0000000000000..4aaa8165015f1 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureList.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + internal partial class KubernetesClusterFeatureList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(KubernetesClusterFeatureList)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + KubernetesClusterFeatureList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(KubernetesClusterFeatureList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeKubernetesClusterFeatureList(document.RootElement, options); + } + + internal static KubernetesClusterFeatureList DeserializeKubernetesClusterFeatureList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string nextLink = default; + IReadOnlyList value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkCloudKubernetesClusterFeatureData.DeserializeNetworkCloudKubernetesClusterFeatureData(item, options)); + } + value = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new KubernetesClusterFeatureList(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(KubernetesClusterFeatureList)} does not support writing '{options.Format}' format."); + } + } + + KubernetesClusterFeatureList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeKubernetesClusterFeatureList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(KubernetesClusterFeatureList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureList.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureList.cs new file mode 100644 index 0000000000000..9b18fd853b8a1 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureList.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// KubernetesClusterFeatureList represents the list of Kubernetes cluster feature resources. + internal partial class KubernetesClusterFeatureList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal KubernetesClusterFeatureList() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The link used to get the next page of operations. + /// The list of Kubernetes cluster features. + /// Keeps track of any properties unknown to the library. + internal KubernetesClusterFeatureList(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + { + NextLink = nextLink; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The link used to get the next page of operations. + public string NextLink { get; } + /// The list of Kubernetes cluster features. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureProvisioningState.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureProvisioningState.cs new file mode 100644 index 0000000000000..efeeb9bf68459 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// The provisioning state of the Kubernetes cluster feature. + public readonly partial struct KubernetesClusterFeatureProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public KubernetesClusterFeatureProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AcceptedValue = "Accepted"; + private const string CanceledValue = "Canceled"; + private const string DeletingValue = "Deleting"; + private const string FailedValue = "Failed"; + private const string SucceededValue = "Succeeded"; + private const string UpdatingValue = "Updating"; + + /// Accepted. + public static KubernetesClusterFeatureProvisioningState Accepted { get; } = new KubernetesClusterFeatureProvisioningState(AcceptedValue); + /// Canceled. + public static KubernetesClusterFeatureProvisioningState Canceled { get; } = new KubernetesClusterFeatureProvisioningState(CanceledValue); + /// Deleting. + public static KubernetesClusterFeatureProvisioningState Deleting { get; } = new KubernetesClusterFeatureProvisioningState(DeletingValue); + /// Failed. + public static KubernetesClusterFeatureProvisioningState Failed { get; } = new KubernetesClusterFeatureProvisioningState(FailedValue); + /// Succeeded. + public static KubernetesClusterFeatureProvisioningState Succeeded { get; } = new KubernetesClusterFeatureProvisioningState(SucceededValue); + /// Updating. + public static KubernetesClusterFeatureProvisioningState Updating { get; } = new KubernetesClusterFeatureProvisioningState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(KubernetesClusterFeatureProvisioningState left, KubernetesClusterFeatureProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(KubernetesClusterFeatureProvisioningState left, KubernetesClusterFeatureProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator KubernetesClusterFeatureProvisioningState(string value) => new KubernetesClusterFeatureProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is KubernetesClusterFeatureProvisioningState other && Equals(other); + /// + public bool Equals(KubernetesClusterFeatureProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureRequired.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureRequired.cs new file mode 100644 index 0000000000000..7998ce459f63a --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterFeatureRequired.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// The indicator of if the feature is required or optional. Optional features may be deleted by the user, while required features are managed with the kubernetes cluster lifecycle. + public readonly partial struct KubernetesClusterFeatureRequired : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public KubernetesClusterFeatureRequired(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TrueValue = "True"; + private const string FalseValue = "False"; + + /// True. + public static KubernetesClusterFeatureRequired True { get; } = new KubernetesClusterFeatureRequired(TrueValue); + /// False. + public static KubernetesClusterFeatureRequired False { get; } = new KubernetesClusterFeatureRequired(FalseValue); + /// Determines if two values are the same. + public static bool operator ==(KubernetesClusterFeatureRequired left, KubernetesClusterFeatureRequired right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(KubernetesClusterFeatureRequired left, KubernetesClusterFeatureRequired right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator KubernetesClusterFeatureRequired(string value) => new KubernetesClusterFeatureRequired(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is KubernetesClusterFeatureRequired other && Equals(other); + /// + public bool Equals(KubernetesClusterFeatureRequired other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNetworkConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNetworkConfiguration.Serialization.cs index 5311e6fa18fd2..d453b5d89f19f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNetworkConfiguration.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNetworkConfiguration.Serialization.cs @@ -54,6 +54,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("dnsServiceIp"u8); writer.WriteStringValue(DnsServiceIP.ToString()); } + if (Optional.IsDefined(L2ServiceLoadBalancerConfiguration)) + { + writer.WritePropertyName("l2ServiceLoadBalancerConfiguration"u8); + writer.WriteObjectValue(L2ServiceLoadBalancerConfiguration, options); + } if (Optional.IsCollectionDefined(PodCidrs)) { writer.WritePropertyName("podCidrs"u8); @@ -116,6 +121,7 @@ internal static KubernetesClusterNetworkConfiguration DeserializeKubernetesClust ResourceIdentifier cloudServicesNetworkId = default; ResourceIdentifier cniNetworkId = default; IPAddress dnsServiceIP = default; + L2ServiceLoadBalancerConfiguration l2ServiceLoadBalancerConfiguration = default; IList podCidrs = default; IList serviceCidrs = default; IDictionary serializedAdditionalRawData = default; @@ -159,6 +165,15 @@ internal static KubernetesClusterNetworkConfiguration DeserializeKubernetesClust dnsServiceIP = IPAddress.Parse(property.Value.GetString()); continue; } + if (property.NameEquals("l2ServiceLoadBalancerConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + l2ServiceLoadBalancerConfiguration = L2ServiceLoadBalancerConfiguration.DeserializeL2ServiceLoadBalancerConfiguration(property.Value, options); + continue; + } if (property.NameEquals("podCidrs"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -199,6 +214,7 @@ internal static KubernetesClusterNetworkConfiguration DeserializeKubernetesClust cloudServicesNetworkId, cniNetworkId, dnsServiceIP, + l2ServiceLoadBalancerConfiguration, podCidrs ?? new ChangeTrackingList(), serviceCidrs ?? new ChangeTrackingList(), serializedAdditionalRawData); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNetworkConfiguration.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNetworkConfiguration.cs index ec910cb7200ac..40a8977e59e2c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNetworkConfiguration.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNetworkConfiguration.cs @@ -64,20 +64,22 @@ public KubernetesClusterNetworkConfiguration(ResourceIdentifier cloudServicesNet /// Initializes a new instance of . /// The configuration of networks being attached to the cluster for use by the workloads that run on this Kubernetes cluster. - /// The configuration of the BGP service load balancer for this Kubernetes cluster. + /// The configuration of the BGP service load balancer for this Kubernetes cluster. A maximum of one service load balancer may be specified, either Layer 2 or BGP. /// The resource ID of the associated Cloud Services network. /// The resource ID of the Layer 3 network that is used for creation of the Container Networking Interface network. /// The IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in service CIDR. + /// The configuration of the Layer 2 service load balancer for this Kubernetes cluster. A maximum of one service load balancer may be specified, either Layer 2 or BGP. /// The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. /// The CIDR notation IP ranges from which to assign service IPs. One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. /// Keeps track of any properties unknown to the library. - internal KubernetesClusterNetworkConfiguration(AttachedNetworkConfiguration attachedNetworkConfiguration, BgpServiceLoadBalancerConfiguration bgpServiceLoadBalancerConfiguration, ResourceIdentifier cloudServicesNetworkId, ResourceIdentifier cniNetworkId, IPAddress dnsServiceIP, IList podCidrs, IList serviceCidrs, IDictionary serializedAdditionalRawData) + internal KubernetesClusterNetworkConfiguration(AttachedNetworkConfiguration attachedNetworkConfiguration, BgpServiceLoadBalancerConfiguration bgpServiceLoadBalancerConfiguration, ResourceIdentifier cloudServicesNetworkId, ResourceIdentifier cniNetworkId, IPAddress dnsServiceIP, L2ServiceLoadBalancerConfiguration l2ServiceLoadBalancerConfiguration, IList podCidrs, IList serviceCidrs, IDictionary serializedAdditionalRawData) { AttachedNetworkConfiguration = attachedNetworkConfiguration; BgpServiceLoadBalancerConfiguration = bgpServiceLoadBalancerConfiguration; CloudServicesNetworkId = cloudServicesNetworkId; CniNetworkId = cniNetworkId; DnsServiceIP = dnsServiceIP; + L2ServiceLoadBalancerConfiguration = l2ServiceLoadBalancerConfiguration; PodCidrs = podCidrs; ServiceCidrs = serviceCidrs; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -90,7 +92,7 @@ internal KubernetesClusterNetworkConfiguration() /// The configuration of networks being attached to the cluster for use by the workloads that run on this Kubernetes cluster. public AttachedNetworkConfiguration AttachedNetworkConfiguration { get; set; } - /// The configuration of the BGP service load balancer for this Kubernetes cluster. + /// The configuration of the BGP service load balancer for this Kubernetes cluster. A maximum of one service load balancer may be specified, either Layer 2 or BGP. public BgpServiceLoadBalancerConfiguration BgpServiceLoadBalancerConfiguration { get; set; } /// The resource ID of the associated Cloud Services network. public ResourceIdentifier CloudServicesNetworkId { get; set; } @@ -98,6 +100,19 @@ internal KubernetesClusterNetworkConfiguration() public ResourceIdentifier CniNetworkId { get; set; } /// The IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in service CIDR. public IPAddress DnsServiceIP { get; set; } + /// The configuration of the Layer 2 service load balancer for this Kubernetes cluster. A maximum of one service load balancer may be specified, either Layer 2 or BGP. + internal L2ServiceLoadBalancerConfiguration L2ServiceLoadBalancerConfiguration { get; set; } + /// The list of pools of IP addresses that can be allocated to load balancer services. + public IList L2ServiceLoadBalancerIPAddressPools + { + get + { + if (L2ServiceLoadBalancerConfiguration is null) + L2ServiceLoadBalancerConfiguration = new L2ServiceLoadBalancerConfiguration(); + return L2ServiceLoadBalancerConfiguration.IPAddressPools; + } + } + /// The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. public IList PodCidrs { get; } /// The CIDR notation IP ranges from which to assign service IPs. One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNode.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNode.Serialization.cs index 73dd50e7e3cf0..a049c9272c175 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNode.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNode.Serialization.cs @@ -34,20 +34,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KubernetesClusterNode)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsDefined(AgentPoolId)) + if (options.Format != "W" && Optional.IsDefined(AgentPoolArmId)) { writer.WritePropertyName("agentPoolId"u8); - writer.WriteStringValue(AgentPoolId); + writer.WriteStringValue(AgentPoolArmId); } if (options.Format != "W" && Optional.IsDefined(AvailabilityZone)) { writer.WritePropertyName("availabilityZone"u8); writer.WriteStringValue(AvailabilityZone); } - if (options.Format != "W" && Optional.IsDefined(BareMetalMachineId)) + if (options.Format != "W" && Optional.IsDefined(BareMetalMachineArmId)) { writer.WritePropertyName("bareMetalMachineId"u8); - writer.WriteStringValue(BareMetalMachineId); + writer.WriteStringValue(BareMetalMachineArmId); } if (options.Format != "W" && Optional.IsDefined(CpuCores)) { @@ -176,9 +176,9 @@ internal static KubernetesClusterNode DeserializeKubernetesClusterNode(JsonEleme { return null; } - string agentPoolId = default; + ResourceIdentifier agentPoolId = default; string availabilityZone = default; - string bareMetalMachineId = default; + ResourceIdentifier bareMetalMachineId = default; long? cpuCores = default; KubernetesClusterNodeDetailedStatus? detailedStatus = default; string detailedStatusMessage = default; @@ -200,7 +200,11 @@ internal static KubernetesClusterNode DeserializeKubernetesClusterNode(JsonEleme { if (property.NameEquals("agentPoolId"u8)) { - agentPoolId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + agentPoolId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("availabilityZone"u8)) @@ -210,7 +214,11 @@ internal static KubernetesClusterNode DeserializeKubernetesClusterNode(JsonEleme } if (property.NameEquals("bareMetalMachineId"u8)) { - bareMetalMachineId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bareMetalMachineId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("cpuCores"u8)) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNode.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNode.cs index 4a6073182900a..32783bfe2f1db 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNode.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/KubernetesClusterNode.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.NetworkCloud.Models { @@ -54,17 +55,17 @@ internal KubernetesClusterNode() } /// Initializes a new instance of . - /// The resource ID of the agent pool that this node belongs to. This value is not represented on control plane nodes. + /// The resource ID of the agent pool that this node belongs to. This value is not represented on control plane nodes. /// The availability zone this node is running within. - /// The resource ID of the bare metal machine that hosts this node. + /// The resource ID of the bare metal machine that hosts this node. /// The number of CPU cores configured for this node, derived from the VM SKU specified. /// The detailed state of this node. /// The descriptive message about the current detailed status. - /// The size of the disk configured for this node. + /// The size of the disk configured for this node. Allocations are measured in gibibytes. /// The machine image used to deploy this node. /// The currently running version of Kubernetes and bundled features running on this node. /// The list of labels on this node that have been assigned to the agent pool containing this node. - /// The amount of memory configured for this node, derived from the vm SKU specified. + /// The amount of memory configured for this node, derived from the vm SKU specified. Allocations are measured in gibibytes. /// The mode of the agent pool containing this node. Not applicable for control plane nodes. /// The name of this node, as realized in the Kubernetes cluster. /// The NetworkAttachments made to this node. @@ -73,11 +74,11 @@ internal KubernetesClusterNode() /// The list of taints that have been assigned to the agent pool containing this node. /// The VM SKU name that was used to create this cluster node. /// Keeps track of any properties unknown to the library. - internal KubernetesClusterNode(string agentPoolId, string availabilityZone, string bareMetalMachineId, long? cpuCores, KubernetesClusterNodeDetailedStatus? detailedStatus, string detailedStatusMessage, long? diskSizeGB, string image, string kubernetesVersion, IReadOnlyList labels, long? memorySizeGB, NetworkCloudAgentPoolMode? mode, string name, IReadOnlyList networkAttachments, KubernetesNodePowerState? powerState, KubernetesNodeRole? role, IReadOnlyList taints, string vmSkuName, IDictionary serializedAdditionalRawData) + internal KubernetesClusterNode(ResourceIdentifier agentPoolArmId, string availabilityZone, ResourceIdentifier bareMetalMachineArmId, long? cpuCores, KubernetesClusterNodeDetailedStatus? detailedStatus, string detailedStatusMessage, long? diskSizeGB, string image, string kubernetesVersion, IReadOnlyList labels, long? memorySizeGB, NetworkCloudAgentPoolMode? mode, string name, IReadOnlyList networkAttachments, KubernetesNodePowerState? powerState, KubernetesNodeRole? role, IReadOnlyList taints, string vmSkuName, IDictionary serializedAdditionalRawData) { - AgentPoolId = agentPoolId; + AgentPoolArmId = agentPoolArmId; AvailabilityZone = availabilityZone; - BareMetalMachineId = bareMetalMachineId; + BareMetalMachineArmId = bareMetalMachineArmId; CpuCores = cpuCores; DetailedStatus = detailedStatus; DetailedStatusMessage = detailedStatusMessage; @@ -97,18 +98,18 @@ internal KubernetesClusterNode(string agentPoolId, string availabilityZone, stri } /// The resource ID of the agent pool that this node belongs to. This value is not represented on control plane nodes. - public string AgentPoolId { get; } + public ResourceIdentifier AgentPoolArmId { get; } /// The availability zone this node is running within. public string AvailabilityZone { get; } /// The resource ID of the bare metal machine that hosts this node. - public string BareMetalMachineId { get; } + public ResourceIdentifier BareMetalMachineArmId { get; } /// The number of CPU cores configured for this node, derived from the VM SKU specified. public long? CpuCores { get; } /// The detailed state of this node. public KubernetesClusterNodeDetailedStatus? DetailedStatus { get; } /// The descriptive message about the current detailed status. public string DetailedStatusMessage { get; } - /// The size of the disk configured for this node. + /// The size of the disk configured for this node. Allocations are measured in gibibytes. public long? DiskSizeGB { get; } /// The machine image used to deploy this node. public string Image { get; } @@ -116,7 +117,7 @@ internal KubernetesClusterNode(string agentPoolId, string availabilityZone, stri public string KubernetesVersion { get; } /// The list of labels on this node that have been assigned to the agent pool containing this node. public IReadOnlyList Labels { get; } - /// The amount of memory configured for this node, derived from the vm SKU specified. + /// The amount of memory configured for this node, derived from the vm SKU specified. Allocations are measured in gibibytes. public long? MemorySizeGB { get; } /// The mode of the agent pool containing this node. Not applicable for control plane nodes. public NetworkCloudAgentPoolMode? Mode { get; } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2ServiceLoadBalancerConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2ServiceLoadBalancerConfiguration.Serialization.cs new file mode 100644 index 0000000000000..7c694f5374f60 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2ServiceLoadBalancerConfiguration.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + internal partial class L2ServiceLoadBalancerConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(L2ServiceLoadBalancerConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(IPAddressPools)) + { + writer.WritePropertyName("ipAddressPools"u8); + writer.WriteStartArray(); + foreach (var item in IPAddressPools) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + L2ServiceLoadBalancerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(L2ServiceLoadBalancerConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeL2ServiceLoadBalancerConfiguration(document.RootElement, options); + } + + internal static L2ServiceLoadBalancerConfiguration DeserializeL2ServiceLoadBalancerConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList ipAddressPools = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ipAddressPools"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(IPAddressPool.DeserializeIPAddressPool(item, options)); + } + ipAddressPools = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new L2ServiceLoadBalancerConfiguration(ipAddressPools ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(L2ServiceLoadBalancerConfiguration)} does not support writing '{options.Format}' format."); + } + } + + L2ServiceLoadBalancerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeL2ServiceLoadBalancerConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(L2ServiceLoadBalancerConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2ServiceLoadBalancerConfiguration.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2ServiceLoadBalancerConfiguration.cs new file mode 100644 index 0000000000000..2a1054a2dd13e --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/L2ServiceLoadBalancerConfiguration.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// L2ServiceLoadBalancerConfiguration represents the configuration of a layer 2 service load balancer. + internal partial class L2ServiceLoadBalancerConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public L2ServiceLoadBalancerConfiguration() + { + IPAddressPools = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of pools of IP addresses that can be allocated to load balancer services. + /// Keeps track of any properties unknown to the library. + internal L2ServiceLoadBalancerConfiguration(IList ipAddressPools, IDictionary serializedAdditionalRawData) + { + IPAddressPools = ipAddressPools; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of pools of IP addresses that can be allocated to load balancer services. + public IList IPAddressPools { get; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineDisk.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineDisk.cs index ef0e00b77243e..10ea12f03de8d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineDisk.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineDisk.cs @@ -51,7 +51,7 @@ internal MachineDisk() } /// Initializes a new instance of . - /// The maximum amount of storage in GB. + /// The maximum amount of storage. Measured in gibibytes. /// The connection type of the rack SKU resource. /// The disk type of rack SKU resource. /// Keeps track of any properties unknown to the library. @@ -63,7 +63,7 @@ internal MachineDisk(long? capacityGB, MachineSkuDiskConnectionType? connection, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The maximum amount of storage in GB. + /// The maximum amount of storage. Measured in gibibytes. public long? CapacityGB { get; } /// The connection type of the rack SKU resource. public MachineSkuDiskConnectionType? Connection { get; } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineSkuSlot.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineSkuSlot.cs index 753dc7d567f43..97702fa67458a 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineSkuSlot.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/MachineSkuSlot.cs @@ -60,7 +60,7 @@ internal MachineSkuSlot() /// The list of disks. /// The generation of the architecture. /// The hardware version of the machine. - /// The maximum amount of memory in GB. + /// The maximum amount of memory. Measured in gibibytes. /// The model of the machine. /// The list of network interfaces. /// The count of SMT and physical core threads for this machine. @@ -97,7 +97,7 @@ internal MachineSkuSlot(long? rackSlot, BootstrapProtocol? bootstrapProtocol, lo public string Generation { get; } /// The hardware version of the machine. public string HardwareVersion { get; } - /// The maximum amount of memory in GB. + /// The maximum amount of memory. Measured in gibibytes. public long? MemoryCapacityGB { get; } /// The model of the machine. public string Model { get; } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ManagedServiceIdentitySelectorType.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ManagedServiceIdentitySelectorType.cs new file mode 100644 index 0000000000000..84292d31b82d3 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ManagedServiceIdentitySelectorType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// The type of managed identity that is being selected. + public readonly partial struct ManagedServiceIdentitySelectorType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ManagedServiceIdentitySelectorType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SystemAssignedIdentityValue = "SystemAssignedIdentity"; + private const string UserAssignedIdentityValue = "UserAssignedIdentity"; + + /// SystemAssignedIdentity. + public static ManagedServiceIdentitySelectorType SystemAssignedIdentity { get; } = new ManagedServiceIdentitySelectorType(SystemAssignedIdentityValue); + /// UserAssignedIdentity. + public static ManagedServiceIdentitySelectorType UserAssignedIdentity { get; } = new ManagedServiceIdentitySelectorType(UserAssignedIdentityValue); + /// Determines if two values are the same. + public static bool operator ==(ManagedServiceIdentitySelectorType left, ManagedServiceIdentitySelectorType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ManagedServiceIdentitySelectorType left, ManagedServiceIdentitySelectorType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ManagedServiceIdentitySelectorType(string value) => new ManagedServiceIdentitySelectorType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ManagedServiceIdentitySelectorType other && Equals(other); + /// + public bool Equals(ManagedServiceIdentitySelectorType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkAttachment.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkAttachment.Serialization.cs index 3f3d1523dc445..04f11e4dfa970 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkAttachment.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkAttachment.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("attachedNetworkId"u8); - writer.WriteStringValue(AttachedNetworkId); + writer.WriteStringValue(AttachedNetworkArmId); if (Optional.IsDefined(DefaultGateway)) { writer.WritePropertyName("defaultGateway"u8); @@ -100,7 +100,7 @@ internal static NetworkAttachment DeserializeNetworkAttachment(JsonElement eleme { return null; } - string attachedNetworkId = default; + ResourceIdentifier attachedNetworkId = default; DefaultGateway? defaultGateway = default; VirtualMachineIPAllocationMethod ipAllocationMethod = default; string ipv4Address = default; @@ -113,7 +113,7 @@ internal static NetworkAttachment DeserializeNetworkAttachment(JsonElement eleme { if (property.NameEquals("attachedNetworkId"u8)) { - attachedNetworkId = property.Value.GetString(); + attachedNetworkId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("defaultGateway"u8)) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkAttachment.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkAttachment.cs index 9d9bad6696d38..734fe82c51219 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkAttachment.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkAttachment.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.NetworkCloud.Models { @@ -46,7 +47,7 @@ public partial class NetworkAttachment private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// + /// /// The resource ID of the associated network attached to the virtual machine. /// It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources. /// @@ -55,17 +56,17 @@ public partial class NetworkAttachment /// Dynamic and Static are only valid for l3Network which may also specify Disabled. /// Otherwise, Disabled is the only permitted value. /// - /// is null. - public NetworkAttachment(string attachedNetworkId, VirtualMachineIPAllocationMethod ipAllocationMethod) + /// is null. + public NetworkAttachment(ResourceIdentifier attachedNetworkArmId, VirtualMachineIPAllocationMethod ipAllocationMethod) { - Argument.AssertNotNull(attachedNetworkId, nameof(attachedNetworkId)); + Argument.AssertNotNull(attachedNetworkArmId, nameof(attachedNetworkArmId)); - AttachedNetworkId = attachedNetworkId; + AttachedNetworkArmId = attachedNetworkArmId; IPAllocationMethod = ipAllocationMethod; } /// Initializes a new instance of . - /// + /// /// The resource ID of the associated network attached to the virtual machine. /// It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources. /// @@ -106,9 +107,9 @@ public NetworkAttachment(string attachedNetworkId, VirtualMachineIPAllocationMet /// For a CloudServicesNetwork resource, this name will be ignored. /// /// Keeps track of any properties unknown to the library. - internal NetworkAttachment(string attachedNetworkId, DefaultGateway? defaultGateway, VirtualMachineIPAllocationMethod ipAllocationMethod, string ipv4Address, string ipv6Address, string macAddress, string networkAttachmentName, IDictionary serializedAdditionalRawData) + internal NetworkAttachment(ResourceIdentifier attachedNetworkArmId, DefaultGateway? defaultGateway, VirtualMachineIPAllocationMethod ipAllocationMethod, string ipv4Address, string ipv6Address, string macAddress, string networkAttachmentName, IDictionary serializedAdditionalRawData) { - AttachedNetworkId = attachedNetworkId; + AttachedNetworkArmId = attachedNetworkArmId; DefaultGateway = defaultGateway; IPAllocationMethod = ipAllocationMethod; IPv4Address = ipv4Address; @@ -127,7 +128,7 @@ internal NetworkAttachment() /// The resource ID of the associated network attached to the virtual machine. /// It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources. /// - public string AttachedNetworkId { get; set; } + public ResourceIdentifier AttachedNetworkArmId { get; set; } /// /// The indicator of whether this is the default gateway. /// Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be specified as True. diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentPoolPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentPoolPatch.Serialization.cs index 791fb521cccfc..74e5f9b03d6c9 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentPoolPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentPoolPatch.Serialization.cs @@ -47,6 +47,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsDefined(AdministratorConfiguration)) + { + writer.WritePropertyName("administratorConfiguration"u8); + writer.WriteObjectValue(AdministratorConfiguration, options); + } if (Optional.IsDefined(Count)) { writer.WritePropertyName("count"u8); @@ -96,6 +101,7 @@ internal static NetworkCloudAgentPoolPatch DeserializeNetworkCloudAgentPoolPatch return null; } IDictionary tags = default; + NodePoolAdministratorConfigurationPatch administratorConfiguration = default; long? count = default; AgentPoolUpgradeSettings upgradeSettings = default; IDictionary serializedAdditionalRawData = default; @@ -125,6 +131,15 @@ internal static NetworkCloudAgentPoolPatch DeserializeNetworkCloudAgentPoolPatch } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("administratorConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administratorConfiguration = NodePoolAdministratorConfigurationPatch.DeserializeNodePoolAdministratorConfigurationPatch(property0.Value, options); + continue; + } if (property0.NameEquals("count"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -152,7 +167,7 @@ internal static NetworkCloudAgentPoolPatch DeserializeNetworkCloudAgentPoolPatch } } serializedAdditionalRawData = rawDataDictionary; - return new NetworkCloudAgentPoolPatch(tags ?? new ChangeTrackingDictionary(), count, upgradeSettings, serializedAdditionalRawData); + return new NetworkCloudAgentPoolPatch(tags ?? new ChangeTrackingDictionary(), administratorConfiguration, count, upgradeSettings, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentPoolPatch.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentPoolPatch.cs index f36e86196c6c6..6582e33a03c6c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentPoolPatch.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudAgentPoolPatch.cs @@ -53,12 +53,14 @@ public NetworkCloudAgentPoolPatch() /// Initializes a new instance of . /// The Azure resource tags that will replace the existing ones. + /// The configuration of administrator credentials for the control plane nodes. /// The number of virtual machines that use this configuration. /// The configuration of the agent pool. /// Keeps track of any properties unknown to the library. - internal NetworkCloudAgentPoolPatch(IDictionary tags, long? count, AgentPoolUpgradeSettings upgradeSettings, IDictionary serializedAdditionalRawData) + internal NetworkCloudAgentPoolPatch(IDictionary tags, NodePoolAdministratorConfigurationPatch administratorConfiguration, long? count, AgentPoolUpgradeSettings upgradeSettings, IDictionary serializedAdditionalRawData) { Tags = tags; + AdministratorConfiguration = administratorConfiguration; Count = count; UpgradeSettings = upgradeSettings; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -66,20 +68,22 @@ internal NetworkCloudAgentPoolPatch(IDictionary tags, long? coun /// The Azure resource tags that will replace the existing ones. public IDictionary Tags { get; } - /// The number of virtual machines that use this configuration. - public long? Count { get; set; } - /// The configuration of the agent pool. - internal AgentPoolUpgradeSettings UpgradeSettings { get; set; } - /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. - public string UpgradeMaxSurge + /// The configuration of administrator credentials for the control plane nodes. + internal NodePoolAdministratorConfigurationPatch AdministratorConfiguration { get; set; } + /// SshPublicKey represents the public key used to authenticate with a resource through SSH. + public IList AdministratorSshPublicKeys { - get => UpgradeSettings is null ? default : UpgradeSettings.MaxSurge; - set + get { - if (UpgradeSettings is null) - UpgradeSettings = new AgentPoolUpgradeSettings(); - UpgradeSettings.MaxSurge = value; + if (AdministratorConfiguration is null) + AdministratorConfiguration = new NodePoolAdministratorConfigurationPatch(); + return AdministratorConfiguration.SshPublicKeys; } } + + /// The number of virtual machines that use this configuration. + public long? Count { get; set; } + /// The configuration of the agent pool. + public AgentPoolUpgradeSettings UpgradeSettings { get; set; } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterManagerPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterManagerPatch.Serialization.cs index 0c57595a0815a..63ef901c9d77a 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterManagerPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterManagerPatch.Serialization.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.NetworkCloud.Models { @@ -34,6 +35,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkCloudClusterManagerPatch)} does not support writing '{format}' format."); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -82,11 +89,22 @@ internal static NetworkCloudClusterManagerPatch DeserializeNetworkCloudClusterMa { return null; } + ManagedServiceIdentity identity = default; IDictionary tags = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -107,7 +125,7 @@ internal static NetworkCloudClusterManagerPatch DeserializeNetworkCloudClusterMa } } serializedAdditionalRawData = rawDataDictionary; - return new NetworkCloudClusterManagerPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new NetworkCloudClusterManagerPatch(identity, tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterManagerPatch.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterManagerPatch.cs index f588c38a1a979..671a756cd43a7 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterManagerPatch.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterManagerPatch.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.NetworkCloud.Models { @@ -52,14 +53,18 @@ public NetworkCloudClusterManagerPatch() } /// Initializes a new instance of . + /// The identity for the resource. /// The Azure resource tags that will replace the existing ones. /// Keeps track of any properties unknown to the library. - internal NetworkCloudClusterManagerPatch(IDictionary tags, IDictionary serializedAdditionalRawData) + internal NetworkCloudClusterManagerPatch(ManagedServiceIdentity identity, IDictionary tags, IDictionary serializedAdditionalRawData) { + Identity = identity; Tags = tags; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The identity for the resource. + public ManagedServiceIdentity Identity { get; set; } /// The Azure resource tags that will replace the existing ones. public IDictionary Tags { get; } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterPatch.Serialization.cs index c5f32e0907e5a..8d539be4797f8 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterPatch.Serialization.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.NetworkCloud.Models { @@ -34,6 +35,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkCloudClusterPatch)} does not support writing '{format}' format."); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -62,6 +69,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("clusterServicePrincipal"u8); writer.WriteObjectValue(ClusterServicePrincipal, options); } + if (Optional.IsDefined(CommandOutputSettings)) + { + writer.WritePropertyName("commandOutputSettings"u8); + writer.WriteObjectValue(CommandOutputSettings, options); + } if (Optional.IsDefined(ComputeDeploymentThreshold)) { writer.WritePropertyName("computeDeploymentThreshold"u8); @@ -77,6 +89,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(RuntimeProtectionConfiguration)) + { + writer.WritePropertyName("runtimeProtectionConfiguration"u8); + writer.WriteObjectValue(RuntimeProtectionConfiguration, options); + } + if (Optional.IsDefined(SecretArchive)) + { + writer.WritePropertyName("secretArchive"u8); + writer.WriteObjectValue(SecretArchive, options); + } + if (Optional.IsDefined(UpdateStrategy)) + { + writer.WritePropertyName("updateStrategy"u8); + writer.WriteObjectValue(UpdateStrategy, options); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -115,16 +142,31 @@ internal static NetworkCloudClusterPatch DeserializeNetworkCloudClusterPatch(Jso { return null; } + ManagedServiceIdentity identity = default; IDictionary tags = default; NetworkCloudRackDefinition aggregatorOrSingleRackDefinition = default; string clusterLocation = default; ServicePrincipalInformation clusterServicePrincipal = default; + CommandOutputSettings commandOutputSettings = default; ValidationThreshold computeDeploymentThreshold = default; IList computeRackDefinitions = default; + RuntimeProtectionConfiguration runtimeProtectionConfiguration = default; + ClusterSecretArchive secretArchive = default; + ClusterUpdateStrategy updateStrategy = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -171,6 +213,15 @@ internal static NetworkCloudClusterPatch DeserializeNetworkCloudClusterPatch(Jso clusterServicePrincipal = ServicePrincipalInformation.DeserializeServicePrincipalInformation(property0.Value, options); continue; } + if (property0.NameEquals("commandOutputSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + commandOutputSettings = CommandOutputSettings.DeserializeCommandOutputSettings(property0.Value, options); + continue; + } if (property0.NameEquals("computeDeploymentThreshold"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -194,6 +245,33 @@ internal static NetworkCloudClusterPatch DeserializeNetworkCloudClusterPatch(Jso computeRackDefinitions = array; continue; } + if (property0.NameEquals("runtimeProtectionConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runtimeProtectionConfiguration = RuntimeProtectionConfiguration.DeserializeRuntimeProtectionConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("secretArchive"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secretArchive = ClusterSecretArchive.DeserializeClusterSecretArchive(property0.Value, options); + continue; + } + if (property0.NameEquals("updateStrategy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateStrategy = ClusterUpdateStrategy.DeserializeClusterUpdateStrategy(property0.Value, options); + continue; + } } continue; } @@ -204,12 +282,17 @@ internal static NetworkCloudClusterPatch DeserializeNetworkCloudClusterPatch(Jso } serializedAdditionalRawData = rawDataDictionary; return new NetworkCloudClusterPatch( + identity, tags ?? new ChangeTrackingDictionary(), aggregatorOrSingleRackDefinition, clusterLocation, clusterServicePrincipal, + commandOutputSettings, computeDeploymentThreshold, computeRackDefinitions ?? new ChangeTrackingList(), + runtimeProtectionConfiguration, + secretArchive, + updateStrategy, serializedAdditionalRawData); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterPatch.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterPatch.cs index 6d3602e3714a3..d3e8bc7543531 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterPatch.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudClusterPatch.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.NetworkCloud.Models { @@ -53,27 +54,39 @@ public NetworkCloudClusterPatch() } /// Initializes a new instance of . + /// The identity for the resource. /// The Azure resource tags that will replace the existing ones. /// The rack definition that is intended to reflect only a single rack in a single rack cluster, or an aggregator rack in a multi-rack cluster. /// The customer-provided location information to identify where the cluster resides. /// The service principal to be used by the cluster during Arc Appliance installation. + /// The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. /// The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. /// /// The list of rack definitions for the compute racks in a multi-rack /// cluster, or an empty list in a single-rack cluster. /// + /// The settings for cluster runtime protection. + /// The configuration for use of a key vault to store secrets for later retrieval by the operator. + /// The strategy for updating the cluster. /// Keeps track of any properties unknown to the library. - internal NetworkCloudClusterPatch(IDictionary tags, NetworkCloudRackDefinition aggregatorOrSingleRackDefinition, string clusterLocation, ServicePrincipalInformation clusterServicePrincipal, ValidationThreshold computeDeploymentThreshold, IList computeRackDefinitions, IDictionary serializedAdditionalRawData) + internal NetworkCloudClusterPatch(ManagedServiceIdentity identity, IDictionary tags, NetworkCloudRackDefinition aggregatorOrSingleRackDefinition, string clusterLocation, ServicePrincipalInformation clusterServicePrincipal, CommandOutputSettings commandOutputSettings, ValidationThreshold computeDeploymentThreshold, IList computeRackDefinitions, RuntimeProtectionConfiguration runtimeProtectionConfiguration, ClusterSecretArchive secretArchive, ClusterUpdateStrategy updateStrategy, IDictionary serializedAdditionalRawData) { + Identity = identity; Tags = tags; AggregatorOrSingleRackDefinition = aggregatorOrSingleRackDefinition; ClusterLocation = clusterLocation; ClusterServicePrincipal = clusterServicePrincipal; + CommandOutputSettings = commandOutputSettings; ComputeDeploymentThreshold = computeDeploymentThreshold; ComputeRackDefinitions = computeRackDefinitions; + RuntimeProtectionConfiguration = runtimeProtectionConfiguration; + SecretArchive = secretArchive; + UpdateStrategy = updateStrategy; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The identity for the resource. + public ManagedServiceIdentity Identity { get; set; } /// The Azure resource tags that will replace the existing ones. public IDictionary Tags { get; } /// The rack definition that is intended to reflect only a single rack in a single rack cluster, or an aggregator rack in a multi-rack cluster. @@ -82,6 +95,8 @@ internal NetworkCloudClusterPatch(IDictionary tags, NetworkCloud public string ClusterLocation { get; set; } /// The service principal to be used by the cluster during Arc Appliance installation. public ServicePrincipalInformation ClusterServicePrincipal { get; set; } + /// The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. + public CommandOutputSettings CommandOutputSettings { get; set; } /// The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. public ValidationThreshold ComputeDeploymentThreshold { get; set; } /// @@ -89,5 +104,23 @@ internal NetworkCloudClusterPatch(IDictionary tags, NetworkCloud /// cluster, or an empty list in a single-rack cluster. /// public IList ComputeRackDefinitions { get; } + /// The settings for cluster runtime protection. + internal RuntimeProtectionConfiguration RuntimeProtectionConfiguration { get; set; } + /// The mode of operation for runtime protection. + public RuntimeProtectionEnforcementLevel? RuntimeProtectionEnforcementLevel + { + get => RuntimeProtectionConfiguration is null ? default : RuntimeProtectionConfiguration.EnforcementLevel; + set + { + if (RuntimeProtectionConfiguration is null) + RuntimeProtectionConfiguration = new RuntimeProtectionConfiguration(); + RuntimeProtectionConfiguration.EnforcementLevel = value; + } + } + + /// The configuration for use of a key vault to store secrets for later retrieval by the operator. + public ClusterSecretArchive SecretArchive { get; set; } + /// The strategy for updating the cluster. + public ClusterUpdateStrategy UpdateStrategy { get; set; } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterFeaturePatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterFeaturePatch.Serialization.cs new file mode 100644 index 0000000000000..4fdfd0fcc9a2f --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterFeaturePatch.Serialization.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class NetworkCloudKubernetesClusterFeaturePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkCloudKubernetesClusterFeaturePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Options)) + { + writer.WritePropertyName("options"u8); + writer.WriteStartArray(); + foreach (var item in Options) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetworkCloudKubernetesClusterFeaturePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkCloudKubernetesClusterFeaturePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkCloudKubernetesClusterFeaturePatch(document.RootElement, options); + } + + internal static NetworkCloudKubernetesClusterFeaturePatch DeserializeNetworkCloudKubernetesClusterFeaturePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IList options0 = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("options"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StringKeyValuePair.DeserializeStringKeyValuePair(item, options)); + } + options0 = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkCloudKubernetesClusterFeaturePatch(tags ?? new ChangeTrackingDictionary(), options0 ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkCloudKubernetesClusterFeaturePatch)} does not support writing '{options.Format}' format."); + } + } + + NetworkCloudKubernetesClusterFeaturePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNetworkCloudKubernetesClusterFeaturePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkCloudKubernetesClusterFeaturePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterFeaturePatch.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterFeaturePatch.cs new file mode 100644 index 0000000000000..eb0312f72fc09 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterFeaturePatch.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// KubernetesClusterFeaturePatchParameters represents the body of the request to patch the Kubernetes cluster feature. + public partial class NetworkCloudKubernetesClusterFeaturePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetworkCloudKubernetesClusterFeaturePatch() + { + Tags = new ChangeTrackingDictionary(); + Options = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The Azure resource tags that will replace the existing ones. + /// The configured options for the feature. + /// Keeps track of any properties unknown to the library. + internal NetworkCloudKubernetesClusterFeaturePatch(IDictionary tags, IList options, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Options = options; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Azure resource tags that will replace the existing ones. + public IDictionary Tags { get; } + /// The configured options for the feature. + public IList Options { get; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterPatch.Serialization.cs index 28728ce1d60c6..4f1232186dd8b 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterPatch.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterPatch.Serialization.cs @@ -47,6 +47,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsDefined(AdministratorConfiguration)) + { + writer.WritePropertyName("administratorConfiguration"u8); + writer.WriteObjectValue(AdministratorConfiguration, options); + } if (Optional.IsDefined(ControlPlaneNodeConfiguration)) { writer.WritePropertyName("controlPlaneNodeConfiguration"u8); @@ -96,6 +101,7 @@ internal static NetworkCloudKubernetesClusterPatch DeserializeNetworkCloudKubern return null; } IDictionary tags = default; + AdministratorConfigurationPatch administratorConfiguration = default; ControlPlaneNodePatchConfiguration controlPlaneNodeConfiguration = default; string kubernetesVersion = default; IDictionary serializedAdditionalRawData = default; @@ -125,6 +131,15 @@ internal static NetworkCloudKubernetesClusterPatch DeserializeNetworkCloudKubern } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("administratorConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administratorConfiguration = AdministratorConfigurationPatch.DeserializeAdministratorConfigurationPatch(property0.Value, options); + continue; + } if (property0.NameEquals("controlPlaneNodeConfiguration"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -148,7 +163,7 @@ internal static NetworkCloudKubernetesClusterPatch DeserializeNetworkCloudKubern } } serializedAdditionalRawData = rawDataDictionary; - return new NetworkCloudKubernetesClusterPatch(tags ?? new ChangeTrackingDictionary(), controlPlaneNodeConfiguration, kubernetesVersion, serializedAdditionalRawData); + return new NetworkCloudKubernetesClusterPatch(tags ?? new ChangeTrackingDictionary(), administratorConfiguration, controlPlaneNodeConfiguration, kubernetesVersion, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterPatch.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterPatch.cs index 8d9958223f834..7b941f11e2044 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterPatch.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudKubernetesClusterPatch.cs @@ -53,12 +53,14 @@ public NetworkCloudKubernetesClusterPatch() /// Initializes a new instance of . /// The Azure resource tags that will replace the existing ones. + /// The configuration of the default administrator credentials. /// The defining characteristics of the control plane that can be patched for this Kubernetes cluster. - /// The Kubernetes version for this cluster. Accepts n.n, n.n.n, and n.n.n-n format. The interpreted version used will be resolved into this field after creation or update. + /// The Kubernetes version for this cluster. /// Keeps track of any properties unknown to the library. - internal NetworkCloudKubernetesClusterPatch(IDictionary tags, ControlPlaneNodePatchConfiguration controlPlaneNodeConfiguration, string kubernetesVersion, IDictionary serializedAdditionalRawData) + internal NetworkCloudKubernetesClusterPatch(IDictionary tags, AdministratorConfigurationPatch administratorConfiguration, ControlPlaneNodePatchConfiguration controlPlaneNodeConfiguration, string kubernetesVersion, IDictionary serializedAdditionalRawData) { Tags = tags; + AdministratorConfiguration = administratorConfiguration; ControlPlaneNodeConfiguration = controlPlaneNodeConfiguration; KubernetesVersion = kubernetesVersion; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -66,21 +68,22 @@ internal NetworkCloudKubernetesClusterPatch(IDictionary tags, Co /// The Azure resource tags that will replace the existing ones. public IDictionary Tags { get; } - /// The defining characteristics of the control plane that can be patched for this Kubernetes cluster. - internal ControlPlaneNodePatchConfiguration ControlPlaneNodeConfiguration { get; set; } - /// The number of virtual machines that use this configuration. - public long? ControlPlaneNodeCount + /// The configuration of the default administrator credentials. + internal AdministratorConfigurationPatch AdministratorConfiguration { get; set; } + /// SshPublicKey represents the public key used to authenticate with a resource through SSH. + public IList AdministratorSshPublicKeys { - get => ControlPlaneNodeConfiguration is null ? default : ControlPlaneNodeConfiguration.Count; - set + get { - if (ControlPlaneNodeConfiguration is null) - ControlPlaneNodeConfiguration = new ControlPlaneNodePatchConfiguration(); - ControlPlaneNodeConfiguration.Count = value; + if (AdministratorConfiguration is null) + AdministratorConfiguration = new AdministratorConfigurationPatch(); + return AdministratorConfiguration.SshPublicKeys; } } - /// The Kubernetes version for this cluster. Accepts n.n, n.n.n, and n.n.n-n format. The interpreted version used will be resolved into this field after creation or update. + /// The defining characteristics of the control plane that can be patched for this Kubernetes cluster. + public ControlPlaneNodePatchConfiguration ControlPlaneNodeConfiguration { get; set; } + /// The Kubernetes version for this cluster. public string KubernetesVersion { get; set; } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudNetworkInterface.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudNetworkInterface.cs index 1941d26a3feb0..26d06bb505e8b 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudNetworkInterface.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudNetworkInterface.cs @@ -56,7 +56,7 @@ internal NetworkCloudNetworkInterface() /// The model name of the device. /// The physical slot for this device. /// The number of ports on the device. - /// The maximum amount of data in GB that the line card transmits through a port at any given second. + /// The maximum amount of data in gigabits that the line card transmits through a port at any given second. /// The vendor name of the device. /// Keeps track of any properties unknown to the library. internal NetworkCloudNetworkInterface(string address, DeviceConnectionType? deviceConnectionType, string model, long? physicalSlot, long? portCount, long? portSpeed, string vendor, IDictionary serializedAdditionalRawData) @@ -81,7 +81,7 @@ internal NetworkCloudNetworkInterface(string address, DeviceConnectionType? devi public long? PhysicalSlot { get; } /// The number of ports on the device. public long? PortCount { get; } - /// The maximum amount of data in GB that the line card transmits through a port at any given second. + /// The maximum amount of data in gigabits that the line card transmits through a port at any given second. public long? PortSpeed { get; } /// The vendor name of the device. public string Vendor { get; } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOSDisk.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOSDisk.cs index eb48c92a9f5a8..45232e0ef448e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOSDisk.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOSDisk.cs @@ -46,7 +46,7 @@ public partial class NetworkCloudOSDisk private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The size of the disk in gigabytes. Required if the createOption is Ephemeral. + /// The size of the disk. Required if the createOption is Ephemeral. Allocations are measured in gibibytes. public NetworkCloudOSDisk(long diskSizeInGB) { DiskSizeInGB = diskSizeInGB; @@ -55,7 +55,7 @@ public NetworkCloudOSDisk(long diskSizeInGB) /// Initializes a new instance of . /// The strategy for creating the OS disk. /// The strategy for deleting the OS disk. - /// The size of the disk in gigabytes. Required if the createOption is Ephemeral. + /// The size of the disk. Required if the createOption is Ephemeral. Allocations are measured in gibibytes. /// Keeps track of any properties unknown to the library. internal NetworkCloudOSDisk(OSDiskCreateOption? createOption, OSDiskDeleteOption? deleteOption, long diskSizeInGB, IDictionary serializedAdditionalRawData) { @@ -74,7 +74,7 @@ internal NetworkCloudOSDisk() public OSDiskCreateOption? CreateOption { get; set; } /// The strategy for deleting the OS disk. public OSDiskDeleteOption? DeleteOption { get; set; } - /// The size of the disk in gigabytes. Required if the createOption is Ephemeral. + /// The size of the disk. Required if the createOption is Ephemeral. Allocations are measured in gibibytes. public long DiskSizeInGB { get; set; } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.Serialization.cs index b5466583d8f6e..99ef22b6fac36 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.Serialization.cs @@ -34,53 +34,76 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkCloudOperationStatusResult)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Id)) + if (options.Format != "W" && Optional.IsDefined(EndOn)) { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); } - if (options.Format != "W" && Optional.IsDefined(ResourceId)) + if (options.Format != "W" && Optional.IsDefined(Error)) { - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(ResourceId); + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + } + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); } - if (Optional.IsDefined(Name)) + if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - if (Optional.IsDefined(PercentComplete)) + if (options.Format != "W" && Optional.IsCollectionDefined(Operations)) + { + writer.WritePropertyName("operations"u8); + writer.WriteStartArray(); + foreach (var item in Operations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(PercentComplete)) { writer.WritePropertyName("percentComplete"u8); writer.WriteNumberValue(PercentComplete.Value); } - if (Optional.IsDefined(StartOn)) + if (options.Format != "W" && Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); writer.WriteStringValue(StartOn.Value, "O"); } - if (Optional.IsDefined(EndOn)) + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ExitCode)) { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); + writer.WritePropertyName("exitCode"u8); + writer.WriteStringValue(ExitCode); } - if (Optional.IsCollectionDefined(Operations)) + if (options.Format != "W" && Optional.IsDefined(OutputHead)) { - writer.WritePropertyName("operations"u8); - writer.WriteStartArray(); - foreach (var item in Operations) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WritePropertyName("outputHead"u8); + writer.WriteStringValue(OutputHead); } - if (Optional.IsDefined(Error)) + if (options.Format != "W" && Optional.IsDefined(ResultRef)) { - writer.WritePropertyName("error"u8); - JsonSerializer.Serialize(writer, Error); + writer.WritePropertyName("resultRef"u8); + writer.WriteStringValue(ResultRef.AbsoluteUri); } + if (options.Format != "W" && Optional.IsDefined(ResultUri)) + { + writer.WritePropertyName("resultUrl"u8); + writer.WriteStringValue(ResultUri.AbsoluteUri); + } + writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -118,95 +141,139 @@ internal static NetworkCloudOperationStatusResult DeserializeNetworkCloudOperati { return null; } + DateTimeOffset? endTime = default; + ResponseError error = default; ResourceIdentifier id = default; - ResourceIdentifier resourceId = default; string name = default; - string status = default; + IReadOnlyList operations = default; float? percentComplete = default; + ResourceIdentifier resourceId = default; DateTimeOffset? startTime = default; - DateTimeOffset? endTime = default; - IReadOnlyList operations = default; - ResponseError error = default; + string status = default; + string exitCode = default; + string outputHead = default; + Uri resultRef = default; + Uri resultUrl = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (property.NameEquals("endTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - id = new ResourceIdentifier(property.Value.GetString()); + endTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("resourceId"u8)) + if (property.NameEquals("error"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - resourceId = new ResourceIdentifier(property.Value.GetString()); + error = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("id"u8)) { - name = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("name"u8)) { - status = property.Value.GetString(); + name = property.Value.GetString(); continue; } - if (property.NameEquals("percentComplete"u8)) + if (property.NameEquals("operations"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - percentComplete = property.Value.GetSingle(); + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeNetworkCloudOperationStatusResult(item, options)); + } + operations = array; continue; } - if (property.NameEquals("startTime"u8)) + if (property.NameEquals("percentComplete"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - startTime = property.Value.GetDateTimeOffset("O"); + percentComplete = property.Value.GetSingle(); continue; } - if (property.NameEquals("endTime"u8)) + if (property.NameEquals("resourceId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - endTime = property.Value.GetDateTimeOffset("O"); + resourceId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("operations"u8)) + if (property.NameEquals("startTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DeserializeNetworkCloudOperationStatusResult(item, options)); - } - operations = array; + startTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("error"u8)) + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + property.ThrowNonNullablePropertyIsNull(); continue; } - error = JsonSerializer.Deserialize(property.Value.GetRawText()); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("exitCode"u8)) + { + exitCode = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("outputHead"u8)) + { + outputHead = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("resultRef"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resultRef = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("resultUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resultUrl = new Uri(property0.Value.GetString()); + continue; + } + } continue; } if (options.Format != "W") @@ -216,15 +283,19 @@ internal static NetworkCloudOperationStatusResult DeserializeNetworkCloudOperati } serializedAdditionalRawData = rawDataDictionary; return new NetworkCloudOperationStatusResult( + endTime, + error, id, - resourceId, name, - status, + operations ?? new ChangeTrackingList(), percentComplete, + resourceId, startTime, - endTime, - operations ?? new ChangeTrackingList(), - error, + status, + exitCode, + outputHead, + resultRef, + resultUrl, serializedAdditionalRawData); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.cs index a41e980b65695..5edbb620990c8 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.cs @@ -53,32 +53,40 @@ internal NetworkCloudOperationStatusResult(string status) { Argument.AssertNotNull(status, nameof(status)); - Status = status; Operations = new ChangeTrackingList(); + Status = status; } /// Initializes a new instance of . + /// The end time of the operation. + /// If present, details of the operation error. /// Fully qualified ID for the async operation. - /// Fully qualified ID of the resource against which the original async operation was started. /// Name of the async operation. - /// Operation status. + /// The operations list. /// Percent of the operation that is complete. + /// Fully qualified ID of the resource against which the original async operation was started. /// The start time of the operation. - /// The end time of the operation. - /// The operations list. - /// If present, details of the operation error. + /// Operation status. + /// For actions that run commands or scripts, the exit code of the script execution. + /// For actions that run commands or scripts, the leading bytes of the output of the script execution. + /// For actions that run commands or scripts, a reference to the location of the result. + /// For actions that run commands or scripts, the URL where the full output of the script output can be retrieved. /// Keeps track of any properties unknown to the library. - internal NetworkCloudOperationStatusResult(ResourceIdentifier id, ResourceIdentifier resourceId, string name, string status, float? percentComplete, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList operations, ResponseError error, IDictionary serializedAdditionalRawData) + internal NetworkCloudOperationStatusResult(DateTimeOffset? endOn, ResponseError error, ResourceIdentifier id, string name, IReadOnlyList operations, float? percentComplete, ResourceIdentifier resourceId, DateTimeOffset? startOn, string status, string exitCode, string outputHead, Uri resultRef, Uri resultUri, IDictionary serializedAdditionalRawData) { + EndOn = endOn; + Error = error; Id = id; - ResourceId = resourceId; Name = name; - Status = status; + Operations = operations; PercentComplete = percentComplete; + ResourceId = resourceId; StartOn = startOn; - EndOn = endOn; - Operations = operations; - Error = error; + Status = status; + ExitCode = exitCode; + OutputHead = outputHead; + ResultRef = resultRef; + ResultUri = resultUri; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -87,23 +95,31 @@ internal NetworkCloudOperationStatusResult() { } + /// The end time of the operation. + public DateTimeOffset? EndOn { get; } + /// If present, details of the operation error. + public ResponseError Error { get; } /// Fully qualified ID for the async operation. public ResourceIdentifier Id { get; } - /// Fully qualified ID of the resource against which the original async operation was started. - public ResourceIdentifier ResourceId { get; } /// Name of the async operation. public string Name { get; } - /// Operation status. - public string Status { get; } + /// The operations list. + public IReadOnlyList Operations { get; } /// Percent of the operation that is complete. public float? PercentComplete { get; } + /// Fully qualified ID of the resource against which the original async operation was started. + public ResourceIdentifier ResourceId { get; } /// The start time of the operation. public DateTimeOffset? StartOn { get; } - /// The end time of the operation. - public DateTimeOffset? EndOn { get; } - /// The operations list. - public IReadOnlyList Operations { get; } - /// If present, details of the operation error. - public ResponseError Error { get; } + /// Operation status. + public string Status { get; } + /// For actions that run commands or scripts, the exit code of the script execution. + public string ExitCode { get; } + /// For actions that run commands or scripts, the leading bytes of the output of the script execution. + public string OutputHead { get; } + /// For actions that run commands or scripts, a reference to the location of the result. + public Uri ResultRef { get; } + /// For actions that run commands or scripts, the URL where the full output of the script output can be retrieved. + public Uri ResultUri { get; } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVirtualMachineConsolePatch.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVirtualMachineConsolePatch.cs index 8e5b4247cdbf6..4992405743867 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVirtualMachineConsolePatch.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudVirtualMachineConsolePatch.cs @@ -53,7 +53,7 @@ public NetworkCloudVirtualMachineConsolePatch() /// Initializes a new instance of . /// The Azure resource tags that will replace the existing ones. - /// The credentials used to login to the image repository that has access to the specified image. + /// The indicator of whether the console access is enabled. /// The date and time after which the key will be disallowed access. /// The SSH public key that will be provisioned for user access. The user is expected to have the corresponding SSH private key for logging in. /// Keeps track of any properties unknown to the library. @@ -68,7 +68,7 @@ internal NetworkCloudVirtualMachineConsolePatch(IDictionary tags /// The Azure resource tags that will replace the existing ones. public IDictionary Tags { get; } - /// The credentials used to login to the image repository that has access to the specified image. + /// The indicator of whether the console access is enabled. public ConsoleEnabled? Enabled { get; set; } /// The date and time after which the key will be disallowed access. public DateTimeOffset? ExpireOn { get; set; } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NodePoolAdministratorConfigurationPatch.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NodePoolAdministratorConfigurationPatch.Serialization.cs new file mode 100644 index 0000000000000..05d37f2f4ed68 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NodePoolAdministratorConfigurationPatch.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + internal partial class NodePoolAdministratorConfigurationPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NodePoolAdministratorConfigurationPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(SshPublicKeys)) + { + writer.WritePropertyName("sshPublicKeys"u8); + writer.WriteStartArray(); + foreach (var item in SshPublicKeys) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NodePoolAdministratorConfigurationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NodePoolAdministratorConfigurationPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNodePoolAdministratorConfigurationPatch(document.RootElement, options); + } + + internal static NodePoolAdministratorConfigurationPatch DeserializeNodePoolAdministratorConfigurationPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList sshPublicKeys = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sshPublicKeys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkCloudSshPublicKey.DeserializeNetworkCloudSshPublicKey(item, options)); + } + sshPublicKeys = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NodePoolAdministratorConfigurationPatch(sshPublicKeys ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NodePoolAdministratorConfigurationPatch)} does not support writing '{options.Format}' format."); + } + } + + NodePoolAdministratorConfigurationPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNodePoolAdministratorConfigurationPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NodePoolAdministratorConfigurationPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NodePoolAdministratorConfigurationPatch.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NodePoolAdministratorConfigurationPatch.cs new file mode 100644 index 0000000000000..4073004b0b26b --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NodePoolAdministratorConfigurationPatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// NodePoolAdministratorConfigurationPatch represents the patching capabilities for the administrator configuration. + internal partial class NodePoolAdministratorConfigurationPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NodePoolAdministratorConfigurationPatch() + { + SshPublicKeys = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// SshPublicKey represents the public key used to authenticate with a resource through SSH. + /// Keeps track of any properties unknown to the library. + internal NodePoolAdministratorConfigurationPatch(IList sshPublicKeys, IDictionary serializedAdditionalRawData) + { + SshPublicKeys = sshPublicKeys; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// SshPublicKey represents the public key used to authenticate with a resource through SSH. + public IList SshPublicKeys { get; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RackSkuProvisioningState.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RackSkuProvisioningState.cs index 2ce246c62c506..e263a56956411 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RackSkuProvisioningState.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RackSkuProvisioningState.cs @@ -22,8 +22,14 @@ public RackSkuProvisioningState(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } + private const string CanceledValue = "Canceled"; + private const string FailedValue = "Failed"; private const string SucceededValue = "Succeeded"; + /// Canceled. + public static RackSkuProvisioningState Canceled { get; } = new RackSkuProvisioningState(CanceledValue); + /// Failed. + public static RackSkuProvisioningState Failed { get; } = new RackSkuProvisioningState(FailedValue); /// Succeeded. public static RackSkuProvisioningState Succeeded { get; } = new RackSkuProvisioningState(SucceededValue); /// Determines if two values are the same. diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionConfiguration.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionConfiguration.Serialization.cs new file mode 100644 index 0000000000000..d98e7af93a91c --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionConfiguration.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + internal partial class RuntimeProtectionConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RuntimeProtectionConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(EnforcementLevel)) + { + writer.WritePropertyName("enforcementLevel"u8); + writer.WriteStringValue(EnforcementLevel.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RuntimeProtectionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RuntimeProtectionConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRuntimeProtectionConfiguration(document.RootElement, options); + } + + internal static RuntimeProtectionConfiguration DeserializeRuntimeProtectionConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RuntimeProtectionEnforcementLevel? enforcementLevel = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enforcementLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enforcementLevel = new RuntimeProtectionEnforcementLevel(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RuntimeProtectionConfiguration(enforcementLevel, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RuntimeProtectionConfiguration)} does not support writing '{options.Format}' format."); + } + } + + RuntimeProtectionConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeRuntimeProtectionConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RuntimeProtectionConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionConfiguration.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionConfiguration.cs new file mode 100644 index 0000000000000..e5c561c5cd959 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionConfiguration.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// RuntimeProtectionConfiguration represents the runtime protection configuration for the cluster. + internal partial class RuntimeProtectionConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RuntimeProtectionConfiguration() + { + } + + /// Initializes a new instance of . + /// The mode of operation for runtime protection. + /// Keeps track of any properties unknown to the library. + internal RuntimeProtectionConfiguration(RuntimeProtectionEnforcementLevel? enforcementLevel, IDictionary serializedAdditionalRawData) + { + EnforcementLevel = enforcementLevel; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The mode of operation for runtime protection. + public RuntimeProtectionEnforcementLevel? EnforcementLevel { get; set; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionEnforcementLevel.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionEnforcementLevel.cs new file mode 100644 index 0000000000000..a02ad3e8e2e46 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionEnforcementLevel.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// The mode of operation for runtime protection. + public readonly partial struct RuntimeProtectionEnforcementLevel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RuntimeProtectionEnforcementLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AuditValue = "Audit"; + private const string DisabledValue = "Disabled"; + private const string OnDemandValue = "OnDemand"; + private const string PassiveValue = "Passive"; + private const string RealTimeValue = "RealTime"; + + /// Audit. + public static RuntimeProtectionEnforcementLevel Audit { get; } = new RuntimeProtectionEnforcementLevel(AuditValue); + /// Disabled. + public static RuntimeProtectionEnforcementLevel Disabled { get; } = new RuntimeProtectionEnforcementLevel(DisabledValue); + /// OnDemand. + public static RuntimeProtectionEnforcementLevel OnDemand { get; } = new RuntimeProtectionEnforcementLevel(OnDemandValue); + /// Passive. + public static RuntimeProtectionEnforcementLevel Passive { get; } = new RuntimeProtectionEnforcementLevel(PassiveValue); + /// RealTime. + public static RuntimeProtectionEnforcementLevel RealTime { get; } = new RuntimeProtectionEnforcementLevel(RealTimeValue); + /// Determines if two values are the same. + public static bool operator ==(RuntimeProtectionEnforcementLevel left, RuntimeProtectionEnforcementLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RuntimeProtectionEnforcementLevel left, RuntimeProtectionEnforcementLevel right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RuntimeProtectionEnforcementLevel(string value) => new RuntimeProtectionEnforcementLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RuntimeProtectionEnforcementLevel other && Equals(other); + /// + public bool Equals(RuntimeProtectionEnforcementLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionStatus.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionStatus.Serialization.cs new file mode 100644 index 0000000000000..98fd89386f3a2 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionStatus.Serialization.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class RuntimeProtectionStatus : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RuntimeProtectionStatus)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(DefinitionsLastUpdated)) + { + writer.WritePropertyName("definitionsLastUpdated"u8); + writer.WriteStringValue(DefinitionsLastUpdated.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(DefinitionsVersion)) + { + writer.WritePropertyName("definitionsVersion"u8); + writer.WriteStringValue(DefinitionsVersion); + } + if (options.Format != "W" && Optional.IsDefined(ScanCompletedOn)) + { + writer.WritePropertyName("scanCompletedTime"u8); + writer.WriteStringValue(ScanCompletedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ScanScheduledOn)) + { + writer.WritePropertyName("scanScheduledTime"u8); + writer.WriteStringValue(ScanScheduledOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ScanStartedOn)) + { + writer.WritePropertyName("scanStartedTime"u8); + writer.WriteStringValue(ScanStartedOn.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RuntimeProtectionStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RuntimeProtectionStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRuntimeProtectionStatus(document.RootElement, options); + } + + internal static RuntimeProtectionStatus DeserializeRuntimeProtectionStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? definitionsLastUpdated = default; + string definitionsVersion = default; + DateTimeOffset? scanCompletedTime = default; + DateTimeOffset? scanScheduledTime = default; + DateTimeOffset? scanStartedTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("definitionsLastUpdated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + definitionsLastUpdated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("definitionsVersion"u8)) + { + definitionsVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("scanCompletedTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scanCompletedTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("scanScheduledTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scanScheduledTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("scanStartedTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scanStartedTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RuntimeProtectionStatus( + definitionsLastUpdated, + definitionsVersion, + scanCompletedTime, + scanScheduledTime, + scanStartedTime, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RuntimeProtectionStatus)} does not support writing '{options.Format}' format."); + } + } + + RuntimeProtectionStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeRuntimeProtectionStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RuntimeProtectionStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionStatus.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionStatus.cs new file mode 100644 index 0000000000000..a3bcd8e33d41d --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/RuntimeProtectionStatus.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// RuntimeProtectionStatus represents the runtime protection status of the bare metal machine. + public partial class RuntimeProtectionStatus + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal RuntimeProtectionStatus() + { + } + + /// Initializes a new instance of . + /// The timestamp when the malware definitions were last updated. + /// The version of the malware definitions. + /// The timestamp of the most recently completed scan, or empty if there has never been a scan. + /// The timestamp of the most recently scheduled scan, or empty if no scan has been scheduled. + /// The timestamp of the most recently started scan, or empty if there has never been a scan. + /// Keeps track of any properties unknown to the library. + internal RuntimeProtectionStatus(DateTimeOffset? definitionsLastUpdated, string definitionsVersion, DateTimeOffset? scanCompletedOn, DateTimeOffset? scanScheduledOn, DateTimeOffset? scanStartedOn, IDictionary serializedAdditionalRawData) + { + DefinitionsLastUpdated = definitionsLastUpdated; + DefinitionsVersion = definitionsVersion; + ScanCompletedOn = scanCompletedOn; + ScanScheduledOn = scanScheduledOn; + ScanStartedOn = scanStartedOn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The timestamp when the malware definitions were last updated. + public DateTimeOffset? DefinitionsLastUpdated { get; } + /// The version of the malware definitions. + public string DefinitionsVersion { get; } + /// The timestamp of the most recently completed scan, or empty if there has never been a scan. + public DateTimeOffset? ScanCompletedOn { get; } + /// The timestamp of the most recently scheduled scan, or empty if no scan has been scheduled. + public DateTimeOffset? ScanScheduledOn { get; } + /// The timestamp of the most recently started scan, or empty if there has never been a scan. + public DateTimeOffset? ScanStartedOn { get; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretArchiveReference.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretArchiveReference.Serialization.cs new file mode 100644 index 0000000000000..4467a456f6beb --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretArchiveReference.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class SecretArchiveReference : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretArchiveReference)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(KeyVaultId)) + { + writer.WritePropertyName("keyVaultId"u8); + writer.WriteStringValue(KeyVaultId); + } + if (options.Format != "W" && Optional.IsDefined(SecretName)) + { + writer.WritePropertyName("secretName"u8); + writer.WriteStringValue(SecretName); + } + if (options.Format != "W" && Optional.IsDefined(SecretVersion)) + { + writer.WritePropertyName("secretVersion"u8); + writer.WriteStringValue(SecretVersion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SecretArchiveReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretArchiveReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretArchiveReference(document.RootElement, options); + } + + internal static SecretArchiveReference DeserializeSecretArchiveReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier keyVaultId = default; + string secretName = default; + string secretVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyVaultId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyVaultId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("secretName"u8)) + { + secretName = property.Value.GetString(); + continue; + } + if (property.NameEquals("secretVersion"u8)) + { + secretVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecretArchiveReference(keyVaultId, secretName, secretVersion, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SecretArchiveReference)} does not support writing '{options.Format}' format."); + } + } + + SecretArchiveReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSecretArchiveReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretArchiveReference)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretArchiveReference.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretArchiveReference.cs new file mode 100644 index 0000000000000..1579d695ef40e --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretArchiveReference.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// SecretArchiveReference represents the reference to a secret in a key vault. + public partial class SecretArchiveReference + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SecretArchiveReference() + { + } + + /// Initializes a new instance of . + /// The resource ID of the key vault containing the secret. + /// The name of the secret in the key vault. + /// The version of the secret in the key vault. + /// Keeps track of any properties unknown to the library. + internal SecretArchiveReference(ResourceIdentifier keyVaultId, string secretName, string secretVersion, IDictionary serializedAdditionalRawData) + { + KeyVaultId = keyVaultId; + SecretName = secretName; + SecretVersion = secretVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource ID of the key vault containing the secret. + public ResourceIdentifier KeyVaultId { get; } + /// The name of the secret in the key vault. + public string SecretName { get; } + /// The version of the secret in the key vault. + public string SecretVersion { get; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretRotationStatus.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretRotationStatus.Serialization.cs new file mode 100644 index 0000000000000..2e0a9c0007913 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretRotationStatus.Serialization.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class SecretRotationStatus : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretRotationStatus)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ExpirePeriodDays)) + { + writer.WritePropertyName("expirePeriodDays"u8); + writer.WriteNumberValue(ExpirePeriodDays.Value); + } + if (options.Format != "W" && Optional.IsDefined(LastRotationOn)) + { + writer.WritePropertyName("lastRotationTime"u8); + writer.WriteStringValue(LastRotationOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(RotationPeriodDays)) + { + writer.WritePropertyName("rotationPeriodDays"u8); + writer.WriteNumberValue(RotationPeriodDays.Value); + } + if (options.Format != "W" && Optional.IsDefined(SecretArchiveReference)) + { + writer.WritePropertyName("secretArchiveReference"u8); + writer.WriteObjectValue(SecretArchiveReference, options); + } + if (options.Format != "W" && Optional.IsDefined(SecretType)) + { + writer.WritePropertyName("secretType"u8); + writer.WriteStringValue(SecretType); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SecretRotationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretRotationStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretRotationStatus(document.RootElement, options); + } + + internal static SecretRotationStatus DeserializeSecretRotationStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? expirePeriodDays = default; + DateTimeOffset? lastRotationTime = default; + long? rotationPeriodDays = default; + SecretArchiveReference secretArchiveReference = default; + string secretType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expirePeriodDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirePeriodDays = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("lastRotationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastRotationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("rotationPeriodDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rotationPeriodDays = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("secretArchiveReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secretArchiveReference = SecretArchiveReference.DeserializeSecretArchiveReference(property.Value, options); + continue; + } + if (property.NameEquals("secretType"u8)) + { + secretType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecretRotationStatus( + expirePeriodDays, + lastRotationTime, + rotationPeriodDays, + secretArchiveReference, + secretType, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SecretRotationStatus)} does not support writing '{options.Format}' format."); + } + } + + SecretRotationStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSecretRotationStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretRotationStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretRotationStatus.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretRotationStatus.cs new file mode 100644 index 0000000000000..de75fdec2e36c --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/SecretRotationStatus.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// SecretRotationStatus represents the status of a secret rotation. + public partial class SecretRotationStatus + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SecretRotationStatus() + { + } + + /// Initializes a new instance of . + /// The maximum number of days the secret may be used before it must be changed. + /// The date and time when the secret was last changed. + /// The number of days a secret exists before rotations will be attempted. + /// The reference to the secret in a key vault. + /// The type name used to identify the purpose of the secret. + /// Keeps track of any properties unknown to the library. + internal SecretRotationStatus(long? expirePeriodDays, DateTimeOffset? lastRotationOn, long? rotationPeriodDays, SecretArchiveReference secretArchiveReference, string secretType, IDictionary serializedAdditionalRawData) + { + ExpirePeriodDays = expirePeriodDays; + LastRotationOn = lastRotationOn; + RotationPeriodDays = rotationPeriodDays; + SecretArchiveReference = secretArchiveReference; + SecretType = secretType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The maximum number of days the secret may be used before it must be changed. + public long? ExpirePeriodDays { get; } + /// The date and time when the secret was last changed. + public DateTimeOffset? LastRotationOn { get; } + /// The number of days a secret exists before rotations will be attempted. + public long? RotationPeriodDays { get; } + /// The reference to the secret in a key vault. + public SecretArchiveReference SecretArchiveReference { get; } + /// The type name used to identify the purpose of the secret. + public string SecretType { get; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ServiceLoadBalancerBgpPeer.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ServiceLoadBalancerBgpPeer.cs index 281cba700e189..63936e0e48009 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ServiceLoadBalancerBgpPeer.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/ServiceLoadBalancerBgpPeer.cs @@ -63,8 +63,8 @@ public ServiceLoadBalancerBgpPeer(string name, string peerAddress, long peerAsn) /// Initializes a new instance of . /// The indicator of BFD enablement for this BgpPeer. /// The indicator to enable multi-hop peering support. - /// The requested BGP hold time value. This field uses ISO 8601 duration format, for example P1H. - /// The requested BGP keepalive time value. This field uses ISO 8601 duration format, for example P1H. + /// Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The requested BGP hold time value. This field uses ISO 8601 duration format, for example P1H. + /// Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The requested BGP keepalive time value. This field uses ISO 8601 duration format, for example P1H. /// The autonomous system number used for the local end of the BGP session. /// The name used to identify this BGP peer for association with a BGP advertisement. /// The authentication password for routers enforcing TCP MD5 authenticated sessions. @@ -96,9 +96,9 @@ internal ServiceLoadBalancerBgpPeer() public BfdEnabled? BfdEnabled { get; set; } /// The indicator to enable multi-hop peering support. public BgpMultiHop? BgpMultiHop { get; set; } - /// The requested BGP hold time value. This field uses ISO 8601 duration format, for example P1H. + /// Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The requested BGP hold time value. This field uses ISO 8601 duration format, for example P1H. public string HoldTime { get; set; } - /// The requested BGP keepalive time value. This field uses ISO 8601 duration format, for example P1H. + /// Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The requested BGP keepalive time value. This field uses ISO 8601 duration format, for example P1H. public string KeepAliveTime { get; set; } /// The autonomous system number used for the local end of the BGP session. public long? MyAsn { get; set; } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceSkuSlot.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceSkuSlot.cs index 8e4f3a29795b7..8ea98a74ea8be 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceSkuSlot.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StorageApplianceSkuSlot.cs @@ -52,7 +52,7 @@ internal StorageApplianceSkuSlot() /// Initializes a new instance of . /// The position in the rack for the storage appliance. - /// The maximum capacity of the storage appliance. + /// The maximum capacity of the storage appliance. Measured in gibibytes. /// The model of the storage appliance. /// Keeps track of any properties unknown to the library. internal StorageApplianceSkuSlot(long? rackSlot, long? capacityGB, string model, IDictionary serializedAdditionalRawData) @@ -65,7 +65,7 @@ internal StorageApplianceSkuSlot(long? rackSlot, long? capacityGB, string model, /// The position in the rack for the storage appliance. public long? RackSlot { get; } - /// The maximum capacity of the storage appliance. + /// The maximum capacity of the storage appliance. Measured in gibibytes. public long? CapacityGB { get; } /// The model of the storage appliance. public string Model { get; } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StringKeyValuePair.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StringKeyValuePair.Serialization.cs new file mode 100644 index 0000000000000..64985cf82c668 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StringKeyValuePair.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class StringKeyValuePair : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StringKeyValuePair)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StringKeyValuePair IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StringKeyValuePair)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStringKeyValuePair(document.RootElement, options); + } + + internal static StringKeyValuePair DeserializeStringKeyValuePair(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string key = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("key"u8)) + { + key = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StringKeyValuePair(key, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StringKeyValuePair)} does not support writing '{options.Format}' format."); + } + } + + StringKeyValuePair IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStringKeyValuePair(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StringKeyValuePair)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StringKeyValuePair.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StringKeyValuePair.cs new file mode 100644 index 0000000000000..6c1e374181e4d --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/StringKeyValuePair.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// StringKeyValuePair represents a single entry in a mapping of keys to values. + public partial class StringKeyValuePair + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The key to the mapped value. + /// The value of the mapping key. + /// or is null. + public StringKeyValuePair(string key, string value) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + Key = key; + Value = value; + } + + /// Initializes a new instance of . + /// The key to the mapped value. + /// The value of the mapping key. + /// Keeps track of any properties unknown to the library. + internal StringKeyValuePair(string key, string value, IDictionary serializedAdditionalRawData) + { + Key = key; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal StringKeyValuePair() + { + } + + /// The key to the mapped value. + public string Key { get; set; } + /// The value of the mapping key. + public string Value { get; set; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolCollection.cs index 6509fa574ba75..109d7884dfc2a 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string agentPoolName, /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string agentPoolName, Canc /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string agentPoolName, CancellationToken can /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolData.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolData.cs index 7de2bde2b9a24..19653b3906af4 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolData.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolData.cs @@ -144,19 +144,7 @@ internal NetworkCloudAgentPoolData() /// The taints applied to the nodes in this agent pool. public IList Taints { get; } /// The configuration of the agent pool. - internal AgentPoolUpgradeSettings UpgradeSettings { get; set; } - /// The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. - public string UpgradeMaxSurge - { - get => UpgradeSettings is null ? default : UpgradeSettings.MaxSurge; - set - { - if (UpgradeSettings is null) - UpgradeSettings = new AgentPoolUpgradeSettings(); - UpgradeSettings.MaxSurge = value; - } - } - + public AgentPoolUpgradeSettings UpgradeSettings { get; set; } /// The name of the VM SKU that determines the size of resources allocated for node VMs. public string VmSkuName { get; set; } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolResource.cs index 55ba212358482..04403b3477660 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -170,90 +170,6 @@ public virtual Response Get(CancellationToken can } } - /// - /// Delete the provided Kubernetes cluster agent pool. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName} - /// - /// - /// Operation Id - /// AgentPools_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudAgentPoolAgentPoolsClientDiagnostics.CreateScope("NetworkCloudAgentPoolResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudAgentPoolAgentPoolsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudAgentPoolAgentPoolsClientDiagnostics, Pipeline, _networkCloudAgentPoolAgentPoolsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete the provided Kubernetes cluster agent pool. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName} - /// - /// - /// Operation Id - /// AgentPools_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudAgentPoolAgentPoolsClientDiagnostics.CreateScope("NetworkCloudAgentPoolResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudAgentPoolAgentPoolsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudAgentPoolAgentPoolsClientDiagnostics, Pipeline, _networkCloudAgentPoolAgentPoolsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the Kubernetes cluster agent pool. Properties and tag updates can be done independently. /// @@ -267,7 +183,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +229,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -359,7 +275,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -421,7 +337,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -483,7 +399,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -540,7 +456,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -597,7 +513,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -657,7 +573,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineCollection.cs index e51e240cea33d..3f3259a03ecc9 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string bareMet /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string bareMetalMachineNam /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string bareMetalMachineName, CancellationTo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineData.Serialization.cs index 024f5efe09dbb..2f127a2948192 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineData.Serialization.cs @@ -115,10 +115,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("kubernetesVersion"u8); writer.WriteStringValue(KubernetesVersion); } + if (Optional.IsDefined(MachineClusterVersion)) + { + writer.WritePropertyName("machineClusterVersion"u8); + writer.WriteStringValue(MachineClusterVersion); + } writer.WritePropertyName("machineDetails"u8); writer.WriteStringValue(MachineDetails); writer.WritePropertyName("machineName"u8); writer.WriteStringValue(MachineName); + if (options.Format != "W" && Optional.IsCollectionDefined(MachineRoles)) + { + writer.WritePropertyName("machineRoles"u8); + writer.WriteStartArray(); + foreach (var item in MachineRoles) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } writer.WritePropertyName("machineSkuId"u8); writer.WriteStringValue(MachineSkuId); if (options.Format != "W" && Optional.IsDefined(OamIPv4Address)) @@ -155,6 +170,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("readyState"u8); writer.WriteStringValue(ReadyState.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(RuntimeProtectionStatus)) + { + writer.WritePropertyName("runtimeProtectionStatus"u8); + writer.WriteObjectValue(RuntimeProtectionStatus, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(SecretRotationStatus)) + { + writer.WritePropertyName("secretRotationStatus"u8); + writer.WriteStartArray(); + foreach (var item in SecretRotationStatus) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } writer.WritePropertyName("serialNumber"u8); writer.WriteStringValue(SerialNumber); if (options.Format != "W" && Optional.IsDefined(ServiceTag)) @@ -216,8 +246,10 @@ internal static NetworkCloudBareMetalMachineData DeserializeNetworkCloudBareMeta IReadOnlyList hybridAksClustersAssociatedIds = default; string kubernetesNodeName = default; string kubernetesVersion = default; + string machineClusterVersion = default; string machineDetails = default; string machineName = default; + IReadOnlyList machineRoles = default; string machineSkuId = default; IPAddress oamIPv4Address = default; string oamIPv6Address = default; @@ -227,6 +259,8 @@ internal static NetworkCloudBareMetalMachineData DeserializeNetworkCloudBareMeta ResourceIdentifier rackId = default; long rackSlot = default; BareMetalMachineReadyState? readyState = default; + RuntimeProtectionStatus runtimeProtectionStatus = default; + IReadOnlyList secretRotationStatus = default; string serialNumber = default; string serviceTag = default; IReadOnlyList virtualMachinesAssociatedIds = default; @@ -406,6 +440,11 @@ internal static NetworkCloudBareMetalMachineData DeserializeNetworkCloudBareMeta kubernetesVersion = property0.Value.GetString(); continue; } + if (property0.NameEquals("machineClusterVersion"u8)) + { + machineClusterVersion = property0.Value.GetString(); + continue; + } if (property0.NameEquals("machineDetails"u8)) { machineDetails = property0.Value.GetString(); @@ -416,6 +455,20 @@ internal static NetworkCloudBareMetalMachineData DeserializeNetworkCloudBareMeta machineName = property0.Value.GetString(); continue; } + if (property0.NameEquals("machineRoles"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + machineRoles = array; + continue; + } if (property0.NameEquals("machineSkuId"u8)) { machineSkuId = property0.Value.GetString(); @@ -477,6 +530,29 @@ internal static NetworkCloudBareMetalMachineData DeserializeNetworkCloudBareMeta readyState = new BareMetalMachineReadyState(property0.Value.GetString()); continue; } + if (property0.NameEquals("runtimeProtectionStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runtimeProtectionStatus = RuntimeProtectionStatus.DeserializeRuntimeProtectionStatus(property0.Value, options); + continue; + } + if (property0.NameEquals("secretRotationStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(Models.SecretRotationStatus.DeserializeSecretRotationStatus(item, options)); + } + secretRotationStatus = array; + continue; + } if (property0.NameEquals("serialNumber"u8)) { serialNumber = property0.Value.GetString(); @@ -532,8 +608,10 @@ internal static NetworkCloudBareMetalMachineData DeserializeNetworkCloudBareMeta hybridAksClustersAssociatedIds ?? new ChangeTrackingList(), kubernetesNodeName, kubernetesVersion, + machineClusterVersion, machineDetails, machineName, + machineRoles ?? new ChangeTrackingList(), machineSkuId, oamIPv4Address, oamIPv6Address, @@ -543,6 +621,8 @@ internal static NetworkCloudBareMetalMachineData DeserializeNetworkCloudBareMeta rackId, rackSlot, readyState, + runtimeProtectionStatus, + secretRotationStatus ?? new ChangeTrackingList(), serialNumber, serviceTag, virtualMachinesAssociatedIds ?? new ChangeTrackingList(), diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineData.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineData.cs index c0daa21b6da77..b3ab9ad1ba891 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineData.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineData.cs @@ -88,9 +88,11 @@ public NetworkCloudBareMetalMachineData(AzureLocation location, ExtendedLocation HybridAksClustersAssociatedIds = new ChangeTrackingList(); MachineDetails = machineDetails; MachineName = machineName; + MachineRoles = new ChangeTrackingList(); MachineSkuId = machineSkuId; RackId = rackId; RackSlot = rackSlot; + SecretRotationStatus = new ChangeTrackingList(); SerialNumber = serialNumber; VirtualMachinesAssociatedIds = new ChangeTrackingList(); } @@ -117,8 +119,10 @@ public NetworkCloudBareMetalMachineData(AzureLocation location, ExtendedLocation /// Field Deprecated. These fields will be empty/omitted. The list of the resource IDs for the HybridAksClusters that have nodes hosted on this bare metal machine. /// The name of this machine represented by the host object in the Cluster's Kubernetes control plane. /// The version of Kubernetes running on this machine. + /// The cluster version that has been applied to this machine during deployment or a version update. /// The custom details provided by the customer. /// The OS-level hostname assigned to this machine. + /// The list of roles that are assigned to the cluster node running on this machine. /// The unique internal identifier of the bare metal machine SKU. /// The IPv4 address that is assigned to the bare metal machine during the cluster deployment. /// The IPv6 address that is assigned to the bare metal machine during the cluster deployment. @@ -128,11 +132,13 @@ public NetworkCloudBareMetalMachineData(AzureLocation location, ExtendedLocation /// The resource ID of the rack where this bare metal machine resides. /// The rack slot in which this bare metal machine is located, ordered from the bottom up i.e. the lowest slot is 1. /// The indicator of whether the bare metal machine is ready to receive workloads. + /// The runtime protection status of the bare metal machine. + /// The list of statuses that represent secret rotation activity. /// The serial number of the bare metal machine. /// The discovered value of the machine's service tag. /// Field Deprecated. These fields will be empty/omitted. The list of the resource IDs for the VirtualMachines that are hosted on this bare metal machine. /// Keeps track of any properties unknown to the library. - internal NetworkCloudBareMetalMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedLocation extendedLocation, IReadOnlyList associatedResourceIds, string bmcConnectionString, AdministrativeCredentials bmcCredentials, string bmcMacAddress, string bootMacAddress, ResourceIdentifier clusterId, BareMetalMachineCordonStatus? cordonStatus, BareMetalMachineDetailedStatus? detailedStatus, string detailedStatusMessage, HardwareInventory hardwareInventory, HardwareValidationStatus hardwareValidationStatus, IReadOnlyList hybridAksClustersAssociatedIds, string kubernetesNodeName, string kubernetesVersion, string machineDetails, string machineName, string machineSkuId, IPAddress oamIPv4Address, string oamIPv6Address, string osImage, BareMetalMachinePowerState? powerState, BareMetalMachineProvisioningState? provisioningState, ResourceIdentifier rackId, long rackSlot, BareMetalMachineReadyState? readyState, string serialNumber, string serviceTag, IReadOnlyList virtualMachinesAssociatedIds, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal NetworkCloudBareMetalMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedLocation extendedLocation, IReadOnlyList associatedResourceIds, string bmcConnectionString, AdministrativeCredentials bmcCredentials, string bmcMacAddress, string bootMacAddress, ResourceIdentifier clusterId, BareMetalMachineCordonStatus? cordonStatus, BareMetalMachineDetailedStatus? detailedStatus, string detailedStatusMessage, HardwareInventory hardwareInventory, HardwareValidationStatus hardwareValidationStatus, IReadOnlyList hybridAksClustersAssociatedIds, string kubernetesNodeName, string kubernetesVersion, string machineClusterVersion, string machineDetails, string machineName, IReadOnlyList machineRoles, string machineSkuId, IPAddress oamIPv4Address, string oamIPv6Address, string osImage, BareMetalMachinePowerState? powerState, BareMetalMachineProvisioningState? provisioningState, ResourceIdentifier rackId, long rackSlot, BareMetalMachineReadyState? readyState, RuntimeProtectionStatus runtimeProtectionStatus, IReadOnlyList secretRotationStatus, string serialNumber, string serviceTag, IReadOnlyList virtualMachinesAssociatedIds, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ExtendedLocation = extendedLocation; AssociatedResourceIds = associatedResourceIds; @@ -149,8 +155,10 @@ internal NetworkCloudBareMetalMachineData(ResourceIdentifier id, string name, Re HybridAksClustersAssociatedIds = hybridAksClustersAssociatedIds; KubernetesNodeName = kubernetesNodeName; KubernetesVersion = kubernetesVersion; + MachineClusterVersion = machineClusterVersion; MachineDetails = machineDetails; MachineName = machineName; + MachineRoles = machineRoles; MachineSkuId = machineSkuId; OamIPv4Address = oamIPv4Address; OamIPv6Address = oamIPv6Address; @@ -160,6 +168,8 @@ internal NetworkCloudBareMetalMachineData(ResourceIdentifier id, string name, Re RackId = rackId; RackSlot = rackSlot; ReadyState = readyState; + RuntimeProtectionStatus = runtimeProtectionStatus; + SecretRotationStatus = secretRotationStatus; SerialNumber = serialNumber; ServiceTag = serviceTag; VirtualMachinesAssociatedIds = virtualMachinesAssociatedIds; @@ -201,10 +211,14 @@ internal NetworkCloudBareMetalMachineData() public string KubernetesNodeName { get; } /// The version of Kubernetes running on this machine. public string KubernetesVersion { get; } + /// The cluster version that has been applied to this machine during deployment or a version update. + public string MachineClusterVersion { get; set; } /// The custom details provided by the customer. public string MachineDetails { get; set; } /// The OS-level hostname assigned to this machine. public string MachineName { get; set; } + /// The list of roles that are assigned to the cluster node running on this machine. + public IReadOnlyList MachineRoles { get; } /// The unique internal identifier of the bare metal machine SKU. public string MachineSkuId { get; set; } /// The IPv4 address that is assigned to the bare metal machine during the cluster deployment. @@ -223,6 +237,10 @@ internal NetworkCloudBareMetalMachineData() public long RackSlot { get; set; } /// The indicator of whether the bare metal machine is ready to receive workloads. public BareMetalMachineReadyState? ReadyState { get; } + /// The runtime protection status of the bare metal machine. + public RuntimeProtectionStatus RuntimeProtectionStatus { get; } + /// The list of statuses that represent secret rotation activity. + public IReadOnlyList SecretRotationStatus { get; } /// The serial number of the bare metal machine. public string SerialNumber { get; set; } /// The discovered value of the machine's service tag. diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetCollection.cs index d487b1a8c2068..d9023f499b0fc 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string b /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cance /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string bareMetalMachineKey /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string bareMetalMachineKeySetName, Cancella /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetResource.cs index d4b01f1e49a4c..3a8aaf22bdc49 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -170,90 +170,6 @@ public virtual Response Get(Cancella } } - /// - /// Delete the bare metal machine key set of the provided cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName} - /// - /// - /// Operation Id - /// BareMetalMachineKeySets_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineKeySetResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics, Pipeline, _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete the bare metal machine key set of the provided cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName} - /// - /// - /// Operation Id - /// BareMetalMachineKeySets_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineKeySetResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsClientDiagnostics, Pipeline, _networkCloudBareMetalMachineKeySetBareMetalMachineKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. /// @@ -267,7 +183,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +229,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -359,7 +275,7 @@ public virtual ArmOperation Update(W /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -421,7 +337,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -483,7 +399,7 @@ public virtual Response AddTag(strin /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -540,7 +456,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -597,7 +513,7 @@ public virtual Response SetTags(IDic /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -657,7 +573,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.cs index 6a1c10c1d2a0a..c60e23172bd7b 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Update(WaitUnt /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> Cordo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual ArmOperation Cordon(WaitUntil /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual async Task> Power /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual ArmOperation PowerOff(WaitUnti /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -489,7 +489,7 @@ public virtual async Task> Reima /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -531,7 +531,7 @@ public virtual ArmOperation Reimage(WaitUntil /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -574,7 +574,7 @@ public virtual async Task> Repla /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -617,7 +617,7 @@ public virtual ArmOperation Replace(WaitUntil /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -659,7 +659,7 @@ public virtual async Task> Resta /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -701,7 +701,7 @@ public virtual ArmOperation Restart(WaitUntil /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -747,7 +747,7 @@ public virtual async Task> RunCo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -793,7 +793,7 @@ public virtual ArmOperation RunCommand(WaitUn /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -839,7 +839,7 @@ public virtual async Task> RunDa /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -885,7 +885,7 @@ public virtual ArmOperation RunDataExtracts(W /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -931,7 +931,7 @@ public virtual async Task> RunRe /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -977,7 +977,7 @@ public virtual ArmOperation RunReadCommands(W /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1019,7 +1019,7 @@ public virtual async Task> Start /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1061,7 +1061,7 @@ public virtual ArmOperation Start(WaitUntil w /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1103,7 +1103,7 @@ public virtual async Task> Uncor /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1145,7 +1145,7 @@ public virtual ArmOperation Uncordon(WaitUnti /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1207,7 +1207,7 @@ public virtual async Task> AddTag /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1269,7 +1269,7 @@ public virtual Response AddTag(string key, /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1326,7 +1326,7 @@ public virtual async Task> SetTag /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1383,7 +1383,7 @@ public virtual Response SetTags(IDictionar /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1443,7 +1443,7 @@ public virtual async Task> Remove /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetCollection.cs index 1f8f4ee512c4f..c46a7974968a9 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string bmcKeySetName, /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string bmcKeySetName, Canc /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string bmcKeySetName, CancellationToken can /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetResource.cs index d0036cb2426d3..c974a9a93b098 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -170,90 +170,6 @@ public virtual Response Get(CancellationToken can } } - /// - /// Delete the baseboard management controller key set of the provided cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName} - /// - /// - /// Operation Id - /// BmcKeySets_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudBmcKeySetBmcKeySetsClientDiagnostics.CreateScope("NetworkCloudBmcKeySetResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudBmcKeySetBmcKeySetsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudBmcKeySetBmcKeySetsClientDiagnostics, Pipeline, _networkCloudBmcKeySetBmcKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete the baseboard management controller key set of the provided cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName} - /// - /// - /// Operation Id - /// BmcKeySets_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudBmcKeySetBmcKeySetsClientDiagnostics.CreateScope("NetworkCloudBmcKeySetResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudBmcKeySetBmcKeySetsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudBmcKeySetBmcKeySetsClientDiagnostics, Pipeline, _networkCloudBmcKeySetBmcKeySetsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Patch properties of baseboard management controller key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. /// @@ -267,7 +183,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +229,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -359,7 +275,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -421,7 +337,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -483,7 +399,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -540,7 +456,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -597,7 +513,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -657,7 +573,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkCollection.cs index f96e9c8ab6d1c..04d5d2185f5e1 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string clo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string cloudServicesNetwor /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string cloudServicesNetworkName, Cancellati /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkResource.cs index cb4199e4d0be9..916a4031b5954 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -170,90 +170,6 @@ public virtual Response Get(Cancellati } } - /// - /// Delete the provided cloud services network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName} - /// - /// - /// Operation Id - /// CloudServicesNetworks_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics.CreateScope("NetworkCloudCloudServicesNetworkResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics, Pipeline, _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete the provided cloud services network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName} - /// - /// - /// Operation Id - /// CloudServicesNetworks_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics.CreateScope("NetworkCloudCloudServicesNetworkResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudCloudServicesNetworkCloudServicesNetworksClientDiagnostics, Pipeline, _networkCloudCloudServicesNetworkCloudServicesNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. /// @@ -267,7 +183,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +229,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -359,7 +275,7 @@ public virtual ArmOperation Update(Wai /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -421,7 +337,7 @@ public virtual async Task> Ad /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -483,7 +399,7 @@ public virtual Response AddTag(string /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -540,7 +456,7 @@ public virtual async Task> Se /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -597,7 +513,7 @@ public virtual Response SetTags(IDicti /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -657,7 +573,7 @@ public virtual async Task> Re /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterCollection.cs index ebdf7d949b61e..51a754330935e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string clusterName, Can /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string clusterName, Cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string clusterName, CancellationToken cance /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterData.Serialization.cs index b2dcfbc3be644..88cb9b0558852 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterData.Serialization.cs @@ -39,6 +39,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("aggregatorOrSingleRackDefinition"u8); @@ -97,6 +103,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(ClusterType.ToString()); writer.WritePropertyName("clusterVersion"u8); writer.WriteStringValue(ClusterVersion); + if (Optional.IsDefined(CommandOutputSettings)) + { + writer.WritePropertyName("commandOutputSettings"u8); + writer.WriteObjectValue(CommandOutputSettings, options); + } if (Optional.IsDefined(ComputeDeploymentThreshold)) { writer.WritePropertyName("computeDeploymentThreshold"u8); @@ -144,11 +155,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); } + if (Optional.IsDefined(RuntimeProtectionConfiguration)) + { + writer.WritePropertyName("runtimeProtectionConfiguration"u8); + writer.WriteObjectValue(RuntimeProtectionConfiguration, options); + } + if (Optional.IsDefined(SecretArchive)) + { + writer.WritePropertyName("secretArchive"u8); + writer.WriteObjectValue(SecretArchive, options); + } if (options.Format != "W" && Optional.IsDefined(SupportExpireOn)) { writer.WritePropertyName("supportExpiryDate"u8); writer.WriteStringValue(SupportExpireOn.Value, "O"); } + if (Optional.IsDefined(UpdateStrategy)) + { + writer.WritePropertyName("updateStrategy"u8); + writer.WriteObjectValue(UpdateStrategy, options); + } if (options.Format != "W" && Optional.IsCollectionDefined(WorkloadResourceIds)) { writer.WritePropertyName("workloadResourceIds"u8); @@ -188,6 +214,7 @@ internal static NetworkCloudClusterData DeserializeNetworkCloudClusterData(JsonE return null; } ExtendedLocation extendedLocation = default; + ManagedServiceIdentity identity = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -206,6 +233,7 @@ internal static NetworkCloudClusterData DeserializeNetworkCloudClusterData(JsonE ServicePrincipalInformation clusterServicePrincipal = default; ClusterType clusterType = default; string clusterVersion = default; + CommandOutputSettings commandOutputSettings = default; ValidationThreshold computeDeploymentThreshold = default; IList computeRackDefinitions = default; ClusterDetailedStatus? detailedStatus = default; @@ -215,7 +243,10 @@ internal static NetworkCloudClusterData DeserializeNetworkCloudClusterData(JsonE long? manualActionCount = default; ResourceIdentifier networkFabricId = default; ClusterProvisioningState? provisioningState = default; + RuntimeProtectionConfiguration runtimeProtectionConfiguration = default; + ClusterSecretArchive secretArchive = default; DateTimeOffset? supportExpiryDate = default; + ClusterUpdateStrategy updateStrategy = default; IReadOnlyList workloadResourceIds = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -226,6 +257,16 @@ internal static NetworkCloudClusterData DeserializeNetworkCloudClusterData(JsonE extendedLocation = ExtendedLocation.DeserializeExtendedLocation(property.Value, options); continue; } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -375,6 +416,15 @@ internal static NetworkCloudClusterData DeserializeNetworkCloudClusterData(JsonE clusterVersion = property0.Value.GetString(); continue; } + if (property0.NameEquals("commandOutputSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + commandOutputSettings = CommandOutputSettings.DeserializeCommandOutputSettings(property0.Value, options); + continue; + } if (property0.NameEquals("computeDeploymentThreshold"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -453,6 +503,24 @@ internal static NetworkCloudClusterData DeserializeNetworkCloudClusterData(JsonE provisioningState = new ClusterProvisioningState(property0.Value.GetString()); continue; } + if (property0.NameEquals("runtimeProtectionConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runtimeProtectionConfiguration = RuntimeProtectionConfiguration.DeserializeRuntimeProtectionConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("secretArchive"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secretArchive = ClusterSecretArchive.DeserializeClusterSecretArchive(property0.Value, options); + continue; + } if (property0.NameEquals("supportExpiryDate"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -462,6 +530,15 @@ internal static NetworkCloudClusterData DeserializeNetworkCloudClusterData(JsonE supportExpiryDate = property0.Value.GetDateTimeOffset("O"); continue; } + if (property0.NameEquals("updateStrategy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateStrategy = ClusterUpdateStrategy.DeserializeClusterUpdateStrategy(property0.Value, options); + continue; + } if (property0.NameEquals("workloadResourceIds"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -500,6 +577,7 @@ internal static NetworkCloudClusterData DeserializeNetworkCloudClusterData(JsonE tags ?? new ChangeTrackingDictionary(), location, extendedLocation, + identity, aggregatorOrSingleRackDefinition, analyticsWorkspaceId, availableUpgradeVersions ?? new ChangeTrackingList(), @@ -512,6 +590,7 @@ internal static NetworkCloudClusterData DeserializeNetworkCloudClusterData(JsonE clusterServicePrincipal, clusterType, clusterVersion, + commandOutputSettings, computeDeploymentThreshold, computeRackDefinitions ?? new ChangeTrackingList(), detailedStatus, @@ -521,7 +600,10 @@ internal static NetworkCloudClusterData DeserializeNetworkCloudClusterData(JsonE manualActionCount, networkFabricId, provisioningState, + runtimeProtectionConfiguration, + secretArchive, supportExpiryDate, + updateStrategy, workloadResourceIds ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterData.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterData.cs index d8495638bc66c..537bfe45d19d8 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterData.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterData.cs @@ -84,6 +84,7 @@ public NetworkCloudClusterData(AzureLocation location, ExtendedLocation extended /// The tags. /// The location. /// The extended location of the cluster manager associated with the cluster. + /// The identity for the resource. /// The rack definition that is intended to reflect only a single rack in a single rack cluster, or an aggregator rack in a multi-rack cluster. /// The resource ID of the Log Analytics Workspace that will be used for storing relevant logs. /// The list of cluster runtime version upgrades available for this cluster. @@ -96,6 +97,7 @@ public NetworkCloudClusterData(AzureLocation location, ExtendedLocation extended /// The service principal to be used by the cluster during Arc Appliance installation. /// The type of rack configuration for the cluster. /// The current runtime version of the cluster. + /// The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. /// The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. /// /// The list of rack definitions for the compute racks in a multi-rack @@ -108,12 +110,16 @@ public NetworkCloudClusterData(AzureLocation location, ExtendedLocation extended /// The count of Manual Action Taken (MAT) events that have not been validated. /// The resource ID of the Network Fabric associated with the cluster. /// The provisioning state of the cluster. + /// The settings for cluster runtime protection. + /// The configuration for use of a key vault to store secrets for later retrieval by the operator. /// The support end date of the runtime version of the cluster. + /// The strategy for updating the cluster. /// The list of workload resource IDs that are hosted within this cluster. /// Keeps track of any properties unknown to the library. - internal NetworkCloudClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedLocation extendedLocation, NetworkCloudRackDefinition aggregatorOrSingleRackDefinition, ResourceIdentifier analyticsWorkspaceId, IReadOnlyList availableUpgradeVersions, ClusterCapacity clusterCapacity, ClusterConnectionStatus? clusterConnectionStatus, ExtendedLocation clusterExtendedLocation, string clusterLocation, ClusterManagerConnectionStatus? clusterManagerConnectionStatus, ResourceIdentifier clusterManagerId, ServicePrincipalInformation clusterServicePrincipal, ClusterType clusterType, string clusterVersion, ValidationThreshold computeDeploymentThreshold, IList computeRackDefinitions, ClusterDetailedStatus? detailedStatus, string detailedStatusMessage, ExtendedLocation hybridAksExtendedLocation, ManagedResourceGroupConfiguration managedResourceGroupConfiguration, long? manualActionCount, ResourceIdentifier networkFabricId, ClusterProvisioningState? provisioningState, DateTimeOffset? supportExpireOn, IReadOnlyList workloadResourceIds, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal NetworkCloudClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedLocation extendedLocation, ManagedServiceIdentity identity, NetworkCloudRackDefinition aggregatorOrSingleRackDefinition, ResourceIdentifier analyticsWorkspaceId, IReadOnlyList availableUpgradeVersions, ClusterCapacity clusterCapacity, ClusterConnectionStatus? clusterConnectionStatus, ExtendedLocation clusterExtendedLocation, string clusterLocation, ClusterManagerConnectionStatus? clusterManagerConnectionStatus, ResourceIdentifier clusterManagerId, ServicePrincipalInformation clusterServicePrincipal, ClusterType clusterType, string clusterVersion, CommandOutputSettings commandOutputSettings, ValidationThreshold computeDeploymentThreshold, IList computeRackDefinitions, ClusterDetailedStatus? detailedStatus, string detailedStatusMessage, ExtendedLocation hybridAksExtendedLocation, ManagedResourceGroupConfiguration managedResourceGroupConfiguration, long? manualActionCount, ResourceIdentifier networkFabricId, ClusterProvisioningState? provisioningState, RuntimeProtectionConfiguration runtimeProtectionConfiguration, ClusterSecretArchive secretArchive, DateTimeOffset? supportExpireOn, ClusterUpdateStrategy updateStrategy, IReadOnlyList workloadResourceIds, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ExtendedLocation = extendedLocation; + Identity = identity; AggregatorOrSingleRackDefinition = aggregatorOrSingleRackDefinition; AnalyticsWorkspaceId = analyticsWorkspaceId; AvailableUpgradeVersions = availableUpgradeVersions; @@ -126,6 +132,7 @@ internal NetworkCloudClusterData(ResourceIdentifier id, string name, ResourceTyp ClusterServicePrincipal = clusterServicePrincipal; ClusterType = clusterType; ClusterVersion = clusterVersion; + CommandOutputSettings = commandOutputSettings; ComputeDeploymentThreshold = computeDeploymentThreshold; ComputeRackDefinitions = computeRackDefinitions; DetailedStatus = detailedStatus; @@ -135,7 +142,10 @@ internal NetworkCloudClusterData(ResourceIdentifier id, string name, ResourceTyp ManualActionCount = manualActionCount; NetworkFabricId = networkFabricId; ProvisioningState = provisioningState; + RuntimeProtectionConfiguration = runtimeProtectionConfiguration; + SecretArchive = secretArchive; SupportExpireOn = supportExpireOn; + UpdateStrategy = updateStrategy; WorkloadResourceIds = workloadResourceIds; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -147,6 +157,8 @@ internal NetworkCloudClusterData() /// The extended location of the cluster manager associated with the cluster. public ExtendedLocation ExtendedLocation { get; set; } + /// The identity for the resource. + public ManagedServiceIdentity Identity { get; set; } /// The rack definition that is intended to reflect only a single rack in a single rack cluster, or an aggregator rack in a multi-rack cluster. public NetworkCloudRackDefinition AggregatorOrSingleRackDefinition { get; set; } /// The resource ID of the Log Analytics Workspace that will be used for storing relevant logs. @@ -171,6 +183,8 @@ internal NetworkCloudClusterData() public ClusterType ClusterType { get; set; } /// The current runtime version of the cluster. public string ClusterVersion { get; set; } + /// The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. + public CommandOutputSettings CommandOutputSettings { get; set; } /// The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. public ValidationThreshold ComputeDeploymentThreshold { get; set; } /// @@ -192,8 +206,26 @@ internal NetworkCloudClusterData() public ResourceIdentifier NetworkFabricId { get; set; } /// The provisioning state of the cluster. public ClusterProvisioningState? ProvisioningState { get; } + /// The settings for cluster runtime protection. + internal RuntimeProtectionConfiguration RuntimeProtectionConfiguration { get; set; } + /// The mode of operation for runtime protection. + public RuntimeProtectionEnforcementLevel? RuntimeProtectionEnforcementLevel + { + get => RuntimeProtectionConfiguration is null ? default : RuntimeProtectionConfiguration.EnforcementLevel; + set + { + if (RuntimeProtectionConfiguration is null) + RuntimeProtectionConfiguration = new RuntimeProtectionConfiguration(); + RuntimeProtectionConfiguration.EnforcementLevel = value; + } + } + + /// The configuration for use of a key vault to store secrets for later retrieval by the operator. + public ClusterSecretArchive SecretArchive { get; set; } /// The support end date of the runtime version of the cluster. public DateTimeOffset? SupportExpireOn { get; } + /// The strategy for updating the cluster. + public ClusterUpdateStrategy UpdateStrategy { get; set; } /// The list of workload resource IDs that are hosted within this cluster. public IReadOnlyList WorkloadResourceIds { get; } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerCollection.cs index fe1d9c226da78..c0217a626f461 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string clusterMa /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string clusterManagerName, /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string clusterManagerName, CancellationToke /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerData.Serialization.cs index ecfcd28db6c10..82b6b4778ef81 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerData.Serialization.cs @@ -37,6 +37,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AnalyticsWorkspaceId)) @@ -119,6 +125,7 @@ internal static NetworkCloudClusterManagerData DeserializeNetworkCloudClusterMan { return null; } + ManagedServiceIdentity identity = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -139,6 +146,16 @@ internal static NetworkCloudClusterManagerData DeserializeNetworkCloudClusterMan Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -295,6 +312,7 @@ internal static NetworkCloudClusterManagerData DeserializeNetworkCloudClusterMan systemData, tags ?? new ChangeTrackingDictionary(), location, + identity, analyticsWorkspaceId, availabilityZones ?? new ChangeTrackingList(), clusterVersions ?? new ChangeTrackingList(), diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerData.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerData.cs index cc4ef6e0c4ae3..866c1a7d85a74 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerData.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerData.cs @@ -71,6 +71,7 @@ public NetworkCloudClusterManagerData(AzureLocation location, ResourceIdentifier /// The systemData. /// The tags. /// The location. + /// The identity of the cluster manager. /// The resource ID of the Log Analytics workspace that is used for the logs collection. /// Field deprecated, this value will no longer influence the cluster manager allocation process and will be removed in a future version. The Azure availability zones within the region that will be used to support the cluster manager resource. /// The list of the cluster versions the manager supports. It is used as input in clusterVersion property of a cluster resource. @@ -82,8 +83,9 @@ public NetworkCloudClusterManagerData(AzureLocation location, ResourceIdentifier /// The provisioning state of the cluster manager. /// Field deprecated, this value will no longer influence the cluster manager allocation process and will be removed in a future version. The size of the Azure virtual machines to use for hosting the cluster manager resource. /// Keeps track of any properties unknown to the library. - internal NetworkCloudClusterManagerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceIdentifier analyticsWorkspaceId, IList availabilityZones, IReadOnlyList clusterVersions, ClusterManagerDetailedStatus? detailedStatus, string detailedStatusMessage, ResourceIdentifier fabricControllerId, ManagedResourceGroupConfiguration managedResourceGroupConfiguration, ExtendedLocation managerExtendedLocation, ClusterManagerProvisioningState? provisioningState, string vmSize, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal NetworkCloudClusterManagerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ResourceIdentifier analyticsWorkspaceId, IList availabilityZones, IReadOnlyList clusterVersions, ClusterManagerDetailedStatus? detailedStatus, string detailedStatusMessage, ResourceIdentifier fabricControllerId, ManagedResourceGroupConfiguration managedResourceGroupConfiguration, ExtendedLocation managerExtendedLocation, ClusterManagerProvisioningState? provisioningState, string vmSize, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { + Identity = identity; AnalyticsWorkspaceId = analyticsWorkspaceId; AvailabilityZones = availabilityZones; ClusterVersions = clusterVersions; @@ -102,6 +104,8 @@ internal NetworkCloudClusterManagerData() { } + /// The identity of the cluster manager. + public ManagedServiceIdentity Identity { get; set; } /// The resource ID of the Log Analytics workspace that is used for the logs collection. public ResourceIdentifier AnalyticsWorkspaceId { get; set; } /// Field deprecated, this value will no longer influence the cluster manager allocation process and will be removed in a future version. The Azure availability zones within the region that will be used to support the cluster manager resource. diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerResource.cs index fc12487e2e67b..425029e3ee040 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -170,90 +170,6 @@ public virtual Response Get(CancellationToke } } - /// - /// Delete the provided cluster manager. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName} - /// - /// - /// Operation Id - /// ClusterManagers_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudClusterManagerClusterManagersClientDiagnostics.CreateScope("NetworkCloudClusterManagerResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudClusterManagerClusterManagersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudClusterManagerClusterManagersClientDiagnostics, Pipeline, _networkCloudClusterManagerClusterManagersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete the provided cluster manager. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName} - /// - /// - /// Operation Id - /// ClusterManagers_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudClusterManagerClusterManagersClientDiagnostics.CreateScope("NetworkCloudClusterManagerResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudClusterManagerClusterManagersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudClusterManagerClusterManagersClientDiagnostics, Pipeline, _networkCloudClusterManagerClusterManagersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. /// @@ -267,7 +183,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -309,7 +225,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -351,7 +267,7 @@ public virtual Response Update(NetworkCloudC /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -413,7 +329,7 @@ public virtual async Task> AddTagAs /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -475,7 +391,7 @@ public virtual Response AddTag(string key, s /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -532,7 +448,7 @@ public virtual async Task> SetTagsA /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -589,7 +505,7 @@ public virtual Response SetTags(IDictionary< /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -649,7 +565,7 @@ public virtual async Task> RemoveTa /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationCollection.cs index d48f15ce9c4c5..6946605c5a855 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation Cre /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(str /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable Ge /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll( /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string metricsConfiguratio /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string metricsConfigurationName, Cancellati /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationResource.cs index 564bed168d43b..4fc31b5807aed 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -170,90 +170,6 @@ public virtual Response Get(Can } } - /// - /// Delete the metrics configuration of the provided cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName} - /// - /// - /// Operation Id - /// MetricsConfigurations_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics.CreateScope("NetworkCloudClusterMetricsConfigurationResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics, Pipeline, _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete the metrics configuration of the provided cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName} - /// - /// - /// Operation Id - /// MetricsConfigurations_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics.CreateScope("NetworkCloudClusterMetricsConfigurationResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudClusterMetricsConfigurationMetricsConfigurationsClientDiagnostics, Pipeline, _networkCloudClusterMetricsConfigurationMetricsConfigurationsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. /// @@ -267,7 +183,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +229,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -359,7 +275,7 @@ public virtual ArmOperation Upd /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -421,7 +337,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -483,7 +399,7 @@ public virtual Response AddTag( /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -540,7 +456,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -597,7 +513,7 @@ public virtual Response SetTags /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -657,7 +573,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.cs index e8613fc83df9c..6d5fc4fb2ce2a 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.cs @@ -110,7 +110,7 @@ public virtual NetworkCloudBareMetalMachineKeySetCollection GetNetworkCloudBareM /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual NetworkCloudBmcKeySetCollection GetNetworkCloudBmcKeySets() /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetNetworkClo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -248,7 +248,7 @@ public virtual NetworkCloudClusterMetricsConfigurationCollection GetNetworkCloud /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Response GetNetw /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -378,7 +378,7 @@ public virtual Response Get(CancellationToken cance } /// - /// Delete the provided cluster. + /// Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. /// /// /// Request Path @@ -386,11 +386,11 @@ public virtual Response Get(CancellationToken cance /// /// /// Operation Id - /// Clusters_Delete + /// Clusters_Update /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -399,17 +399,21 @@ public virtual Response Get(CancellationToken cance /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The request body. /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudClusterPatch patch, CancellationToken cancellationToken = default) { - using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Delete"); + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Update"); scope.Start(); try { - var response = await _networkCloudClusterClustersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _networkCloudClusterClustersRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudClusterOperationSource(Client), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -420,7 +424,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete the provided cluster. + /// Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. /// /// /// Request Path @@ -428,11 +432,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// Clusters_Delete + /// Clusters_Update /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -441,17 +445,21 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The request body. /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudClusterPatch patch, CancellationToken cancellationToken = default) { - using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Delete"); + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Update"); scope.Start(); try { - var response = _networkCloudClusterClustersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _networkCloudClusterClustersRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudClusterOperationSource(Client), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -462,19 +470,19 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + /// Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/continueUpdateVersion /// /// /// Operation Id - /// Clusters_Update + /// Clusters_ContinueUpdateVersion /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -483,19 +491,19 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The request body. + /// The request body. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudClusterPatch patch, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> ContinueUpdateVersionAsync(WaitUntil waitUntil, ClusterContinueUpdateVersionContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Update"); + using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.ContinueUpdateVersion"); scope.Start(); try { - var response = await _networkCloudClusterClustersRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new NetworkCloudClusterOperationSource(Client), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _networkCloudClusterClustersRestClient.ContinueUpdateVersionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateContinueUpdateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -508,19 +516,19 @@ public virtual async Task> UpdateAsync } /// - /// Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + /// Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/continueUpdateVersion /// /// /// Operation Id - /// Clusters_Update + /// Clusters_ContinueUpdateVersion /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -529,19 +537,19 @@ public virtual async Task> UpdateAsync /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The request body. + /// The request body. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudClusterPatch patch, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation ContinueUpdateVersion(WaitUntil waitUntil, ClusterContinueUpdateVersionContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Update"); + using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.ContinueUpdateVersion"); scope.Start(); try { - var response = _networkCloudClusterClustersRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new NetworkCloudArmOperation(new NetworkCloudClusterOperationSource(Client), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _networkCloudClusterClustersRestClient.ContinueUpdateVersion(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateContinueUpdateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -554,7 +562,7 @@ public virtual ArmOperation Update(WaitUntil waitUn } /// - /// Deploy the cluster to the provided rack. + /// Deploy the cluster using the rack configuration provided during creation. /// /// /// Request Path @@ -566,7 +574,7 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -597,7 +605,7 @@ public virtual async Task> Deplo } /// - /// Deploy the cluster to the provided rack. + /// Deploy the cluster using the rack configuration provided during creation. /// /// /// Request Path @@ -609,7 +617,7 @@ public virtual async Task> Deplo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -639,6 +647,92 @@ public virtual ArmOperation Deploy(WaitUntil } } + /// + /// Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/scanRuntime + /// + /// + /// Operation Id + /// Clusters_ScanRuntime + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The request body. + /// The cancellation token to use. + public virtual async Task> ScanRuntimeAsync(WaitUntil waitUntil, ClusterScanRuntimeContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.ScanRuntime"); + scope.Start(); + try + { + var response = await _networkCloudClusterClustersRestClient.ScanRuntimeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateScanRuntimeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/scanRuntime + /// + /// + /// Operation Id + /// Clusters_ScanRuntime + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The request body. + /// The cancellation token to use. + public virtual ArmOperation ScanRuntime(WaitUntil waitUntil, ClusterScanRuntimeContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.ScanRuntime"); + scope.Start(); + try + { + var response = _networkCloudClusterClustersRestClient.ScanRuntime(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateScanRuntimeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Update the version of the provided cluster to one of the available supported versions. /// @@ -652,7 +746,7 @@ public virtual ArmOperation Deploy(WaitUntil /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -698,7 +792,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -744,7 +838,7 @@ public virtual ArmOperation UpdateVersion(Wai /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -806,7 +900,7 @@ public virtual async Task> AddTagAsync(str /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -868,7 +962,7 @@ public virtual Response AddTag(string key, string v /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -925,7 +1019,7 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -982,7 +1076,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1042,7 +1136,7 @@ public virtual async Task> RemoveTagAsync( /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterCollection.cs index 393bbe787b540..92b9b3bf0aa06 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string kubern /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string kubernetesClusterNa /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string kubernetesClusterName, CancellationT /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterData.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterData.cs index 27955d6bd8c96..c01fb965f374a 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterData.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterData.cs @@ -57,7 +57,7 @@ public partial class NetworkCloudKubernetesClusterData : TrackedResourceData /// The extended location of the cluster associated with the resource. /// The defining characteristics of the control plane for this Kubernetes Cluster. /// The agent pools that are created with this Kubernetes cluster for running critical system services and workloads. This data in this field is only used during creation, and the field will be empty following the creation of the Kubernetes Cluster. After creation, the management of agent pools is done using the agentPools sub-resource. - /// The Kubernetes version for this cluster. Accepts n.n, n.n.n, and n.n.n-n format. The interpreted version used will be resolved into this field after creation or update. + /// The Kubernetes version for this cluster. /// The configuration of the Kubernetes cluster networking, including the attachment of networks that span the cluster. /// , , , or is null. public NetworkCloudKubernetesClusterData(AzureLocation location, ExtendedLocation extendedLocation, ControlPlaneNodeConfiguration controlPlaneNodeConfiguration, IEnumerable initialAgentPoolConfigurations, string kubernetesVersion, KubernetesClusterNetworkConfiguration networkConfiguration) : base(location) @@ -99,7 +99,7 @@ public NetworkCloudKubernetesClusterData(AzureLocation location, ExtendedLocatio /// The descriptive message about the current detailed status. /// The current feature settings. /// The agent pools that are created with this Kubernetes cluster for running critical system services and workloads. This data in this field is only used during creation, and the field will be empty following the creation of the Kubernetes Cluster. After creation, the management of agent pools is done using the agentPools sub-resource. - /// The Kubernetes version for this cluster. Accepts n.n, n.n.n, and n.n.n-n format. The interpreted version used will be resolved into this field after creation or update. + /// The Kubernetes version for this cluster. /// The configuration of the managed resource group associated with the resource. /// The configuration of the Kubernetes cluster networking, including the attachment of networks that span the cluster. /// The details of the nodes in this cluster. @@ -166,7 +166,7 @@ public IList AadAdminGroupObjectIds public IReadOnlyList FeatureStatuses { get; } /// The agent pools that are created with this Kubernetes cluster for running critical system services and workloads. This data in this field is only used during creation, and the field will be empty following the creation of the Kubernetes Cluster. After creation, the management of agent pools is done using the agentPools sub-resource. public IList InitialAgentPoolConfigurations { get; } - /// The Kubernetes version for this cluster. Accepts n.n, n.n.n, and n.n.n-n format. The interpreted version used will be resolved into this field after creation or update. + /// The Kubernetes version for this cluster. public string KubernetesVersion { get; set; } /// The configuration of the managed resource group associated with the resource. public ManagedResourceGroupConfiguration ManagedResourceGroupConfiguration { get; set; } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureCollection.cs new file mode 100644 index 0000000000000..874dcbf1f887c --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NetworkCloud +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetNetworkCloudKubernetesClusterFeatures method from an instance of . + /// + public partial class NetworkCloudKubernetesClusterFeatureCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics; + private readonly KubernetesClusterFeaturesRestOperations _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient; + + /// Initializes a new instance of the class for mocking. + protected NetworkCloudKubernetesClusterFeatureCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal NetworkCloudKubernetesClusterFeatureCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetworkCloud", NetworkCloudKubernetesClusterFeatureResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkCloudKubernetesClusterFeatureResource.ResourceType, out string networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesApiVersion); + _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient = new KubernetesClusterFeaturesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != NetworkCloudKubernetesClusterResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, NetworkCloudKubernetesClusterResource.ResourceType), nameof(id)); + } + + /// + /// Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the feature. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string featureName, NetworkCloudKubernetesClusterFeatureData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, featureName, data, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudKubernetesClusterFeatureOperationSource(Client), _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics, Pipeline, _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, featureName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the feature. + /// The request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string featureName, NetworkCloudKubernetesClusterFeatureData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, featureName, data, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudKubernetesClusterFeatureOperationSource(Client), _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics, Pipeline, _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, featureName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get properties of the provided the Kubernetes cluster feature. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Get + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the feature. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureCollection.Get"); + scope.Start(); + try + { + var response = await _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, featureName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkCloudKubernetesClusterFeatureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get properties of the provided the Kubernetes cluster feature. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Get + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the feature. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureCollection.Get"); + scope.Start(); + try + { + var response = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, featureName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkCloudKubernetesClusterFeatureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a list of features for the provided Kubernetes cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_ListByKubernetesCluster + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.CreateListByKubernetesClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.CreateListByKubernetesClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkCloudKubernetesClusterFeatureResource(Client, NetworkCloudKubernetesClusterFeatureData.DeserializeNetworkCloudKubernetesClusterFeatureData(e)), _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics, Pipeline, "NetworkCloudKubernetesClusterFeatureCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Get a list of features for the provided Kubernetes cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_ListByKubernetesCluster + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.CreateListByKubernetesClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.CreateListByKubernetesClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkCloudKubernetesClusterFeatureResource(Client, NetworkCloudKubernetesClusterFeatureData.DeserializeNetworkCloudKubernetesClusterFeatureData(e)), _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics, Pipeline, "NetworkCloudKubernetesClusterFeatureCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Get + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the feature. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureCollection.Exists"); + scope.Start(); + try + { + var response = await _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, featureName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Get + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the feature. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureCollection.Exists"); + scope.Start(); + try + { + var response = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, featureName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Get + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the feature. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, featureName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NetworkCloudKubernetesClusterFeatureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Get + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the feature. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureCollection.GetIfExists"); + scope.Start(); + try + { + var response = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, featureName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NetworkCloudKubernetesClusterFeatureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureData.Serialization.cs new file mode 100644 index 0000000000000..66a4af5e771f1 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureData.Serialization.cs @@ -0,0 +1,291 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudKubernetesClusterFeatureData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkCloudKubernetesClusterFeatureData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(AvailabilityLifecycle)) + { + writer.WritePropertyName("availabilityLifecycle"u8); + writer.WriteStringValue(AvailabilityLifecycle.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(DetailedStatus)) + { + writer.WritePropertyName("detailedStatus"u8); + writer.WriteStringValue(DetailedStatus.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(DetailedStatusMessage)) + { + writer.WritePropertyName("detailedStatusMessage"u8); + writer.WriteStringValue(DetailedStatusMessage); + } + if (Optional.IsCollectionDefined(Options)) + { + writer.WritePropertyName("options"u8); + writer.WriteStartArray(); + foreach (var item in Options) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Required)) + { + writer.WritePropertyName("required"u8); + writer.WriteStringValue(Required.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + } + + NetworkCloudKubernetesClusterFeatureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkCloudKubernetesClusterFeatureData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkCloudKubernetesClusterFeatureData(document.RootElement, options); + } + + internal static NetworkCloudKubernetesClusterFeatureData DeserializeNetworkCloudKubernetesClusterFeatureData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + KubernetesClusterFeatureAvailabilityLifecycle? availabilityLifecycle = default; + KubernetesClusterFeatureDetailedStatus? detailedStatus = default; + string detailedStatusMessage = default; + IList options0 = default; + KubernetesClusterFeatureProvisioningState? provisioningState = default; + KubernetesClusterFeatureRequired? required = default; + string version = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("availabilityLifecycle"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availabilityLifecycle = new KubernetesClusterFeatureAvailabilityLifecycle(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("detailedStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + detailedStatus = new KubernetesClusterFeatureDetailedStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("detailedStatusMessage"u8)) + { + detailedStatusMessage = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("options"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StringKeyValuePair.DeserializeStringKeyValuePair(item, options)); + } + options0 = array; + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new KubernetesClusterFeatureProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("required"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + required = new KubernetesClusterFeatureRequired(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("version"u8)) + { + version = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkCloudKubernetesClusterFeatureData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + availabilityLifecycle, + detailedStatus, + detailedStatusMessage, + options0 ?? new ChangeTrackingList(), + provisioningState, + required, + version, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkCloudKubernetesClusterFeatureData)} does not support writing '{options.Format}' format."); + } + } + + NetworkCloudKubernetesClusterFeatureData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNetworkCloudKubernetesClusterFeatureData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkCloudKubernetesClusterFeatureData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureData.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureData.cs new file mode 100644 index 0000000000000..6105459992224 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureData.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + /// + /// A class representing the NetworkCloudKubernetesClusterFeature data model. + /// KubernetesClusterFeature represents the feature of a Kubernetes cluster. + /// + public partial class NetworkCloudKubernetesClusterFeatureData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public NetworkCloudKubernetesClusterFeatureData(AzureLocation location) : base(location) + { + Options = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The lifecycle indicator of the feature. + /// The detailed status of the feature. + /// The descriptive message for the detailed status of the feature. + /// The configured options for the feature. + /// The provisioning state of the Kubernetes cluster feature. + /// The indicator of if the feature is required or optional. Optional features may be deleted by the user, while required features are managed with the kubernetes cluster lifecycle. + /// The version of the feature. + /// Keeps track of any properties unknown to the library. + internal NetworkCloudKubernetesClusterFeatureData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, KubernetesClusterFeatureAvailabilityLifecycle? availabilityLifecycle, KubernetesClusterFeatureDetailedStatus? detailedStatus, string detailedStatusMessage, IList options, KubernetesClusterFeatureProvisioningState? provisioningState, KubernetesClusterFeatureRequired? required, string version, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + AvailabilityLifecycle = availabilityLifecycle; + DetailedStatus = detailedStatus; + DetailedStatusMessage = detailedStatusMessage; + Options = options; + ProvisioningState = provisioningState; + Required = required; + Version = version; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NetworkCloudKubernetesClusterFeatureData() + { + } + + /// The lifecycle indicator of the feature. + public KubernetesClusterFeatureAvailabilityLifecycle? AvailabilityLifecycle { get; } + /// The detailed status of the feature. + public KubernetesClusterFeatureDetailedStatus? DetailedStatus { get; } + /// The descriptive message for the detailed status of the feature. + public string DetailedStatusMessage { get; } + /// The configured options for the feature. + public IList Options { get; } + /// The provisioning state of the Kubernetes cluster feature. + public KubernetesClusterFeatureProvisioningState? ProvisioningState { get; } + /// The indicator of if the feature is required or optional. Optional features may be deleted by the user, while required features are managed with the kubernetes cluster lifecycle. + public KubernetesClusterFeatureRequired? Required { get; } + /// The version of the feature. + public string Version { get; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureResource.Serialization.cs new file mode 100644 index 0000000000000..f66d3df9254ae --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NetworkCloud +{ + public partial class NetworkCloudKubernetesClusterFeatureResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + NetworkCloudKubernetesClusterFeatureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + NetworkCloudKubernetesClusterFeatureData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureResource.cs new file mode 100644 index 0000000000000..e47a40e253739 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureResource.cs @@ -0,0 +1,707 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + /// + /// A Class representing a NetworkCloudKubernetesClusterFeature along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetNetworkCloudKubernetesClusterFeatureResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkCloudKubernetesClusterFeature method. + /// + public partial class NetworkCloudKubernetesClusterFeatureResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The kubernetesClusterName. + /// The featureName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics; + private readonly KubernetesClusterFeaturesRestOperations _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient; + private readonly NetworkCloudKubernetesClusterFeatureData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.NetworkCloud/kubernetesClusters/features"; + + /// Initializes a new instance of the class for mocking. + protected NetworkCloudKubernetesClusterFeatureResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NetworkCloudKubernetesClusterFeatureResource(ArmClient client, NetworkCloudKubernetesClusterFeatureData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal NetworkCloudKubernetesClusterFeatureResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetworkCloud", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesApiVersion); + _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient = new KubernetesClusterFeaturesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NetworkCloudKubernetesClusterFeatureData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get properties of the provided the Kubernetes cluster feature. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Get + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureResource.Get"); + scope.Start(); + try + { + var response = await _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkCloudKubernetesClusterFeatureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get properties of the provided the Kubernetes cluster feature. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Get + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureResource.Get"); + scope.Start(); + try + { + var response = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkCloudKubernetesClusterFeatureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided Kubernetes cluster feature. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureResource.Delete"); + scope.Start(); + try + { + var response = await _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics, Pipeline, _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the provided Kubernetes cluster feature. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Delete + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureResource.Delete"); + scope.Start(); + try + { + var response = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics, Pipeline, _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch properties of the provided Kubernetes cluster feature. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Update + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkCloudKubernetesClusterFeaturePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureResource.Update"); + scope.Start(); + try + { + var response = await _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new NetworkCloudArmOperation(new NetworkCloudKubernetesClusterFeatureOperationSource(Client), _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics, Pipeline, _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch properties of the provided Kubernetes cluster feature. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Update + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkCloudKubernetesClusterFeaturePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureResource.Update"); + scope.Start(); + try + { + var response = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new NetworkCloudArmOperation(new NetworkCloudKubernetesClusterFeatureOperationSource(Client), _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics, Pipeline, _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Get + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkCloudKubernetesClusterFeatureResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkCloudKubernetesClusterFeaturePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Get + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new NetworkCloudKubernetesClusterFeatureResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkCloudKubernetesClusterFeaturePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Get + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkCloudKubernetesClusterFeatureResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkCloudKubernetesClusterFeaturePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Get + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new NetworkCloudKubernetesClusterFeatureResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkCloudKubernetesClusterFeaturePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Get + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkCloudKubernetesClusterFeatureResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkCloudKubernetesClusterFeaturePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} + /// + /// + /// Operation Id + /// KubernetesClusterFeatures_Get + /// + /// + /// Default Api Version + /// 2024-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterFeatureResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _networkCloudKubernetesClusterFeatureKubernetesClusterFeaturesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new NetworkCloudKubernetesClusterFeatureResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkCloudKubernetesClusterFeaturePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.cs index 3ca0a140d62ba..301faa7f035a2 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.cs @@ -110,7 +110,7 @@ public virtual NetworkCloudAgentPoolCollection GetNetworkCloudAgentPools() /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetNetworkClo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -159,88 +159,77 @@ public virtual Response GetNetworkCloudAgentPool( return GetNetworkCloudAgentPools().Get(agentPoolName, cancellationToken); } + /// Gets a collection of NetworkCloudKubernetesClusterFeatureResources in the NetworkCloudKubernetesCluster. + /// An object representing collection of NetworkCloudKubernetesClusterFeatureResources and their operations over a NetworkCloudKubernetesClusterFeatureResource. + public virtual NetworkCloudKubernetesClusterFeatureCollection GetNetworkCloudKubernetesClusterFeatures() + { + return GetCachedClient(client => new NetworkCloudKubernetesClusterFeatureCollection(client, Id)); + } + /// - /// Get properties of the provided the Kubernetes cluster. + /// Get properties of the provided the Kubernetes cluster feature. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} /// /// /// Operation Id - /// KubernetesClusters_Get + /// KubernetesClusterFeatures_Get /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource - /// + /// /// /// /// + /// The name of the feature. /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetNetworkCloudKubernetesClusterFeatureAsync(string featureName, CancellationToken cancellationToken = default) { - using var scope = _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterResource.Get"); - scope.Start(); - try - { - var response = await _networkCloudKubernetesClusterKubernetesClustersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new NetworkCloudKubernetesClusterResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + return await GetNetworkCloudKubernetesClusterFeatures().GetAsync(featureName, cancellationToken).ConfigureAwait(false); } /// - /// Get properties of the provided the Kubernetes cluster. + /// Get properties of the provided the Kubernetes cluster feature. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName} /// /// /// Operation Id - /// KubernetesClusters_Get + /// KubernetesClusterFeatures_Get /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource - /// + /// /// /// /// + /// The name of the feature. /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetNetworkCloudKubernetesClusterFeature(string featureName, CancellationToken cancellationToken = default) { - using var scope = _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterResource.Get"); - scope.Start(); - try - { - var response = _networkCloudKubernetesClusterKubernetesClustersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new NetworkCloudKubernetesClusterResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + return GetNetworkCloudKubernetesClusterFeatures().Get(featureName, cancellationToken); } /// - /// Delete the provided Kubernetes cluster. + /// Get properties of the provided the Kubernetes cluster. /// /// /// Request Path @@ -248,11 +237,11 @@ public virtual Response Get(CancellationT /// /// /// Operation Id - /// KubernetesClusters_Delete + /// KubernetesClusters_Get /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -260,19 +249,17 @@ public virtual Response Get(CancellationT /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterResource.Delete"); + using var scope = _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterResource.Get"); scope.Start(); try { - var response = await _networkCloudKubernetesClusterKubernetesClustersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _networkCloudKubernetesClusterKubernetesClustersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkCloudKubernetesClusterResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -282,7 +269,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete the provided Kubernetes cluster. + /// Get properties of the provided the Kubernetes cluster. /// /// /// Request Path @@ -290,11 +277,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// KubernetesClusters_Delete + /// KubernetesClusters_Get /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -302,19 +289,17 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterResource.Delete"); + using var scope = _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics.CreateScope("NetworkCloudKubernetesClusterResource.Get"); scope.Start(); try { - var response = _networkCloudKubernetesClusterKubernetesClustersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; + var response = _networkCloudKubernetesClusterKubernetesClustersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkCloudKubernetesClusterResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -336,7 +321,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -382,7 +367,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -428,7 +413,7 @@ public virtual ArmOperation Update(WaitUn /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -474,7 +459,7 @@ public virtual async Task> Resta /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -520,7 +505,7 @@ public virtual ArmOperation RestartNode(WaitU /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -582,7 +567,7 @@ public virtual async Task> AddTa /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -644,7 +629,7 @@ public virtual Response AddTag(string key /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -701,7 +686,7 @@ public virtual async Task> SetTa /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -758,7 +743,7 @@ public virtual Response SetTags(IDictiona /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -818,7 +803,7 @@ public virtual async Task> Remov /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkCollection.cs index fb400fcde9336..0e269ff5ad512 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string l2NetworkName, /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string l2NetworkName, Canc /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string l2NetworkName, CancellationToken can /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkResource.cs index 35a67dfc83842..679c11c8b9d2d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -170,90 +170,6 @@ public virtual Response Get(CancellationToken can } } - /// - /// Delete the provided layer 2 (L2) network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName} - /// - /// - /// Operation Id - /// L2Networks_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudL2NetworkL2NetworksClientDiagnostics.CreateScope("NetworkCloudL2NetworkResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudL2NetworkL2NetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudL2NetworkL2NetworksClientDiagnostics, Pipeline, _networkCloudL2NetworkL2NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete the provided layer 2 (L2) network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName} - /// - /// - /// Operation Id - /// L2Networks_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudL2NetworkL2NetworksClientDiagnostics.CreateScope("NetworkCloudL2NetworkResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudL2NetworkL2NetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudL2NetworkL2NetworksClientDiagnostics, Pipeline, _networkCloudL2NetworkL2NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Update tags associated with the provided layer 2 (L2) network. /// @@ -267,7 +183,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -309,7 +225,7 @@ public virtual async Task> UpdateAsync(N /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -351,7 +267,7 @@ public virtual Response Update(NetworkCloudL2Netw /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -413,7 +329,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -475,7 +391,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -532,7 +448,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -589,7 +505,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -649,7 +565,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkCollection.cs index d593ac476da19..e57677d0e8768 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string l3NetworkName, /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string l3NetworkName, Canc /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string l3NetworkName, CancellationToken can /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkResource.cs index fdfe2a4ebc60e..b37d047590971 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -170,90 +170,6 @@ public virtual Response Get(CancellationToken can } } - /// - /// Delete the provided layer 3 (L3) network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName} - /// - /// - /// Operation Id - /// L3Networks_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudL3NetworkL3NetworksClientDiagnostics.CreateScope("NetworkCloudL3NetworkResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudL3NetworkL3NetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudL3NetworkL3NetworksClientDiagnostics, Pipeline, _networkCloudL3NetworkL3NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete the provided layer 3 (L3) network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName} - /// - /// - /// Operation Id - /// L3Networks_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudL3NetworkL3NetworksClientDiagnostics.CreateScope("NetworkCloudL3NetworkResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudL3NetworkL3NetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudL3NetworkL3NetworksClientDiagnostics, Pipeline, _networkCloudL3NetworkL3NetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Update tags associated with the provided layer 3 (L3) network. /// @@ -267,7 +183,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -309,7 +225,7 @@ public virtual async Task> UpdateAsync(N /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -351,7 +267,7 @@ public virtual Response Update(NetworkCloudL3Netw /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -413,7 +329,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -475,7 +391,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -532,7 +448,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -589,7 +505,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -649,7 +565,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackCollection.cs index 88d0860c36583..464bbac4d4d54 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync(string ra /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string rackName, Cancellat /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string rackName, Cancellat /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string rackName, CancellationToken cancella /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackResource.cs index b9ba7f82dd1aa..4a943beabf910 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -337,7 +337,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response AddTag(string key, string valu /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> SetTagsAsync(IDict /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -513,7 +513,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -573,7 +573,7 @@ public virtual async Task> RemoveTagAsync(str /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuCollection.cs index 8910ab69cf514..4fae937afc964 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string rackSkuName, Can /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string rackSkuName, Cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string rackSkuName, CancellationToken cance /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuResource.cs index 82e20c513396f..0ae7dbc93509d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceCollection.cs index 47db252807070..c3b2e31f88694 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string storage /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string storageApplianceNam /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string storageApplianceName, CancellationTo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceData.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceData.Serialization.cs index 4c1445010b8b3..3d6408363dfcd 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceData.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceData.Serialization.cs @@ -74,6 +74,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("managementIpv4Address"u8); writer.WriteStringValue(ManagementIPv4Address.ToString()); } + if (options.Format != "W" && Optional.IsDefined(Manufacturer)) + { + writer.WritePropertyName("manufacturer"u8); + writer.WriteStringValue(Manufacturer); + } + if (options.Format != "W" && Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -93,10 +103,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("remoteVendorManagementStatus"u8); writer.WriteStringValue(RemoteVendorManagementStatus.Value.ToString()); } + if (options.Format != "W" && Optional.IsCollectionDefined(SecretRotationStatus)) + { + writer.WritePropertyName("secretRotationStatus"u8); + writer.WriteStartArray(); + foreach (var item in SecretRotationStatus) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } writer.WritePropertyName("serialNumber"u8); writer.WriteStringValue(SerialNumber); writer.WritePropertyName("storageApplianceSkuId"u8); writer.WriteStringValue(StorageApplianceSkuId); + if (options.Format != "W" && Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } writer.WriteEndObject(); } @@ -134,13 +159,17 @@ internal static NetworkCloudStorageApplianceData DeserializeNetworkCloudStorageA StorageApplianceDetailedStatus? detailedStatus = default; string detailedStatusMessage = default; IPAddress managementIPv4Address = default; + string manufacturer = default; + string model = default; StorageApplianceProvisioningState? provisioningState = default; ResourceIdentifier rackId = default; long rackSlot = default; RemoteVendorManagementFeature? remoteVendorManagementFeature = default; RemoteVendorManagementStatus? remoteVendorManagementStatus = default; + IReadOnlyList secretRotationStatus = default; string serialNumber = default; string storageApplianceSkuId = default; + string version = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -257,6 +286,16 @@ internal static NetworkCloudStorageApplianceData DeserializeNetworkCloudStorageA managementIPv4Address = IPAddress.Parse(property0.Value.GetString()); continue; } + if (property0.NameEquals("manufacturer"u8)) + { + manufacturer = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("model"u8)) + { + model = property0.Value.GetString(); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -294,6 +333,20 @@ internal static NetworkCloudStorageApplianceData DeserializeNetworkCloudStorageA remoteVendorManagementStatus = new RemoteVendorManagementStatus(property0.Value.GetString()); continue; } + if (property0.NameEquals("secretRotationStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(Models.SecretRotationStatus.DeserializeSecretRotationStatus(item, options)); + } + secretRotationStatus = array; + continue; + } if (property0.NameEquals("serialNumber"u8)) { serialNumber = property0.Value.GetString(); @@ -304,6 +357,11 @@ internal static NetworkCloudStorageApplianceData DeserializeNetworkCloudStorageA storageApplianceSkuId = property0.Value.GetString(); continue; } + if (property0.NameEquals("version"u8)) + { + version = property0.Value.GetString(); + continue; + } } continue; } @@ -328,13 +386,17 @@ internal static NetworkCloudStorageApplianceData DeserializeNetworkCloudStorageA detailedStatus, detailedStatusMessage, managementIPv4Address, + manufacturer, + model, provisioningState, rackId, rackSlot, remoteVendorManagementFeature, remoteVendorManagementStatus, + secretRotationStatus ?? new ChangeTrackingList(), serialNumber, storageApplianceSkuId, + version, serializedAdditionalRawData); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceData.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceData.cs index daf28ca6b6710..97c5fa6eb2640 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceData.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceData.cs @@ -73,6 +73,7 @@ public NetworkCloudStorageApplianceData(AzureLocation location, ExtendedLocation AdministratorCredentials = administratorCredentials; RackId = rackId; RackSlot = rackSlot; + SecretRotationStatus = new ChangeTrackingList(); SerialNumber = serialNumber; StorageApplianceSkuId = storageApplianceSkuId; } @@ -92,15 +93,19 @@ public NetworkCloudStorageApplianceData(AzureLocation location, ExtendedLocation /// The detailed status of the storage appliance. /// The descriptive message about the current detailed status. /// The endpoint for the management interface of the storage appliance. + /// The manufacturer of the storage appliance. + /// The model of the storage appliance. /// The provisioning state of the storage appliance. /// The resource ID of the rack where this storage appliance resides. /// The slot the storage appliance is in the rack based on the BOM configuration. /// The indicator of whether the storage appliance supports remote vendor management. /// The indicator of whether the remote vendor management feature is enabled or disabled, or unsupported if it is an unsupported feature. + /// The list of statuses that represent secret rotation activity. /// The serial number for the storage appliance. /// The SKU for the storage appliance. + /// The version of the storage appliance. /// Keeps track of any properties unknown to the library. - internal NetworkCloudStorageApplianceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedLocation extendedLocation, AdministrativeCredentials administratorCredentials, long? capacity, long? capacityUsed, ResourceIdentifier clusterId, StorageApplianceDetailedStatus? detailedStatus, string detailedStatusMessage, IPAddress managementIPv4Address, StorageApplianceProvisioningState? provisioningState, ResourceIdentifier rackId, long rackSlot, RemoteVendorManagementFeature? remoteVendorManagementFeature, RemoteVendorManagementStatus? remoteVendorManagementStatus, string serialNumber, string storageApplianceSkuId, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal NetworkCloudStorageApplianceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExtendedLocation extendedLocation, AdministrativeCredentials administratorCredentials, long? capacity, long? capacityUsed, ResourceIdentifier clusterId, StorageApplianceDetailedStatus? detailedStatus, string detailedStatusMessage, IPAddress managementIPv4Address, string manufacturer, string model, StorageApplianceProvisioningState? provisioningState, ResourceIdentifier rackId, long rackSlot, RemoteVendorManagementFeature? remoteVendorManagementFeature, RemoteVendorManagementStatus? remoteVendorManagementStatus, IReadOnlyList secretRotationStatus, string serialNumber, string storageApplianceSkuId, string version, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ExtendedLocation = extendedLocation; AdministratorCredentials = administratorCredentials; @@ -110,13 +115,17 @@ internal NetworkCloudStorageApplianceData(ResourceIdentifier id, string name, Re DetailedStatus = detailedStatus; DetailedStatusMessage = detailedStatusMessage; ManagementIPv4Address = managementIPv4Address; + Manufacturer = manufacturer; + Model = model; ProvisioningState = provisioningState; RackId = rackId; RackSlot = rackSlot; RemoteVendorManagementFeature = remoteVendorManagementFeature; RemoteVendorManagementStatus = remoteVendorManagementStatus; + SecretRotationStatus = secretRotationStatus; SerialNumber = serialNumber; StorageApplianceSkuId = storageApplianceSkuId; + Version = version; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -141,6 +150,10 @@ internal NetworkCloudStorageApplianceData() public string DetailedStatusMessage { get; } /// The endpoint for the management interface of the storage appliance. public IPAddress ManagementIPv4Address { get; } + /// The manufacturer of the storage appliance. + public string Manufacturer { get; } + /// The model of the storage appliance. + public string Model { get; } /// The provisioning state of the storage appliance. public StorageApplianceProvisioningState? ProvisioningState { get; } /// The resource ID of the rack where this storage appliance resides. @@ -151,9 +164,13 @@ internal NetworkCloudStorageApplianceData() public RemoteVendorManagementFeature? RemoteVendorManagementFeature { get; } /// The indicator of whether the remote vendor management feature is enabled or disabled, or unsupported if it is an unsupported feature. public RemoteVendorManagementStatus? RemoteVendorManagementStatus { get; } + /// The list of statuses that represent secret rotation activity. + public IReadOnlyList SecretRotationStatus { get; } /// The serial number for the storage appliance. public string SerialNumber { get; set; } /// The SKU for the storage appliance. public string StorageApplianceSkuId { get; set; } + /// The version of the storage appliance. + public string Version { get; } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.cs index 1d940b96bde99..dbaf5b79c7d3e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Update(WaitUnt /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> Disab /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation DisableRemoteVend /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task> Enabl /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual ArmOperation EnableRemoteVendo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -507,7 +507,7 @@ public virtual async Task> AddTag /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -569,7 +569,7 @@ public virtual Response AddTag(string key, /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -626,7 +626,7 @@ public virtual async Task> SetTag /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -683,7 +683,7 @@ public virtual Response SetTags(IDictionar /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -743,7 +743,7 @@ public virtual async Task> Remove /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkCollection.cs index 9d7288184ee23..31a9e244301f3 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string trunkedNe /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string trunkedNetworkName, /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string trunkedNetworkName, CancellationToke /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkResource.cs index 7f79cbd3dd3f7..f0d21fb161a24 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -170,90 +170,6 @@ public virtual Response Get(CancellationToke } } - /// - /// Delete the provided trunked network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName} - /// - /// - /// Operation Id - /// TrunkedNetworks_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics.CreateScope("NetworkCloudTrunkedNetworkResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudTrunkedNetworkTrunkedNetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics, Pipeline, _networkCloudTrunkedNetworkTrunkedNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete the provided trunked network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName} - /// - /// - /// Operation Id - /// TrunkedNetworks_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics.CreateScope("NetworkCloudTrunkedNetworkResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudTrunkedNetworkTrunkedNetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudTrunkedNetworkTrunkedNetworksClientDiagnostics, Pipeline, _networkCloudTrunkedNetworkTrunkedNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Update tags associated with the provided trunked network. /// @@ -267,7 +183,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -309,7 +225,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -351,7 +267,7 @@ public virtual Response Update(NetworkCloudT /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -413,7 +329,7 @@ public virtual async Task> AddTagAs /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -475,7 +391,7 @@ public virtual Response AddTag(string key, s /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -532,7 +448,7 @@ public virtual async Task> SetTagsA /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -589,7 +505,7 @@ public virtual Response SetTags(IDictionary< /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -649,7 +565,7 @@ public virtual async Task> RemoveTa /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineCollection.cs index 3901467dcc182..84af2f67c7083 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string virtualMa /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string virtualMachineName, /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string virtualMachineName, CancellationToke /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleCollection.cs index 692db758bc9f3..60c03bf8d0943 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string co /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string consoleName, Cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string consoleName, CancellationToken cance /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleResource.cs index db26394393254..aa9cf0b5abd26 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -170,90 +170,6 @@ public virtual Response Get(Cancellat } } - /// - /// Delete the provided virtual machine console. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName} - /// - /// - /// Operation Id - /// Consoles_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudVirtualMachineConsoleConsolesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineConsoleResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudVirtualMachineConsoleConsolesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudVirtualMachineConsoleConsolesClientDiagnostics, Pipeline, _networkCloudVirtualMachineConsoleConsolesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete the provided virtual machine console. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName} - /// - /// - /// Operation Id - /// Consoles_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudVirtualMachineConsoleConsolesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineConsoleResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudVirtualMachineConsoleConsolesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudVirtualMachineConsoleConsolesClientDiagnostics, Pipeline, _networkCloudVirtualMachineConsoleConsolesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Patch the properties of the provided virtual machine console, or update the tags associated with the virtual machine console. Properties and tag updates can be done independently. /// @@ -267,7 +183,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +229,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -359,7 +275,7 @@ public virtual ArmOperation Update(Wa /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -421,7 +337,7 @@ public virtual async Task> A /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -483,7 +399,7 @@ public virtual Response AddTag(string /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -540,7 +456,7 @@ public virtual async Task> S /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -597,7 +513,7 @@ public virtual Response SetTags(IDict /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -657,7 +573,7 @@ public virtual async Task> R /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineData.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineData.cs index 1b3f61f302eb4..e1f2b65287a66 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineData.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineData.cs @@ -57,7 +57,7 @@ public partial class NetworkCloudVirtualMachineData : TrackedResourceData /// The name of the administrator to which the ssh public keys will be added into the authorized keys. /// The cloud service network that provides platform-level services for the virtual machine. /// The number of CPU cores in the virtual machine. - /// The memory size of the virtual machine in GB. + /// The memory size of the virtual machine. Allocations are measured in gibibytes. /// The storage profile that specifies size and other parameters about the disks related to the virtual machine. /// The virtual machine image that is currently provisioned to the OS disk, using the full url and tag notation used to pull the image. /// , , , or is null. @@ -92,7 +92,7 @@ public NetworkCloudVirtualMachineData(AzureLocation location, ExtendedLocation e /// The extended location of the cluster associated with the resource. /// The name of the administrator to which the ssh public keys will be added into the authorized keys. /// The cluster availability zone containing this virtual machine. - /// The resource ID of the bare metal machine the virtual machine has landed to. + /// The resource ID of the bare metal machine that hosts the virtual machine. /// Selects the boot method for the virtual machine. /// The cloud service network that provides platform-level services for the virtual machine. /// The resource ID of the cluster the virtual machine is created for. @@ -100,7 +100,7 @@ public NetworkCloudVirtualMachineData(AzureLocation location, ExtendedLocation e /// The more detailed status of the virtual machine. /// The descriptive message about the current detailed status. /// Field Deprecated, the value will be ignored if provided. The indicator of whether one of the specified CPU cores is isolated to run the emulator thread for this virtual machine. - /// The memory size of the virtual machine in GB. + /// The memory size of the virtual machine. Allocations are measured in gibibytes. /// The list of network attachments to the virtual machine. /// The Base64 encoded cloud-init network data. /// The scheduling hints for the virtual machine. @@ -156,7 +156,7 @@ internal NetworkCloudVirtualMachineData() public string AdminUsername { get; set; } /// The cluster availability zone containing this virtual machine. public string AvailabilityZone { get; } - /// The resource ID of the bare metal machine the virtual machine has landed to. + /// The resource ID of the bare metal machine that hosts the virtual machine. public ResourceIdentifier BareMetalMachineId { get; } /// Selects the boot method for the virtual machine. public VirtualMachineBootMethod? BootMethod { get; set; } @@ -172,7 +172,7 @@ internal NetworkCloudVirtualMachineData() public string DetailedStatusMessage { get; } /// Field Deprecated, the value will be ignored if provided. The indicator of whether one of the specified CPU cores is isolated to run the emulator thread for this virtual machine. public VirtualMachineIsolateEmulatorThread? IsolateEmulatorThread { get; set; } - /// The memory size of the virtual machine in GB. + /// The memory size of the virtual machine. Allocations are measured in gibibytes. public long MemorySizeInGB { get; set; } /// The list of network attachments to the virtual machine. public IList NetworkAttachments { get; } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.cs index 51150d4c7a7ec..31e2cac3ff7ec 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.cs @@ -110,7 +110,7 @@ public virtual NetworkCloudVirtualMachineConsoleCollection GetNetworkCloudVirtua /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetNetworkClo /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -239,90 +239,6 @@ public virtual Response Get(CancellationToke } } - /// - /// Delete the provided virtual machine. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName} - /// - /// - /// Operation Id - /// VirtualMachines_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudVirtualMachineVirtualMachinesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete the provided virtual machine. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName} - /// - /// - /// Operation Id - /// VirtualMachines_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudVirtualMachineVirtualMachinesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. Properties and tag updates can be done independently. /// @@ -336,7 +252,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -382,7 +298,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -428,7 +344,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -471,7 +387,7 @@ public virtual async Task> Power /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -514,7 +430,7 @@ public virtual ArmOperation PowerOff(WaitUnti /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -556,7 +472,7 @@ public virtual async Task> Reima /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -598,7 +514,7 @@ public virtual ArmOperation Reimage(WaitUntil /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -640,7 +556,7 @@ public virtual async Task> Resta /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -682,7 +598,7 @@ public virtual ArmOperation Restart(WaitUntil /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -724,7 +640,7 @@ public virtual async Task> Start /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -766,7 +682,7 @@ public virtual ArmOperation Start(WaitUntil w /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -828,7 +744,7 @@ public virtual async Task> AddTagAs /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -890,7 +806,7 @@ public virtual Response AddTag(string key, s /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -947,7 +863,7 @@ public virtual async Task> SetTagsA /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1004,7 +920,7 @@ public virtual Response SetTags(IDictionary< /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -1064,7 +980,7 @@ public virtual async Task> RemoveTa /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeCollection.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeCollection.cs index 82a3af5becab1..ca5ce5574f7eb 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeCollection.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string volumeName, Cance /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string volumeName, Cancell /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string volumeName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeResource.cs index 8181a9a1c37e1..64a6151c9a778 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -170,90 +170,6 @@ public virtual Response Get(CancellationToken cancel } } - /// - /// Delete the provided volume. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName} - /// - /// - /// Operation Id - /// Volumes_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudVolumeVolumesClientDiagnostics.CreateScope("NetworkCloudVolumeResource.Delete"); - scope.Start(); - try - { - var response = await _networkCloudVolumeVolumesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudVolumeVolumesClientDiagnostics, Pipeline, _networkCloudVolumeVolumesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete the provided volume. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName} - /// - /// - /// Operation Id - /// Volumes_Delete - /// - /// - /// Default Api Version - /// 2023-07-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkCloudVolumeVolumesClientDiagnostics.CreateScope("NetworkCloudVolumeResource.Delete"); - scope.Start(); - try - { - var response = _networkCloudVolumeVolumesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudVolumeVolumesClientDiagnostics, Pipeline, _networkCloudVolumeVolumesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Update tags associated with the provided volume. /// @@ -267,7 +183,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -309,7 +225,7 @@ public virtual async Task> UpdateAsync(Netw /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -351,7 +267,7 @@ public virtual Response Update(NetworkCloudVolumePat /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -413,7 +329,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -475,7 +391,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -532,7 +448,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -589,7 +505,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource @@ -649,7 +565,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2023-07-01 + /// 2024-06-01-preview /// /// /// Resource diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/AgentPoolsRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/AgentPoolsRestOperations.cs index f1ff919b9c677..869be5f4b2dd9 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/AgentPoolsRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/AgentPoolsRestOperations.cs @@ -32,7 +32,7 @@ public AgentPoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BareMetalMachineKeySetsRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BareMetalMachineKeySetsRestOperations.cs index 72142a3b0b7d5..083f5eb198720 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BareMetalMachineKeySetsRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BareMetalMachineKeySetsRestOperations.cs @@ -32,7 +32,7 @@ public BareMetalMachineKeySetsRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BareMetalMachinesRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BareMetalMachinesRestOperations.cs index ee0c0d33879e2..dd83a19744053 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BareMetalMachinesRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BareMetalMachinesRestOperations.cs @@ -32,7 +32,7 @@ public BareMetalMachinesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -451,7 +451,6 @@ public async Task CordonAsync(string subscriptionId, string resourceGr { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -478,7 +477,6 @@ public Response Cordon(string subscriptionId, string resourceGroupName, string b { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -548,7 +546,6 @@ public async Task PowerOffAsync(string subscriptionId, string resource { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -575,7 +572,6 @@ public Response PowerOff(string subscriptionId, string resourceGroupName, string { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -637,7 +633,6 @@ public async Task ReimageAsync(string subscriptionId, string resourceG { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -663,7 +658,6 @@ public Response Reimage(string subscriptionId, string resourceGroupName, string { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -733,7 +727,6 @@ public async Task ReplaceAsync(string subscriptionId, string resourceG { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -760,7 +753,6 @@ public Response Replace(string subscriptionId, string resourceGroupName, string { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -822,7 +814,6 @@ public async Task RestartAsync(string subscriptionId, string resourceG { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -848,7 +839,6 @@ public Response Restart(string subscriptionId, string resourceGroupName, string { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -916,7 +906,6 @@ public async Task RunCommandAsync(string subscriptionId, string resour { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -944,7 +933,6 @@ public Response RunCommand(string subscriptionId, string resourceGroupName, stri { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -1012,7 +1000,6 @@ public async Task RunDataExtractsAsync(string subscriptionId, string r { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -1040,7 +1027,6 @@ public Response RunDataExtracts(string subscriptionId, string resourceGroupName, { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -1108,7 +1094,6 @@ public async Task RunReadCommandsAsync(string subscriptionId, string r { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -1136,7 +1121,6 @@ public Response RunReadCommands(string subscriptionId, string resourceGroupName, { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -1198,7 +1182,6 @@ public async Task StartAsync(string subscriptionId, string resourceGro { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -1224,7 +1207,6 @@ public Response Start(string subscriptionId, string resourceGroupName, string ba { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -1286,7 +1268,6 @@ public async Task UncordonAsync(string subscriptionId, string resource { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -1312,7 +1293,6 @@ public Response Uncordon(string subscriptionId, string resourceGroupName, string { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BmcKeySetsRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BmcKeySetsRestOperations.cs index a27e2e52d221b..457530ebba7de 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BmcKeySetsRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BmcKeySetsRestOperations.cs @@ -32,7 +32,7 @@ public BmcKeySetsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/CloudServicesNetworksRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/CloudServicesNetworksRestOperations.cs index a1cbdcea64a22..16f22def7d54c 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/CloudServicesNetworksRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/CloudServicesNetworksRestOperations.cs @@ -32,7 +32,7 @@ public CloudServicesNetworksRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ClusterManagersRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ClusterManagersRestOperations.cs index 8cdbf50a673d4..e5009dfb38cf0 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ClusterManagersRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ClusterManagersRestOperations.cs @@ -32,7 +32,7 @@ public ClusterManagersRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ClustersRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ClustersRestOperations.cs index fdd0604316def..51673154c57bf 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ClustersRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ClustersRestOperations.cs @@ -32,7 +32,7 @@ public ClustersRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -566,6 +566,100 @@ public Response Update(string subscriptionId, string resourceGroupName, string c } } + internal RequestUriBuilder CreateContinueUpdateVersionRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ClusterContinueUpdateVersionContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetworkCloud/clusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/continueUpdateVersion", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateContinueUpdateVersionRequest(string subscriptionId, string resourceGroupName, string clusterName, ClusterContinueUpdateVersionContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetworkCloud/clusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/continueUpdateVersion", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// The request body. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ContinueUpdateVersionAsync(string subscriptionId, string resourceGroupName, string clusterName, ClusterContinueUpdateVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateContinueUpdateVersionRequest(subscriptionId, resourceGroupName, clusterName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// The request body. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ContinueUpdateVersion(string subscriptionId, string resourceGroupName, string clusterName, ClusterContinueUpdateVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateContinueUpdateVersionRequest(subscriptionId, resourceGroupName, clusterName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateDeployRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ClusterDeployContent content) { var uri = new RawRequestUriBuilder(); @@ -609,7 +703,7 @@ internal HttpMessage CreateDeployRequest(string subscriptionId, string resourceG return message; } - /// Deploy the cluster to the provided rack. + /// Deploy the cluster using the rack configuration provided during creation. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the cluster. @@ -629,14 +723,13 @@ public async Task DeployAsync(string subscriptionId, string resourceGr { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deploy the cluster to the provided rack. + /// Deploy the cluster using the rack configuration provided during creation. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the cluster. @@ -656,7 +749,101 @@ public Response Deploy(string subscriptionId, string resourceGroupName, string c { case 200: case 202: - case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateScanRuntimeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ClusterScanRuntimeContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetworkCloud/clusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/scanRuntime", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateScanRuntimeRequest(string subscriptionId, string resourceGroupName, string clusterName, ClusterScanRuntimeContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetworkCloud/clusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/scanRuntime", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// The request body. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ScanRuntimeAsync(string subscriptionId, string resourceGroupName, string clusterName, ClusterScanRuntimeContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateScanRuntimeRequest(subscriptionId, resourceGroupName, clusterName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// The request body. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ScanRuntime(string subscriptionId, string resourceGroupName, string clusterName, ClusterScanRuntimeContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateScanRuntimeRequest(subscriptionId, resourceGroupName, clusterName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -724,7 +911,6 @@ public async Task UpdateVersionAsync(string subscriptionId, string res { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -752,7 +938,6 @@ public Response UpdateVersion(string subscriptionId, string resourceGroupName, s { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ConsolesRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ConsolesRestOperations.cs index 7f9f13399eacc..604564989c347 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ConsolesRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ConsolesRestOperations.cs @@ -32,7 +32,7 @@ public ConsolesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/KubernetesClusterFeaturesRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/KubernetesClusterFeaturesRestOperations.cs new file mode 100644 index 0000000000000..f98420196b6b7 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/KubernetesClusterFeaturesRestOperations.cs @@ -0,0 +1,615 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + internal partial class KubernetesClusterFeaturesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of KubernetesClusterFeaturesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public KubernetesClusterFeaturesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByKubernetesClusterRequestUri(string subscriptionId, string resourceGroupName, string kubernetesClusterName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetworkCloud/kubernetesClusters/", false); + uri.AppendPath(kubernetesClusterName, true); + uri.AppendPath("/features", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByKubernetesClusterRequest(string subscriptionId, string resourceGroupName, string kubernetesClusterName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetworkCloud/kubernetesClusters/", false); + uri.AppendPath(kubernetesClusterName, true); + uri.AppendPath("/features", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a list of features for the provided Kubernetes cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByKubernetesClusterAsync(string subscriptionId, string resourceGroupName, string kubernetesClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(kubernetesClusterName, nameof(kubernetesClusterName)); + + using var message = CreateListByKubernetesClusterRequest(subscriptionId, resourceGroupName, kubernetesClusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + KubernetesClusterFeatureList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = KubernetesClusterFeatureList.DeserializeKubernetesClusterFeatureList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a list of features for the provided Kubernetes cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByKubernetesCluster(string subscriptionId, string resourceGroupName, string kubernetesClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(kubernetesClusterName, nameof(kubernetesClusterName)); + + using var message = CreateListByKubernetesClusterRequest(subscriptionId, resourceGroupName, kubernetesClusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + KubernetesClusterFeatureList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = KubernetesClusterFeatureList.DeserializeKubernetesClusterFeatureList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetworkCloud/kubernetesClusters/", false); + uri.AppendPath(kubernetesClusterName, true); + uri.AppendPath("/features/", false); + uri.AppendPath(featureName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetworkCloud/kubernetesClusters/", false); + uri.AppendPath(kubernetesClusterName, true); + uri.AppendPath("/features/", false); + uri.AppendPath(featureName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get properties of the provided the Kubernetes cluster feature. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster. + /// The name of the feature. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(kubernetesClusterName, nameof(kubernetesClusterName)); + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, kubernetesClusterName, featureName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkCloudKubernetesClusterFeatureData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkCloudKubernetesClusterFeatureData.DeserializeNetworkCloudKubernetesClusterFeatureData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkCloudKubernetesClusterFeatureData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get properties of the provided the Kubernetes cluster feature. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster. + /// The name of the feature. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(kubernetesClusterName, nameof(kubernetesClusterName)); + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, kubernetesClusterName, featureName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkCloudKubernetesClusterFeatureData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkCloudKubernetesClusterFeatureData.DeserializeNetworkCloudKubernetesClusterFeatureData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkCloudKubernetesClusterFeatureData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName, NetworkCloudKubernetesClusterFeatureData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetworkCloud/kubernetesClusters/", false); + uri.AppendPath(kubernetesClusterName, true); + uri.AppendPath("/features/", false); + uri.AppendPath(featureName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName, NetworkCloudKubernetesClusterFeatureData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetworkCloud/kubernetesClusters/", false); + uri.AppendPath(kubernetesClusterName, true); + uri.AppendPath("/features/", false); + uri.AppendPath(featureName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster. + /// The name of the feature. + /// The request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName, NetworkCloudKubernetesClusterFeatureData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(kubernetesClusterName, nameof(kubernetesClusterName)); + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, kubernetesClusterName, featureName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster. + /// The name of the feature. + /// The request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName, NetworkCloudKubernetesClusterFeatureData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(kubernetesClusterName, nameof(kubernetesClusterName)); + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, kubernetesClusterName, featureName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetworkCloud/kubernetesClusters/", false); + uri.AppendPath(kubernetesClusterName, true); + uri.AppendPath("/features/", false); + uri.AppendPath(featureName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetworkCloud/kubernetesClusters/", false); + uri.AppendPath(kubernetesClusterName, true); + uri.AppendPath("/features/", false); + uri.AppendPath(featureName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the provided Kubernetes cluster feature. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster. + /// The name of the feature. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(kubernetesClusterName, nameof(kubernetesClusterName)); + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, kubernetesClusterName, featureName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the provided Kubernetes cluster feature. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster. + /// The name of the feature. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(kubernetesClusterName, nameof(kubernetesClusterName)); + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, kubernetesClusterName, featureName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName, NetworkCloudKubernetesClusterFeaturePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetworkCloud/kubernetesClusters/", false); + uri.AppendPath(kubernetesClusterName, true); + uri.AppendPath("/features/", false); + uri.AppendPath(featureName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName, NetworkCloudKubernetesClusterFeaturePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetworkCloud/kubernetesClusters/", false); + uri.AppendPath(kubernetesClusterName, true); + uri.AppendPath("/features/", false); + uri.AppendPath(featureName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Patch properties of the provided Kubernetes cluster feature. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster. + /// The name of the feature. + /// The request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName, NetworkCloudKubernetesClusterFeaturePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(kubernetesClusterName, nameof(kubernetesClusterName)); + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, kubernetesClusterName, featureName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Patch properties of the provided Kubernetes cluster feature. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster. + /// The name of the feature. + /// The request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string kubernetesClusterName, string featureName, NetworkCloudKubernetesClusterFeaturePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(kubernetesClusterName, nameof(kubernetesClusterName)); + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, kubernetesClusterName, featureName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByKubernetesClusterNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string kubernetesClusterName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByKubernetesClusterNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string kubernetesClusterName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a list of features for the provided Kubernetes cluster. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByKubernetesClusterNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string kubernetesClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(kubernetesClusterName, nameof(kubernetesClusterName)); + + using var message = CreateListByKubernetesClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, kubernetesClusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + KubernetesClusterFeatureList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = KubernetesClusterFeatureList.DeserializeKubernetesClusterFeatureList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a list of features for the provided Kubernetes cluster. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kubernetes cluster. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByKubernetesClusterNextPage(string nextLink, string subscriptionId, string resourceGroupName, string kubernetesClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(kubernetesClusterName, nameof(kubernetesClusterName)); + + using var message = CreateListByKubernetesClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, kubernetesClusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + KubernetesClusterFeatureList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = KubernetesClusterFeatureList.DeserializeKubernetesClusterFeatureList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/KubernetesClustersRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/KubernetesClustersRestOperations.cs index ef3073d434fbe..cd94eb6903759 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/KubernetesClustersRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/KubernetesClustersRestOperations.cs @@ -32,7 +32,7 @@ public KubernetesClustersRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -627,7 +627,6 @@ public async Task RestartNodeAsync(string subscriptionId, string resou { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -655,7 +654,6 @@ public Response RestartNode(string subscriptionId, string resourceGroupName, str { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/L2NetworksRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/L2NetworksRestOperations.cs index 23f7cad8b0a3c..41fe5a6a1448d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/L2NetworksRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/L2NetworksRestOperations.cs @@ -32,7 +32,7 @@ public L2NetworksRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/L3NetworksRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/L3NetworksRestOperations.cs index 1a614a9f0ec65..24907923170d3 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/L3NetworksRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/L3NetworksRestOperations.cs @@ -32,7 +32,7 @@ public L3NetworksRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/MetricsConfigurationsRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/MetricsConfigurationsRestOperations.cs index b3c32e86a5a93..b27d96ca87f15 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/MetricsConfigurationsRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/MetricsConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public MetricsConfigurationsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/RackSkusRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/RackSkusRestOperations.cs index b9a2e9ffbeac1..f098daceec785 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/RackSkusRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/RackSkusRestOperations.cs @@ -32,7 +32,7 @@ public RackSkusRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/RacksRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/RacksRestOperations.cs index ff4b979acfa5d..04ddf0114a418 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/RacksRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/RacksRestOperations.cs @@ -32,7 +32,7 @@ public RacksRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/StorageAppliancesRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/StorageAppliancesRestOperations.cs index c7f4b261f6acd..2a298ded67a61 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/StorageAppliancesRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/StorageAppliancesRestOperations.cs @@ -32,7 +32,7 @@ public StorageAppliancesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -443,7 +443,6 @@ public async Task DisableRemoteVendorManagementAsync(string subscripti { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -469,7 +468,6 @@ public Response DisableRemoteVendorManagement(string subscriptionId, string reso { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -539,7 +537,6 @@ public async Task EnableRemoteVendorManagementAsync(string subscriptio { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -566,7 +563,6 @@ public Response EnableRemoteVendorManagement(string subscriptionId, string resou { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/TrunkedNetworksRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/TrunkedNetworksRestOperations.cs index a5f6e4364cb38..d3c1ba641c69b 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/TrunkedNetworksRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/TrunkedNetworksRestOperations.cs @@ -32,7 +32,7 @@ public TrunkedNetworksRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/VirtualMachinesRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/VirtualMachinesRestOperations.cs index 204bdde2574d5..9a4628b07710f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/VirtualMachinesRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/VirtualMachinesRestOperations.cs @@ -32,7 +32,7 @@ public VirtualMachinesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -629,7 +629,6 @@ public async Task PowerOffAsync(string subscriptionId, string resource { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -656,7 +655,6 @@ public Response PowerOff(string subscriptionId, string resourceGroupName, string { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -718,7 +716,6 @@ public async Task ReimageAsync(string subscriptionId, string resourceG { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -744,7 +741,6 @@ public Response Reimage(string subscriptionId, string resourceGroupName, string { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -806,7 +802,6 @@ public async Task RestartAsync(string subscriptionId, string resourceG { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -832,7 +827,6 @@ public Response Restart(string subscriptionId, string resourceGroupName, string { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -894,7 +888,6 @@ public async Task StartAsync(string subscriptionId, string resourceGro { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -920,7 +913,6 @@ public Response Start(string subscriptionId, string resourceGroupName, string vi { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/VolumesRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/VolumesRestOperations.cs index 8b9be274c440f..b08f09845ac06 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/VolumesRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/VolumesRestOperations.cs @@ -32,7 +32,7 @@ public VolumesRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01"; + _apiVersion = apiVersion ?? "2024-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/autorest.md b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/autorest.md index 018973dbbb228..b6e77fab4a6d7 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/autorest.md +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/autorest.md @@ -7,13 +7,29 @@ azure-arm: true csharp: true library-name: NetworkCloud namespace: Azure.ResourceManager.NetworkCloud -require: https://github.com/Azure/azure-rest-api-specs/blob/ed9bde6a3db71b84fdba076ba0546213bcce56ee/specification/networkcloud/resource-manager/readme.md -#tag: package-2023-07-01 +require: https://github.com/Azure/azure-rest-api-specs/blob/d6be8f199982997f0a94e3e9bbbe8b2f7e304f7d/specification/networkcloud/resource-manager/readme.md +#tag: package-2024-06-01-preview output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: output-folder: $(this-folder)/../samples/Generated clear-output-folder: true + skipped-operations: + # Not support generate samples from customized operations + - AgentPools_Delete + - BareMetalMachineKeySets_Delete + - BmcKeySets_Delete + - CloudServicesNetworks_Delete + - ClusterManagers_Delete + - MetricsConfigurations_Delete + - Clusters_Delete + - KubernetesClusters_Delete + - L2Networks_Delete + - L3Networks_Delete + - TrunkedNetworks_Delete + - Consoles_Delete + - VirtualMachines_Delete + - Volumes_Delete skip-csproj: true modelerfour: flatten-payloads: false @@ -67,6 +83,8 @@ rename-mapping: KubernetesCluster.properties.attachedNetworkIds: -|arm-id KubernetesCluster.properties.clusterId: -|arm-id KubernetesCluster.properties.connectedClusterId: -|arm-id + KubernetesClusterNode.agentPoolId: AgentPoolArmId + KubernetesClusterNode.bareMetalMachineId: BareMetalMachineArmId L2Network.properties.associatedResourceIds: -|arm-id L2Network.properties.clusterId: -|arm-id L2Network.properties.hybridAksClustersAssociatedIds: -|arm-id @@ -79,10 +97,12 @@ rename-mapping: L3Network.properties.l3IsolationDomainId: -|arm-id L3Network.properties.virtualMachinesAssociatedIds: -|arm-id L3NetworkAttachmentConfiguration.networkId: -|arm-id + NetworkAttachment.attachedNetworkId: AttachedNetworkArmId NetworkConfiguration: KubernetesClusterNetworkConfiguration NetworkConfiguration.cloudServicesNetworkId: -|arm-id NetworkConfiguration.cniNetworkId: -|arm-id NetworkConfiguration.dnsServiceIp: -|ip-address + OperationStatusResult.id: -|arm-id OsDisk.diskSizeGB: DiskSizeInGB Rack.properties.clusterId: -|arm-id Rack.properties.rackSkuId: -|arm-id @@ -120,10 +140,12 @@ prepend-rp-prefix: - ClusterManager - ClusterMetricsConfiguration - KubernetesCluster + - KubernetesClusterFeature - L2Network - L3Network - NetworkInterface - Nic + - OperationStatusResult - OsDisk - Rack - RackDefinition @@ -134,7 +156,6 @@ prepend-rp-prefix: - TrunkedNetwork - VirtualMachine - Volume - - OperationStatusResult acronym-mapping: CPU: Cpu diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/NetworkCloudManagementTestEnvironment.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/NetworkCloudManagementTestEnvironment.cs index bc84b7c29f7c9..7a2886c064cb4 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/NetworkCloudManagementTestEnvironment.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/NetworkCloudManagementTestEnvironment.cs @@ -12,11 +12,11 @@ public class NetworkCloudManagementTestEnvironment : TestEnvironment private TokenCredential _credential; // Cluster Manager - public string ClusterManagedRG => GetRecordedVariable("CLUSTER_MANAGED_RESOURCE_GROUP"); public string ManagerExtendedLocation => GetRecordedVariable("MANAGER_EXTENDED_LOCATION"); // Cluster + public string ClusterManagedRG => GetRecordedVariable("CLUSTER_MANAGED_RESOURCE_GROUP"); public string ClusterName => GetRecordedVariable("CLUSTER_NAME"); public ResourceIdentifier ClusterId => new ResourceIdentifier(GetRecordedVariable("CLUSTER_ID")); public string ClusterExtendedLocation => GetRecordedVariable("CLUSTER_EXTENDED_LOCATION"); @@ -28,6 +28,8 @@ public class NetworkCloudManagementTestEnvironment : TestEnvironment public string KubernetesClusterName => GetRecordedVariable("KUBERNETES_CLUSTER_NAME"); public string KubernetesClusterRG => GetRecordedVariable("KUBERNETES_CLUSTER_RG"); public ResourceIdentifier KubernetesClusterId => new ResourceIdentifier(GetRecordedVariable("KUBERNETES_CLUSTER_ID")); + public string KubernetesVersion => GetRecordedVariable("KUBERNETES_VERSION"); + public string KubernetesVersionUpdate => GetRecordedVariable("KUBERNETES_VERSION_UPDATE"); // Virtual Machine diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/AgentPoolTests.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/AgentPoolTests.cs index 8f2e34258aa1a..a1fe54024236b 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/AgentPoolTests.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/AgentPoolTests.cs @@ -39,12 +39,13 @@ public async Task AgentPool() AdminUsername = "azure", SshPublicKeys = { - new NetworkCloudSshPublicKey("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= fake-public-key") + new NetworkCloudSshPublicKey("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDHvXnJdrBmW052RUfpkGLj30ndi6jf4+i161ECfrVcUglfKmAlU8cfDCW/s6Bfppz80GkFscZpOH8h0erfigggPpFq5/2XblFitooqQ0Hxm091/rswg4t/27N49l5fiom8sD3kki4zRkmpgenwHTcZgUpBpQjd4DUrJxZ5zYF1wLop9Qu3ptsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsnv4ixQyU00X5Dt1G/3nLUdrz9A3s3b7K1w+BdB5E9v9gdBVSF2+XwZI9ooaAxfuOb0f/jP3CYLJ43SXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@test-vm") }, }, AgentOptions = new NetworkCloudAgentConfiguration(12) { HugepagesSize = HugepagesSize.TwoM, + HugepagesCount = 2 }, UpgradeMaxSurge = "1", Tags = diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/CloudServicesNetworksTests.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/CloudServicesNetworksTests.cs index 098a80e46c6eb..a7bde4a69282d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/CloudServicesNetworksTests.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/CloudServicesNetworksTests.cs @@ -30,7 +30,7 @@ public async Task CloudServicesNetworks() var data = new NetworkCloudCloudServicesNetworkData(new AzureLocation(TestEnvironment.Location), new ExtendedLocation(TestEnvironment.ClusterExtendedLocation, "CustomLocation")) { AdditionalEgressEndpoints = { new EgressEndpoint("azure-resource-management", new EndpointDependency[]{ - new EndpointDependency("https://storageaccountex.blob.core.windows.net") + new EndpointDependency("storageaccountex.blob.core.windows.net") { Port = 443 } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/KubernetesClusterFeatureTests.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/KubernetesClusterFeatureTests.cs new file mode 100644 index 0000000000000..e5d6dab534a11 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/KubernetesClusterFeatureTests.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.NetworkCloud.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.NetworkCloud.Tests.ScenarioTests +{ + public class KubernetesClusterFeatureTests : NetworkCloudManagementTestBase + { + public KubernetesClusterFeatureTests (bool isAsync, RecordedTestMode mode) : base(isAsync, mode) {} + public KubernetesClusterFeatureTests (bool isAsync) : base(isAsync) {} + + [Test, MaxTime(1800000)] + [RecordedTest] + public async Task KubernetesClusterFeature() + { + string featureName = Recording.GenerateAssetName("csi-volume"); + ResourceIdentifier featureId = NetworkCloudKubernetesClusterFeatureResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.KubernetesClusterRG, TestEnvironment.KubernetesClusterName, featureName); + NetworkCloudKubernetesClusterFeatureResource feature = Client.GetNetworkCloudKubernetesClusterFeatureResource(featureId); + + NetworkCloudKubernetesClusterResource kubernetesCluster = Client.GetNetworkCloudKubernetesClusterResource(TestEnvironment.KubernetesClusterId); + kubernetesCluster = await kubernetesCluster.GetAsync(); + NetworkCloudKubernetesClusterFeatureCollection collection = kubernetesCluster.GetNetworkCloudKubernetesClusterFeatures(); + + // Create + NetworkCloudKubernetesClusterFeatureData data = new NetworkCloudKubernetesClusterFeatureData(TestEnvironment.Location) + { + Tags = +{ +["key1"] = "myvalue1", +["key2"] = "myvalue2", +}, + Options = +{ +new StringKeyValuePair("featureOptionName","featureOptionValue") +}, + }; + // Create + ArmOperation createResult = await collection.CreateOrUpdateAsync(WaitUntil.Completed, featureName, data); + Assert.AreEqual(featureName, createResult.Value.Data.Name); + + // Get + var getResult = await feature.GetAsync(); + Assert.AreEqual(featureName, getResult.Value.Data.Name); + + // List + var listByKubernetesCluster = new List(); + await foreach (NetworkCloudKubernetesClusterFeatureResource item in collection.GetAllAsync()) + { + listByKubernetesCluster.Add(item); + } + Assert.IsNotEmpty(listByKubernetesCluster); + + // Update + NetworkCloudKubernetesClusterFeaturePatch patch = new NetworkCloudKubernetesClusterFeaturePatch() + { + Tags = + { + ["key1"] = "newvalue1", + ["key2"] = "newvalue2", + } + }; + ArmOperation updateResult = await feature.UpdateAsync(WaitUntil.Completed, patch); + Assert.AreEqual(patch.Tags, updateResult.Value.Data.Tags); + + // Delete + ArmOperation deleteResult = await feature.DeleteAsync(WaitUntil.Completed); + NetworkCloudOperationStatusResult result = deleteResult.Value; + Assert.IsNotNull(result); + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/KubernetesClustersTests.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/KubernetesClustersTests.cs index a7d3d2cf6e2a1..94593ca01e341 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/KubernetesClustersTests.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/KubernetesClustersTests.cs @@ -22,7 +22,7 @@ public async Task KubernetesClusters() { string resourceGroupName = TestEnvironment.ResourceGroup; string subscriptionId = TestEnvironment.SubscriptionId; - ResourceIdentifier l3NetworkId = new ResourceIdentifier(TestEnvironment.L3IsolationDomainId); + ResourceIdentifier l3NetworkId = new ResourceIdentifier(TestEnvironment.L3NAttachmentId); ResourceIdentifier cloudServicesNetworkId = new ResourceIdentifier(TestEnvironment.CloudServicesNetworkId); string kubernetesClusterName = Recording.GenerateAssetName("kubernetesCluster"); @@ -51,7 +51,6 @@ public async Task KubernetesClusters() "pool1" }) { - AdvertiseToFabric = AdvertiseToFabric.True, Communities = { "64512:100" }, Peers = { "peer1" }, } @@ -79,7 +78,7 @@ public async Task KubernetesClusters() InitialAgentPoolConfiguration[] initialAgentPoolConfigurationsArray = new InitialAgentPoolConfiguration[] { - new InitialAgentPoolConfiguration(1, NetworkCloudAgentPoolMode.System, "agentPoolConfig", "NC_G4_v1") + new InitialAgentPoolConfiguration(1, NetworkCloudAgentPoolMode.System, "agentPoolConfig", "NC_G2_8_v1") { AgentOptions = new NetworkCloudAgentConfiguration(4) { @@ -96,17 +95,17 @@ public async Task KubernetesClusters() NetworkCloudKubernetesClusterData createData = new NetworkCloudKubernetesClusterData( TestEnvironment.Location, new ExtendedLocation(TestEnvironment.ClusterExtendedLocation, "CustomLocation"), - new ControlPlaneNodeConfiguration(1, "NC_G4_v1") + new ControlPlaneNodeConfiguration(1, "NC_G2_8_v1") { AdministratorConfiguration = administratorConfiguration, }, initialAgentPoolConfigurationsArray, - "1.24.9", + TestEnvironment.KubernetesVersion, networkConfiguration) { AadAdminGroupObjectIds = new List() { "3d4c8620-ac8c-4bd6-9a92-f2b75923ef9f" }, AdministratorConfiguration = administratorConfiguration, - ManagedResourceGroupConfiguration = new ManagedResourceGroupConfiguration(new AzureLocation("East US"), kubernetesClusterName + "-MRG", null) + ManagedResourceGroupConfiguration = new ManagedResourceGroupConfiguration(new AzureLocation(TestEnvironment.Location), kubernetesClusterName + "-MRG", null) }; ArmOperation createResult = await collection.CreateOrUpdateAsync(WaitUntil.Completed, kubernetesClusterName, createData); @@ -120,8 +119,8 @@ public async Task KubernetesClusters() // Update KubernetesCluster NetworkCloudKubernetesClusterPatch updateData = new NetworkCloudKubernetesClusterPatch() { - ControlPlaneNodeCount = 3, - KubernetesVersion = "1.25.4-1", + ControlPlaneNodeCount = 1, + KubernetesVersion = TestEnvironment.KubernetesVersionUpdate, Tags = { { "test", "patch" } }, }; ArmOperation updateResult = await kubernetesCluster.UpdateAsync(WaitUntil.Completed, updateData); diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/ClustersTests.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/NetworkCloudClustersTests.cs similarity index 72% rename from sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/ClustersTests.cs rename to sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/NetworkCloudClustersTests.cs index 40c5ccf404c39..d37094e716435 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/ClustersTests.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/tests/Scenario/NetworkCloudClustersTests.cs @@ -12,14 +12,14 @@ namespace Azure.ResourceManager.NetworkCloud.Tests.ScenarioTests { - public class ClustersTests : NetworkCloudManagementTestBase + public class NetworkCloudClustersTests : NetworkCloudManagementTestBase { - public ClustersTests(bool isAsync, RecordedTestMode mode) : base(isAsync, mode) {} - public ClustersTests(bool isAsync) : base(isAsync) {} + public NetworkCloudClustersTests(bool isAsync, RecordedTestMode mode) : base(isAsync, mode) {} + public NetworkCloudClustersTests(bool isAsync) : base(isAsync) {} [Test] [RecordedTest] - public async Task Clusters() + public async Task NetworkCloudClusters() { var clusterName = Recording.GenerateAssetName("cluster"); NetworkCloudClusterCollection clusterCollection = ResourceGroupResource.GetNetworkCloudClusters(); @@ -47,7 +47,7 @@ public async Task Clusters() ComputeDeploymentThreshold = new ValidationThreshold(ValidationThresholdGrouping.PerCluster, ValidationThresholdType.PercentSuccess, 90), ComputeRackDefinitions = { - new NetworkCloudRackDefinition(new ResourceIdentifier(TestEnvironment.SubnetId), "b37m15r1", new ResourceIdentifier("/subscriptions/fca2e8ee-1179-48b8-9532-428ed0873a2e/providers/Microsoft.NetworkCloud/rackSkus/VLab1_4_Compute_DellR750_3C2M_sim")) + new NetworkCloudRackDefinition(new ResourceIdentifier(TestEnvironment.SubnetId), "b37m15r1", new ResourceIdentifier("/subscriptions/fca2e8ee-1179-48b8-9532-428ed0873a2e/providers/Microsoft.NetworkCloud/rackSkus/VLab1_4_Compute_DellR750_2C2M_sim")) { BareMetalMachineConfigurationData = { @@ -61,17 +61,12 @@ public async Task Clusters() MachineDetails = "extraDetails", MachineName = "compute2", }, - new BareMetalMachineConfiguration(createCreds,"AA:BB:CC:DD:EE:F0","00:BB:CC:DD:EE:F0",3,"BM1219XX0") - { - MachineDetails = "extraDetails", - MachineName = "compute3", - }, - new BareMetalMachineConfiguration(createCreds,"AA:BB:CC:DD:EE:01","00:BB:CC:DD:EE:01",4,"BM1219YY1") + new BareMetalMachineConfiguration(createCreds,"AA:BB:CC:DD:EE:01","00:BB:CC:DD:EE:01",3,"BM1219YY1") { MachineDetails = "extraDetails", MachineName = "control1", }, - new BareMetalMachineConfiguration(createCreds,"AA:BB:CC:DD:EE:F1","00:BB:CC:DD:EE:F1",5,"BM1219XX1") + new BareMetalMachineConfiguration(createCreds,"AA:BB:CC:DD:EE:F1","00:BB:CC:DD:EE:F1",4,"BM1219XX1") { MachineDetails = "extraDetails", MachineName = "control2", @@ -92,7 +87,7 @@ public async Task Clusters() Assert.AreEqual(clusterName, getResult.Value.Data.Name); NetworkCloudClusterResource clusterResource = Client.GetNetworkCloudClusterResource(getResult.Value.Data.Id); - // Update + // Update cluster location NetworkCloudClusterPatch patch = new NetworkCloudClusterPatch() { ClusterLocation = "Foo floor", @@ -122,6 +117,38 @@ public async Task Clusters() } Assert.IsNotEmpty(listBySubscription); + // Patch Upgrade Strategy + NetworkCloudClusterPatch patch2 = new NetworkCloudClusterPatch() + { + Tags = + { + ["key1"] = "myvalue1", + ["key2"] = "myvalue2", + }, + UpdateStrategy = new ClusterUpdateStrategy(ClusterUpdateStrategyType.PauseAfterRack, ValidationThresholdType.PercentSuccess, 100) + { + MaxUnavailable = 2, + WaitTimeMinutes = 0, + }, + }; + var strategyResult = await clusterResource.UpdateAsync(WaitUntil.Completed, patch2); + Assert.IsNotNull(strategyResult.Value); + + // Cluster Update Version + try + { + ClusterUpdateVersionContent update = new ClusterUpdateVersionContent("3.15.0"); + var updatedClusterResult = await clusterResource.UpdateVersionAsync(WaitUntil.Completed, update); + } + catch (Exception ex) + { + // special case: if the cluster was never deployed, version update (CUVA) is not allowed + // once the API bug is resolved this can be used. Until then, will compare 2 strings instead + // StringAssert.Contains($"cluster conditions do not pass validation for cluster {clusterName}: ClusterDeployedCondition is not True", ex.Message); + StringAssert.Contains("cluster conditions do not pass validation for cluster", ex.Message); + StringAssert.Contains("ClusterDeployedCondition is not True", ex.Message); + } + // Delete var deleteResult = await clusterResource.DeleteAsync(WaitUntil.Completed); Assert.IsTrue(deleteResult.HasCompleted);