diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ed3d0b68c6cd..0869078c75a6 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -788,7 +788,7 @@ # PRLabel: %Mgmt /sdk/network/arm-network-rest/ @qiaozha @MaryGao @JialinHuang803 -# PRLabel: %Mgmt +# PRLabel: %Mgmt %mgmt-review-needed /sdk/networkcloud/arm-networkcloud/ @qiaozha @MaryGao @JialinHuang803 # PRLabel: %Mgmt diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 73cf11b51707..b558bd906b9a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22660,24 +22660,27 @@ importers: sdk/networkcloud/arm-networkcloud: dependencies: + '@azure-rest/core-client': + specifier: ^2.3.1 + version: link:../../core/core-client-rest '@azure/abort-controller': specifier: ^2.1.2 version: link:../../core/abort-controller '@azure/core-auth': specifier: ^1.9.0 version: link:../../core/core-auth - '@azure/core-client': - specifier: ^1.9.3 - version: link:../../core/core-client '@azure/core-lro': - specifier: ^2.5.4 - version: 2.7.2 - '@azure/core-paging': - specifier: ^1.6.2 - version: link:../../core/core-paging + specifier: ^3.1.0 + version: link:../../core/core-lro '@azure/core-rest-pipeline': specifier: link:../../core/core-rest-pipeline version: link:../../core/core-rest-pipeline + '@azure/core-util': + specifier: ^1.12.0 + version: link:../../core/core-util + '@azure/logger': + specifier: ^1.2.0 + version: link:../../core/logger tslib: specifier: ^2.8.1 version: 2.8.1 @@ -22694,12 +22697,12 @@ importers: '@azure/dev-tool': specifier: workspace:^ version: link:../../../common/tools/dev-tool + '@azure/eslint-plugin-azure-sdk': + specifier: workspace:^ + version: link:../../../common/tools/eslint-plugin-azure-sdk '@azure/identity': specifier: catalog:internal version: 4.13.0 - '@azure/logger': - specifier: workspace:^ - version: link:../../core/logger '@types/node': specifier: 'catalog:' version: 20.19.43 diff --git a/sdk/networkcloud/arm-networkcloud/CHANGELOG.md b/sdk/networkcloud/arm-networkcloud/CHANGELOG.md index 23163a44a23a..8765f03453bb 100644 --- a/sdk/networkcloud/arm-networkcloud/CHANGELOG.md +++ b/sdk/networkcloud/arm-networkcloud/CHANGELOG.md @@ -1,5 +1,258 @@ # Release History +## 2.0.0-beta.2 (2026-05-07) +Compared with version 1.3.0 + +### Features Added + - Added operation group AccessBridgesOperations + - Added operation group KubernetesVersionsOperations + - Added operation AgentPoolsOperations.createOrUpdate + - Added operation AgentPoolsOperations.delete + - Added operation AgentPoolsOperations.update + - Added operation BareMetalMachineKeySetsOperations.createOrUpdate + - Added operation BareMetalMachineKeySetsOperations.delete + - Added operation BareMetalMachineKeySetsOperations.update + - Added operation BareMetalMachinesOperations.cordon + - Added operation BareMetalMachinesOperations.createOrUpdate + - Added operation BareMetalMachinesOperations.delete + - Added operation BareMetalMachinesOperations.powerOff + - Added operation BareMetalMachinesOperations.reimage + - Added operation BareMetalMachinesOperations.replace + - Added operation BareMetalMachinesOperations.restart + - Added operation BareMetalMachinesOperations.runCommand + - Added operation BareMetalMachinesOperations.runDataExtracts + - Added operation BareMetalMachinesOperations.runDataExtractsRestricted + - Added operation BareMetalMachinesOperations.runReadCommands + - Added operation BareMetalMachinesOperations.start + - Added operation BareMetalMachinesOperations.uncordon + - Added operation BareMetalMachinesOperations.update + - Added operation BmcKeySetsOperations.createOrUpdate + - Added operation BmcKeySetsOperations.delete + - Added operation BmcKeySetsOperations.update + - Added operation CloudServicesNetworksOperations.createOrUpdate + - Added operation CloudServicesNetworksOperations.delete + - Added operation CloudServicesNetworksOperations.update + - Added operation ClusterManagersOperations.beginUpdateRelayPrivateEndpointConnection + - Added operation ClusterManagersOperations.beginUpdateRelayPrivateEndpointConnectionAndWait + - Added operation ClusterManagersOperations.createOrUpdate + - Added operation ClusterManagersOperations.delete + - Added operation ClusterManagersOperations.updateRelayPrivateEndpointConnection + - Added operation ClustersOperations.beginInspect + - Added operation ClustersOperations.beginInspectAndWait + - Added operation ClustersOperations.beginRotateCredential + - Added operation ClustersOperations.beginRotateCredentialAndWait + - Added operation ClustersOperations.continueUpdateVersion + - Added operation ClustersOperations.createOrUpdate + - Added operation ClustersOperations.delete + - Added operation ClustersOperations.deploy + - Added operation ClustersOperations.inspect + - Added operation ClustersOperations.rotateCredential + - Added operation ClustersOperations.scanRuntime + - Added operation ClustersOperations.update + - Added operation ClustersOperations.updateVersion + - Added operation ConsolesOperations.createOrUpdate + - Added operation ConsolesOperations.delete + - Added operation ConsolesOperations.update + - Added operation KubernetesClusterFeaturesOperations.createOrUpdate + - Added operation KubernetesClusterFeaturesOperations.delete + - Added operation KubernetesClusterFeaturesOperations.update + - Added operation KubernetesClustersOperations.createOrUpdate + - Added operation KubernetesClustersOperations.delete + - Added operation KubernetesClustersOperations.restartNode + - Added operation KubernetesClustersOperations.update + - Added operation L2NetworksOperations.createOrUpdate + - Added operation L2NetworksOperations.delete + - Added operation L3NetworksOperations.createOrUpdate + - Added operation L3NetworksOperations.delete + - Added operation MetricsConfigurationsOperations.createOrUpdate + - Added operation MetricsConfigurationsOperations.delete + - Added operation MetricsConfigurationsOperations.update + - Added operation RacksOperations.createOrUpdate + - Added operation RacksOperations.delete + - Added operation RacksOperations.update + - Added operation StorageAppliancesOperations.createOrUpdate + - Added operation StorageAppliancesOperations.delete + - Added operation StorageAppliancesOperations.disableRemoteVendorManagement + - Added operation StorageAppliancesOperations.enableRemoteVendorManagement + - Added operation StorageAppliancesOperations.runReadCommands + - Added operation StorageAppliancesOperations.update + - Added operation TrunkedNetworksOperations.createOrUpdate + - Added operation TrunkedNetworksOperations.delete + - Added operation VirtualMachinesOperations.assignRelay + - Added operation VirtualMachinesOperations.createOrUpdate + - Added operation VirtualMachinesOperations.delete + - Added operation VirtualMachinesOperations.powerOff + - Added operation VirtualMachinesOperations.reimage + - Added operation VirtualMachinesOperations.restart + - Added operation VirtualMachinesOperations.start + - Added operation VirtualMachinesOperations.update + - Added operation VolumesOperations.createOrUpdate + - Added operation VolumesOperations.delete + - Added Interface AccessBridge + - Added Interface AccessBridgeEndpoint + - Added Interface AccessBridgePatchParameters + - Added Interface AccessBridgePatchProperties + - Added Interface AccessBridgeProperties + - Added Interface AccessBridgesCreateOrUpdateOptionalParams + - Added Interface AccessBridgesDeleteOptionalParams + - Added Interface AccessBridgeSecurityRule + - Added Interface AccessBridgesGetOptionalParams + - Added Interface AccessBridgesListByResourceGroupOptionalParams + - Added Interface AccessBridgesListBySubscriptionOptionalParams + - Added Interface AccessBridgesUpdateOptionalParams + - Added Interface AgentPoolPatchProperties + - Added Interface AgentPoolProperties + - Added Interface BareMetalMachineKeySetPatchProperties + - Added Interface BareMetalMachineKeySetProperties + - Added Interface BareMetalMachineMonitoringConfigurationStatus + - Added Interface BareMetalMachinePatchProperties + - Added Interface BareMetalMachineProperties + - Added Interface BareMetalMachineReimageParameters + - Added Interface BmcKeySetPatchProperties + - Added Interface BmcKeySetProperties + - Added Interface CloudServicesNetworkPatchProperties + - Added Interface CloudServicesNetworkProperties + - Added Interface ClusterInspectParameters + - Added Interface ClusterManagerProperties + - Added Interface ClusterManagerRelayConfiguration + - Added Interface ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams + - Added Interface ClusterManagerUpdateRelayPrivateEndpointConnectionParameters + - Added Interface ClusterMetricsConfigurationPatchProperties + - Added Interface ClusterMetricsConfigurationProperties + - Added Interface ClusterPatchProperties + - Added Interface ClusterProperties + - Added Interface ClusterRotateCredentialParameters + - Added Interface ClustersInspectOptionalParams + - Added Interface ClustersRotateCredentialOptionalParams + - Added Interface ConsolePatchProperties + - Added Interface ConsoleProperties + - Added Interface FilterDevices + - Added Interface KubernetesClusterFeaturePatchProperties + - Added Interface KubernetesClusterFeatureProperties + - Added Interface KubernetesClusterPatchProperties + - Added Interface KubernetesClusterProperties + - Added Interface KubernetesVersion + - Added Interface KubernetesVersionPatchParameters + - Added Interface KubernetesVersionProperties + - Added Interface KubernetesVersionsCreateOrUpdateOptionalParams + - Added Interface KubernetesVersionsDeleteOptionalParams + - Added Interface KubernetesVersionsGetOptionalParams + - Added Interface KubernetesVersionsListByResourceGroupOptionalParams + - Added Interface KubernetesVersionsListBySubscriptionOptionalParams + - Added Interface KubernetesVersionsUpdateOptionalParams + - Added Interface KubernetesVersionValue + - Added Interface L2NetworkProperties + - Added Interface L3NetworkProperties + - Added Interface MachineSkuProperties + - Added Interface OperationStatusResultProperties + - Added Interface PagedAsyncIterableIterator + - Added Interface PageSettings + - Added Interface ProxyResource + - Added Interface RackProperties + - Added Interface RackSkuProperties + - Added Interface RacksPatchProperties + - Added Interface RestorePollerOptions + - Added Interface SimplePollerLike + - Added Interface StorageApplianceExpansionShelf + - Added Interface StorageApplianceMonitoringConfigurationStatus + - Added Interface StorageAppliancePatchProperties + - Added Interface StorageApplianceProperties + - Added Interface StorageApplianceSkuProperties + - Added Interface TrunkedNetworkProperties + - Added Interface VirtualMachinePatchProperties + - Added Interface VirtualMachineProperties + - Added Interface VolumeProperties + - Interface BareMetalMachine has a new optional parameter bmcIpv4Address + - Interface BareMetalMachine has a new optional parameter bmcIpv6Address + - Interface BareMetalMachine has a new optional parameter monitoringConfigurationStatus + - Interface Cluster has a new optional parameter kind + - Interface Cluster has a new optional parameter lastSuccessfulVersionUpdateTime + - Interface Cluster has a new optional parameter managedCredentials + - Interface ClusterContinueUpdateVersionParameters has a new optional parameter safeguardMode + - Interface ClusterManager has a new optional parameter kind + - Interface ClusterManager has a new optional parameter relayConfiguration + - Interface ClusterUpdateVersionParameters has a new optional parameter safeguardMode + - Interface RackSku has a new optional parameter deploymentType + - Interface RuntimeProtectionConfiguration has a new optional parameter definitionUpdateMode + - Interface RuntimeProtectionStatus has a new optional parameter agentHealthStatus + - Interface RuntimeProtectionStatus has a new optional parameter agentHealthStatusIssues + - Interface RuntimeProtectionStatus has a new optional parameter agentLicenseStatus + - Interface RuntimeProtectionStatus has a new optional parameter definitionUpdateMode + - Interface RuntimeProtectionStatus has a new optional parameter enforcementLevel + - Interface StorageAppliance has a new optional parameter expansionShelves + - Interface StorageAppliance has a new optional parameter monitoringConfigurationStatus + - Interface Volume has a new optional parameter assignedStorageApplianceId + - Added Type Alias AccessBridgeAllowedName + - Added Type Alias AccessBridgeDetailedStatus + - Added Type Alias AccessBridgeProvisioningState + - Added Type Alias AzureSupportedClouds + - Added Type Alias BareMetalMachineMetricsConfigurationStatusLogLevel + - Added Type Alias BareMetalMachineMetricsConfigurationStatusMetricsLevel + - Added Type Alias BareMetalMachineReimageSafeguardMode + - Added Type Alias ClusterContinueUpdateVersionSafeguardMode + - Added Type Alias ClusterInspectAdditionalAction + - Added Type Alias ClusterUpdateVersionSafeguardMode + - Added Type Alias DeploymentType + - Added Type Alias ExtendedLocationType + - Added Type Alias KubernetesVersionProvisioningState + - Added Type Alias RelayPrivateEndpointConnectionState + - Added Type Alias RuntimeProtectionAgentHealthStatus + - Added Type Alias RuntimeProtectionAgentLicenseStatus + - Added Type Alias RuntimeProtectionDefinitionUpdateMode + - Added Type Alias SecurityRuleDirection + - Added Type Alias StorageApplianceMetricsConfigurationStatusLogLevel + - Added Type Alias StorageApplianceMetricsConfigurationStatusMetricsLevel + - Added Type Alias TransportProtocol + - Added Enum AzureClouds + - Added Enum KnownAccessBridgeAllowedName + - Added Enum KnownAccessBridgeDetailedStatus + - Added Enum KnownAccessBridgeProvisioningState + - Added Enum KnownBareMetalMachineMetricsConfigurationStatusLogLevel + - Added Enum KnownBareMetalMachineMetricsConfigurationStatusMetricsLevel + - Added Enum KnownBareMetalMachineReimageSafeguardMode + - Added Enum KnownClusterContinueUpdateVersionSafeguardMode + - Added Enum KnownClusterInspectAdditionalAction + - Added Enum KnownClusterUpdateVersionSafeguardMode + - Added Enum KnownDeploymentType + - Added Enum KnownExtendedLocationType + - Added Enum KnownKubernetesVersionProvisioningState + - Added Enum KnownRelayPrivateEndpointConnectionState + - Added Enum KnownRuntimeProtectionAgentHealthStatus + - Added Enum KnownRuntimeProtectionAgentLicenseStatus + - Added Enum KnownRuntimeProtectionDefinitionUpdateMode + - Added Enum KnownSecurityRuleDirection + - Added Enum KnownStorageApplianceMetricsConfigurationStatusLogLevel + - Added Enum KnownStorageApplianceMetricsConfigurationStatusMetricsLevel + - Added Enum KnownTransportProtocol + - Added Enum KnownVersions + - Enum KnownCloudServicesNetworkStorageStatusStatus has a new value Initializing + - Enum KnownCloudServicesNetworkStorageStatusStatus has a new value None + - Enum KnownCloudServicesNetworkStorageStatusStatus has a new value Repairing + - Enum KnownCommandOutputType has a new value ClusterSupportAdministrativeActions + +### Breaking Changes + - Removed Interface AgentPoolConfiguration + - Removed Interface AgentPoolList + - Removed Interface BareMetalMachineKeySetList + - Removed Interface BareMetalMachineList + - Removed Interface BmcKeySetList + - Removed Interface CloudServicesNetworkList + - Removed Interface ClusterList + - Removed Interface ClusterManagerList + - Removed Interface ClusterMetricsConfigurationList + - Removed Interface ConsoleList + - Removed Interface KubernetesClusterFeatureList + - Removed Interface KubernetesClusterList + - Removed Interface L2NetworkList + - Removed Interface L3NetworkList + - Removed Interface RackList + - Removed Interface RackSkuList + - Removed Interface StorageApplianceList + - Removed Interface TagsParameter + - Removed Interface TrunkedNetworkList + - Removed Interface VirtualMachineList + - Removed Interface VolumeList + ## 1.3.0 (2025-12-16) ### Features Added diff --git a/sdk/networkcloud/arm-networkcloud/README.md b/sdk/networkcloud/arm-networkcloud/README.md index 5a074bcd28ea..a6478b6c895f 100644 --- a/sdk/networkcloud/arm-networkcloud/README.md +++ b/sdk/networkcloud/arm-networkcloud/README.md @@ -4,10 +4,12 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. -[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud) | -[Package (NPM)](https://www.npmjs.com/package/@azure/arm-networkcloud) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-networkcloud) | -[Samples](https://github.com/Azure-Samples/azure-samples-js-management) +Key links: + +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud) +- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-networkcloud) +- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-networkcloud?view=azure-node-preview) +- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud/samples) ## Getting started @@ -35,7 +37,7 @@ npm install @azure/arm-networkcloud To create a client object to access the Azure NetworkCloud API, you will need the `endpoint` of your Azure NetworkCloud resource and a `credential`. The Azure NetworkCloud client can use Azure Active Directory credentials to authenticate. You can find the endpoint for your Azure NetworkCloud resource in the [Azure Portal][azure_portal]. -You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: @@ -63,14 +65,15 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur import { InteractiveBrowserCredential } from "@azure/identity"; import { NetworkCloud } from "@azure/arm-networkcloud"; -const subscriptionId = "00000000-0000-0000-0000-000000000000"; const credential = new InteractiveBrowserCredential({ tenantId: "", clientId: "", }); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkCloud(credential, subscriptionId); ``` + ### JavaScript Bundle To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). @@ -96,7 +99,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur ## Next steps -Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. +Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud/samples) directory for detailed examples on how to use this library. ## Contributing @@ -106,9 +109,6 @@ If you'd like to contribute to this library, please read the [contributing guide - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) - -[azure_cli]: https://learn.microsoft.com/cli/azure -[azure_sub]: https://azure.microsoft.com/free/ [azure_sub]: https://azure.microsoft.com/free/ [azure_portal]: https://portal.azure.com [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity diff --git a/sdk/networkcloud/arm-networkcloud/_meta.json b/sdk/networkcloud/arm-networkcloud/_meta.json deleted file mode 100644 index 7b2aa1cd33d9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/_meta.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "commit": "162c1c3714671304cf2e272af34c7a0a75aa198f", - "readme": "specification/networkcloud/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\networkcloud\\resource-manager\\readme.md --use=@autorest/typescript@6.0.53 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.14.8", - "use": "@autorest/typescript@6.0.53" -} diff --git a/sdk/networkcloud/arm-networkcloud/api-extractor.json b/sdk/networkcloud/arm-networkcloud/api-extractor.json index 16d81e2eb512..870d6d399477 100644 --- a/sdk/networkcloud/arm-networkcloud/api-extractor.json +++ b/sdk/networkcloud/arm-networkcloud/api-extractor.json @@ -1,3 +1 @@ -{ - "extends": "../../../api-extractor-base.json" -} +{ "extends": "../../../api-extractor-base.json" } diff --git a/sdk/networkcloud/arm-networkcloud/config/tsconfig.test.browser.json b/sdk/networkcloud/arm-networkcloud/config/tsconfig.test.browser.json new file mode 100644 index 000000000000..16a3ef67408d --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/config/tsconfig.test.browser.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../../eng/tsconfigs/test.browser.json" +} diff --git a/sdk/networkcloud/arm-networkcloud/metadata.json b/sdk/networkcloud/arm-networkcloud/metadata.json new file mode 100644 index 000000000000..93da7025c39f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/metadata.json @@ -0,0 +1,506 @@ +{ + "apiVersions": { + "Microsoft.NetworkCloud": "2026-05-01-preview" + }, + "emitterVersion": "0.52.3", + "crossLanguageDefinitions": { + "CrossLanguagePackageId": "Microsoft.NetworkCloud", + "CrossLanguageDefinitionId": { + "@azure/arm-networkcloud!OperationListResult:interface": "Azure.ResourceManager.CommonTypes.OperationListResult", + "@azure/arm-networkcloud!Operation:interface": "Azure.ResourceManager.CommonTypes.Operation", + "@azure/arm-networkcloud!OperationDisplay:interface": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "@azure/arm-networkcloud!ErrorResponse:interface": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "@azure/arm-networkcloud!ErrorDetail:interface": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "@azure/arm-networkcloud!ErrorAdditionalInfo:interface": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "@azure/arm-networkcloud!AccessBridge:interface": "Microsoft.NetworkCloud.AccessBridge", + "@azure/arm-networkcloud!AccessBridgeProperties:interface": "Microsoft.NetworkCloud.AccessBridgeProperties", + "@azure/arm-networkcloud!AccessBridgeSecurityRule:interface": "Microsoft.NetworkCloud.AccessBridgeSecurityRule", + "@azure/arm-networkcloud!AccessBridgeEndpoint:interface": "Microsoft.NetworkCloud.AccessBridgeEndpoint", + "@azure/arm-networkcloud!ExtendedLocation:interface": "Azure.ResourceManager.CommonTypes.ExtendedLocation", + "@azure/arm-networkcloud!TrackedResource:interface": "Azure.ResourceManager.CommonTypes.TrackedResource", + "@azure/arm-networkcloud!Resource:interface": "Azure.ResourceManager.CommonTypes.Resource", + "@azure/arm-networkcloud!SystemData:interface": "Azure.ResourceManager.CommonTypes.SystemData", + "@azure/arm-networkcloud!ArmOperationStatusResourceProvisioningState:interface": "Azure.ResourceManager.ArmOperationStatus", + "@azure/arm-networkcloud!AccessBridgePatchParameters:interface": "Microsoft.NetworkCloud.AccessBridgePatchParameters", + "@azure/arm-networkcloud!AccessBridgePatchProperties:interface": "Microsoft.NetworkCloud.AccessBridgePatchProperties", + "@azure/arm-networkcloud!OperationStatusResult:interface": "Microsoft.NetworkCloud.OperationStatusResult", + "@azure/arm-networkcloud!OperationStatusResultProperties:interface": "Microsoft.NetworkCloud.OperationStatusResultProperties", + "@azure/arm-networkcloud!AccessBridgeList:interface": "Microsoft.NetworkCloud.AccessBridgeList", + "@azure/arm-networkcloud!BareMetalMachine:interface": "Microsoft.NetworkCloud.BareMetalMachine", + "@azure/arm-networkcloud!BareMetalMachineProperties:interface": "Microsoft.NetworkCloud.BareMetalMachineProperties", + "@azure/arm-networkcloud!AdministrativeCredentials:interface": "Microsoft.NetworkCloud.AdministrativeCredentials", + "@azure/arm-networkcloud!ActionState:interface": "Microsoft.NetworkCloud.ActionState", + "@azure/arm-networkcloud!StepState:interface": "Microsoft.NetworkCloud.StepState", + "@azure/arm-networkcloud!CertificateInfo:interface": "Microsoft.NetworkCloud.CertificateInfo", + "@azure/arm-networkcloud!HardwareInventory:interface": "Microsoft.NetworkCloud.HardwareInventory", + "@azure/arm-networkcloud!HardwareInventoryNetworkInterface:interface": "Microsoft.NetworkCloud.HardwareInventoryNetworkInterface", + "@azure/arm-networkcloud!Nic:interface": "Microsoft.NetworkCloud.Nic", + "@azure/arm-networkcloud!LldpNeighbor:interface": "Microsoft.NetworkCloud.LldpNeighbor", + "@azure/arm-networkcloud!HardwareValidationStatus:interface": "Microsoft.NetworkCloud.HardwareValidationStatus", + "@azure/arm-networkcloud!BareMetalMachineMonitoringConfigurationStatus:interface": "Microsoft.NetworkCloud.BareMetalMachineMonitoringConfigurationStatus", + "@azure/arm-networkcloud!RuntimeProtectionStatus:interface": "Microsoft.NetworkCloud.RuntimeProtectionStatus", + "@azure/arm-networkcloud!SecretRotationStatus:interface": "Microsoft.NetworkCloud.SecretRotationStatus", + "@azure/arm-networkcloud!SecretArchiveReference:interface": "Microsoft.NetworkCloud.SecretArchiveReference", + "@azure/arm-networkcloud!BareMetalMachinePatchParameters:interface": "Microsoft.NetworkCloud.BareMetalMachinePatchParameters", + "@azure/arm-networkcloud!BareMetalMachinePatchProperties:interface": "Microsoft.NetworkCloud.BareMetalMachinePatchProperties", + "@azure/arm-networkcloud!BareMetalMachineList:interface": "Microsoft.NetworkCloud.BareMetalMachineList", + "@azure/arm-networkcloud!BareMetalMachineCordonParameters:interface": "Microsoft.NetworkCloud.BareMetalMachineCordonParameters", + "@azure/arm-networkcloud!BareMetalMachinePowerOffParameters:interface": "Microsoft.NetworkCloud.BareMetalMachinePowerOffParameters", + "@azure/arm-networkcloud!BareMetalMachineReimageParameters:interface": "Microsoft.NetworkCloud.BareMetalMachineReimageParameters", + "@azure/arm-networkcloud!BareMetalMachineReplaceParameters:interface": "Microsoft.NetworkCloud.BareMetalMachineReplaceParameters", + "@azure/arm-networkcloud!BareMetalMachineRunCommandParameters:interface": "Microsoft.NetworkCloud.BareMetalMachineRunCommandParameters", + "@azure/arm-networkcloud!BareMetalMachineRunDataExtractsParameters:interface": "Microsoft.NetworkCloud.BareMetalMachineRunDataExtractsParameters", + "@azure/arm-networkcloud!BareMetalMachineCommandSpecification:interface": "Microsoft.NetworkCloud.BareMetalMachineCommandSpecification", + "@azure/arm-networkcloud!BareMetalMachineRunReadCommandsParameters:interface": "Microsoft.NetworkCloud.BareMetalMachineRunReadCommandsParameters", + "@azure/arm-networkcloud!CloudServicesNetwork:interface": "Microsoft.NetworkCloud.CloudServicesNetwork", + "@azure/arm-networkcloud!CloudServicesNetworkProperties:interface": "Microsoft.NetworkCloud.CloudServicesNetworkProperties", + "@azure/arm-networkcloud!EgressEndpoint:interface": "Microsoft.NetworkCloud.EgressEndpoint", + "@azure/arm-networkcloud!EndpointDependency:interface": "Microsoft.NetworkCloud.EndpointDependency", + "@azure/arm-networkcloud!CloudServicesNetworkStorageOptions:interface": "Microsoft.NetworkCloud.CloudServicesNetworkStorageOptions", + "@azure/arm-networkcloud!CloudServicesNetworkStorageStatus:interface": "Microsoft.NetworkCloud.CloudServicesNetworkStorageStatus", + "@azure/arm-networkcloud!CloudServicesNetworkPatchParameters:interface": "Microsoft.NetworkCloud.CloudServicesNetworkPatchParameters", + "@azure/arm-networkcloud!CloudServicesNetworkPatchProperties:interface": "Microsoft.NetworkCloud.CloudServicesNetworkPatchProperties", + "@azure/arm-networkcloud!CloudServicesNetworkStorageOptionsPatch:interface": "Microsoft.NetworkCloud.CloudServicesNetworkStorageOptionsPatch", + "@azure/arm-networkcloud!CloudServicesNetworkList:interface": "Microsoft.NetworkCloud.CloudServicesNetworkList", + "@azure/arm-networkcloud!ClusterManager:interface": "Microsoft.NetworkCloud.ClusterManager", + "@azure/arm-networkcloud!ClusterManagerProperties:interface": "Microsoft.NetworkCloud.ClusterManagerProperties", + "@azure/arm-networkcloud!ClusterAvailableVersion:interface": "Microsoft.NetworkCloud.ClusterAvailableVersion", + "@azure/arm-networkcloud!ManagedResourceGroupConfiguration:interface": "Microsoft.NetworkCloud.ManagedResourceGroupConfiguration", + "@azure/arm-networkcloud!ClusterManagerRelayConfiguration:interface": "Microsoft.NetworkCloud.ClusterManagerRelayConfiguration", + "@azure/arm-networkcloud!ManagedServiceIdentity:interface": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "@azure/arm-networkcloud!UserAssignedIdentity:interface": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "@azure/arm-networkcloud!ClusterManagerPatchParameters:interface": "Microsoft.NetworkCloud.ClusterManagerPatchParameters", + "@azure/arm-networkcloud!ClusterManagerList:interface": "Microsoft.NetworkCloud.ClusterManagerList", + "@azure/arm-networkcloud!ClusterManagerUpdateRelayPrivateEndpointConnectionParameters:interface": "Microsoft.NetworkCloud.ClusterManagerUpdateRelayPrivateEndpointConnectionParameters", + "@azure/arm-networkcloud!Cluster:interface": "Microsoft.NetworkCloud.Cluster", + "@azure/arm-networkcloud!ClusterProperties:interface": "Microsoft.NetworkCloud.ClusterProperties", + "@azure/arm-networkcloud!RackDefinition:interface": "Microsoft.NetworkCloud.RackDefinition", + "@azure/arm-networkcloud!BareMetalMachineConfigurationData:interface": "Microsoft.NetworkCloud.BareMetalMachineConfigurationData", + "@azure/arm-networkcloud!StorageApplianceConfigurationData:interface": "Microsoft.NetworkCloud.StorageApplianceConfigurationData", + "@azure/arm-networkcloud!AnalyticsOutputSettings:interface": "Microsoft.NetworkCloud.AnalyticsOutputSettings", + "@azure/arm-networkcloud!IdentitySelector:interface": "Microsoft.NetworkCloud.IdentitySelector", + "@azure/arm-networkcloud!ServicePrincipalInformation:interface": "Microsoft.NetworkCloud.ServicePrincipalInformation", + "@azure/arm-networkcloud!CommandOutputSettings:interface": "Microsoft.NetworkCloud.CommandOutputSettings", + "@azure/arm-networkcloud!CommandOutputOverride:interface": "Microsoft.NetworkCloud.CommandOutputOverride", + "@azure/arm-networkcloud!ValidationThreshold:interface": "Microsoft.NetworkCloud.ValidationThreshold", + "@azure/arm-networkcloud!RuntimeProtectionConfiguration:interface": "Microsoft.NetworkCloud.RuntimeProtectionConfiguration", + "@azure/arm-networkcloud!ClusterSecretArchive:interface": "Microsoft.NetworkCloud.ClusterSecretArchive", + "@azure/arm-networkcloud!SecretArchiveSettings:interface": "Microsoft.NetworkCloud.SecretArchiveSettings", + "@azure/arm-networkcloud!ClusterUpdateStrategy:interface": "Microsoft.NetworkCloud.ClusterUpdateStrategy", + "@azure/arm-networkcloud!VulnerabilityScanningSettings:interface": "Microsoft.NetworkCloud.VulnerabilityScanningSettings", + "@azure/arm-networkcloud!ClusterAvailableUpgradeVersion:interface": "Microsoft.NetworkCloud.ClusterAvailableUpgradeVersion", + "@azure/arm-networkcloud!ClusterCapacity:interface": "Microsoft.NetworkCloud.ClusterCapacity", + "@azure/arm-networkcloud!ClusterPatchParameters:interface": "Microsoft.NetworkCloud.ClusterPatchParameters", + "@azure/arm-networkcloud!ClusterPatchProperties:interface": "Microsoft.NetworkCloud.ClusterPatchProperties", + "@azure/arm-networkcloud!VulnerabilityScanningSettingsPatch:interface": "Microsoft.NetworkCloud.VulnerabilityScanningSettingsPatch", + "@azure/arm-networkcloud!ClusterList:interface": "Microsoft.NetworkCloud.ClusterList", + "@azure/arm-networkcloud!ClusterContinueUpdateVersionParameters:interface": "Microsoft.NetworkCloud.ClusterContinueUpdateVersionParameters", + "@azure/arm-networkcloud!ClusterDeployParameters:interface": "Microsoft.NetworkCloud.ClusterDeployParameters", + "@azure/arm-networkcloud!ClusterInspectParameters:interface": "Microsoft.NetworkCloud.ClusterInspectParameters", + "@azure/arm-networkcloud!FilterDevices:interface": "Microsoft.NetworkCloud.FilterDevices", + "@azure/arm-networkcloud!ClusterRotateCredentialParameters:interface": "Microsoft.NetworkCloud.ClusterRotateCredentialParameters", + "@azure/arm-networkcloud!ClusterScanRuntimeParameters:interface": "Microsoft.NetworkCloud.ClusterScanRuntimeParameters", + "@azure/arm-networkcloud!ClusterUpdateVersionParameters:interface": "Microsoft.NetworkCloud.ClusterUpdateVersionParameters", + "@azure/arm-networkcloud!KubernetesCluster:interface": "Microsoft.NetworkCloud.KubernetesCluster", + "@azure/arm-networkcloud!KubernetesClusterProperties:interface": "Microsoft.NetworkCloud.KubernetesClusterProperties", + "@azure/arm-networkcloud!AadConfiguration:interface": "Microsoft.NetworkCloud.AadConfiguration", + "@azure/arm-networkcloud!AdministratorConfiguration:interface": "Microsoft.NetworkCloud.AdministratorConfiguration", + "@azure/arm-networkcloud!SshPublicKey:interface": "Microsoft.NetworkCloud.SshPublicKey", + "@azure/arm-networkcloud!ControlPlaneNodeConfiguration:interface": "Microsoft.NetworkCloud.ControlPlaneNodeConfiguration", + "@azure/arm-networkcloud!InitialAgentPoolConfiguration:interface": "Microsoft.NetworkCloud.InitialAgentPoolConfiguration", + "@azure/arm-networkcloud!AgentOptions:interface": "Microsoft.NetworkCloud.AgentOptions", + "@azure/arm-networkcloud!AttachedNetworkConfiguration:interface": "Microsoft.NetworkCloud.AttachedNetworkConfiguration", + "@azure/arm-networkcloud!L2NetworkAttachmentConfiguration:interface": "Microsoft.NetworkCloud.L2NetworkAttachmentConfiguration", + "@azure/arm-networkcloud!L3NetworkAttachmentConfiguration:interface": "Microsoft.NetworkCloud.L3NetworkAttachmentConfiguration", + "@azure/arm-networkcloud!TrunkedNetworkAttachmentConfiguration:interface": "Microsoft.NetworkCloud.TrunkedNetworkAttachmentConfiguration", + "@azure/arm-networkcloud!KubernetesLabel:interface": "Microsoft.NetworkCloud.KubernetesLabel", + "@azure/arm-networkcloud!AgentPoolUpgradeSettings:interface": "Microsoft.NetworkCloud.AgentPoolUpgradeSettings", + "@azure/arm-networkcloud!NetworkConfiguration:interface": "Microsoft.NetworkCloud.NetworkConfiguration", + "@azure/arm-networkcloud!BgpServiceLoadBalancerConfiguration:interface": "Microsoft.NetworkCloud.BgpServiceLoadBalancerConfiguration", + "@azure/arm-networkcloud!BgpAdvertisement:interface": "Microsoft.NetworkCloud.BgpAdvertisement", + "@azure/arm-networkcloud!ServiceLoadBalancerBgpPeer:interface": "Microsoft.NetworkCloud.ServiceLoadBalancerBgpPeer", + "@azure/arm-networkcloud!IpAddressPool:interface": "Microsoft.NetworkCloud.IpAddressPool", + "@azure/arm-networkcloud!L2ServiceLoadBalancerConfiguration:interface": "Microsoft.NetworkCloud.L2ServiceLoadBalancerConfiguration", + "@azure/arm-networkcloud!AvailableUpgrade:interface": "Microsoft.NetworkCloud.AvailableUpgrade", + "@azure/arm-networkcloud!FeatureStatus:interface": "Microsoft.NetworkCloud.FeatureStatus", + "@azure/arm-networkcloud!KubernetesClusterNode:interface": "Microsoft.NetworkCloud.KubernetesClusterNode", + "@azure/arm-networkcloud!NetworkAttachment:interface": "Microsoft.NetworkCloud.NetworkAttachment", + "@azure/arm-networkcloud!KubernetesClusterPatchParameters:interface": "Microsoft.NetworkCloud.KubernetesClusterPatchParameters", + "@azure/arm-networkcloud!KubernetesClusterPatchProperties:interface": "Microsoft.NetworkCloud.KubernetesClusterPatchProperties", + "@azure/arm-networkcloud!AdministratorConfigurationPatch:interface": "Microsoft.NetworkCloud.AdministratorConfigurationPatch", + "@azure/arm-networkcloud!ControlPlaneNodePatchConfiguration:interface": "Microsoft.NetworkCloud.ControlPlaneNodePatchConfiguration", + "@azure/arm-networkcloud!KubernetesClusterList:interface": "Microsoft.NetworkCloud.KubernetesClusterList", + "@azure/arm-networkcloud!KubernetesClusterRestartNodeParameters:interface": "Microsoft.NetworkCloud.KubernetesClusterRestartNodeParameters", + "@azure/arm-networkcloud!KubernetesVersion:interface": "Microsoft.NetworkCloud.KubernetesVersion", + "@azure/arm-networkcloud!KubernetesVersionProperties:interface": "Microsoft.NetworkCloud.KubernetesVersionProperties", + "@azure/arm-networkcloud!KubernetesVersionValue:interface": "Microsoft.NetworkCloud.KubernetesVersionValue", + "@azure/arm-networkcloud!KubernetesVersionPatchParameters:interface": "Microsoft.NetworkCloud.KubernetesVersionPatchParameters", + "@azure/arm-networkcloud!KubernetesVersionList:interface": "Microsoft.NetworkCloud.KubernetesVersionList", + "@azure/arm-networkcloud!L2Network:interface": "Microsoft.NetworkCloud.L2Network", + "@azure/arm-networkcloud!L2NetworkProperties:interface": "Microsoft.NetworkCloud.L2NetworkProperties", + "@azure/arm-networkcloud!L2NetworkPatchParameters:interface": "Microsoft.NetworkCloud.L2NetworkPatchParameters", + "@azure/arm-networkcloud!L2NetworkList:interface": "Microsoft.NetworkCloud.L2NetworkList", + "@azure/arm-networkcloud!L3Network:interface": "Microsoft.NetworkCloud.L3Network", + "@azure/arm-networkcloud!L3NetworkProperties:interface": "Microsoft.NetworkCloud.L3NetworkProperties", + "@azure/arm-networkcloud!L3NetworkPatchParameters:interface": "Microsoft.NetworkCloud.L3NetworkPatchParameters", + "@azure/arm-networkcloud!L3NetworkList:interface": "Microsoft.NetworkCloud.L3NetworkList", + "@azure/arm-networkcloud!RackSku:interface": "Microsoft.NetworkCloud.RackSku", + "@azure/arm-networkcloud!RackSkuProperties:interface": "Microsoft.NetworkCloud.RackSkuProperties", + "@azure/arm-networkcloud!MachineSkuSlot:interface": "Microsoft.NetworkCloud.MachineSkuSlot", + "@azure/arm-networkcloud!MachineSkuProperties:interface": "Microsoft.NetworkCloud.MachineSkuProperties", + "@azure/arm-networkcloud!MachineDisk:interface": "Microsoft.NetworkCloud.MachineDisk", + "@azure/arm-networkcloud!NetworkInterface:interface": "Microsoft.NetworkCloud.NetworkInterface", + "@azure/arm-networkcloud!StorageApplianceSkuSlot:interface": "Microsoft.NetworkCloud.StorageApplianceSkuSlot", + "@azure/arm-networkcloud!StorageApplianceSkuProperties:interface": "Microsoft.NetworkCloud.StorageApplianceSkuProperties", + "@azure/arm-networkcloud!ProxyResource:interface": "Azure.ResourceManager.CommonTypes.ProxyResource", + "@azure/arm-networkcloud!RackSkuList:interface": "Microsoft.NetworkCloud.RackSkuList", + "@azure/arm-networkcloud!Rack:interface": "Microsoft.NetworkCloud.Rack", + "@azure/arm-networkcloud!RackProperties:interface": "Microsoft.NetworkCloud.RackProperties", + "@azure/arm-networkcloud!RackPatchParameters:interface": "Microsoft.NetworkCloud.RackPatchParameters", + "@azure/arm-networkcloud!RacksPatchProperties:interface": "Microsoft.NetworkCloud.RacksPatchProperties", + "@azure/arm-networkcloud!RackList:interface": "Microsoft.NetworkCloud.RackList", + "@azure/arm-networkcloud!StorageAppliance:interface": "Microsoft.NetworkCloud.StorageAppliance", + "@azure/arm-networkcloud!StorageApplianceProperties:interface": "Microsoft.NetworkCloud.StorageApplianceProperties", + "@azure/arm-networkcloud!StorageApplianceExpansionShelf:interface": "Microsoft.NetworkCloud.StorageApplianceExpansionShelf", + "@azure/arm-networkcloud!StorageApplianceMonitoringConfigurationStatus:interface": "Microsoft.NetworkCloud.StorageApplianceMonitoringConfigurationStatus", + "@azure/arm-networkcloud!StorageAppliancePatchParameters:interface": "Microsoft.NetworkCloud.StorageAppliancePatchParameters", + "@azure/arm-networkcloud!StorageAppliancePatchProperties:interface": "Microsoft.NetworkCloud.StorageAppliancePatchProperties", + "@azure/arm-networkcloud!StorageApplianceList:interface": "Microsoft.NetworkCloud.StorageApplianceList", + "@azure/arm-networkcloud!StorageApplianceEnableRemoteVendorManagementParameters:interface": "Microsoft.NetworkCloud.StorageApplianceEnableRemoteVendorManagementParameters", + "@azure/arm-networkcloud!StorageApplianceRunReadCommandsParameters:interface": "Microsoft.NetworkCloud.StorageApplianceRunReadCommandsParameters", + "@azure/arm-networkcloud!StorageApplianceCommandSpecification:interface": "Microsoft.NetworkCloud.StorageApplianceCommandSpecification", + "@azure/arm-networkcloud!TrunkedNetwork:interface": "Microsoft.NetworkCloud.TrunkedNetwork", + "@azure/arm-networkcloud!TrunkedNetworkProperties:interface": "Microsoft.NetworkCloud.TrunkedNetworkProperties", + "@azure/arm-networkcloud!TrunkedNetworkPatchParameters:interface": "Microsoft.NetworkCloud.TrunkedNetworkPatchParameters", + "@azure/arm-networkcloud!TrunkedNetworkList:interface": "Microsoft.NetworkCloud.TrunkedNetworkList", + "@azure/arm-networkcloud!VirtualMachine:interface": "Microsoft.NetworkCloud.VirtualMachine", + "@azure/arm-networkcloud!VirtualMachineProperties:interface": "Microsoft.NetworkCloud.VirtualMachineProperties", + "@azure/arm-networkcloud!VirtualMachinePlacementHint:interface": "Microsoft.NetworkCloud.VirtualMachinePlacementHint", + "@azure/arm-networkcloud!StorageProfile:interface": "Microsoft.NetworkCloud.StorageProfile", + "@azure/arm-networkcloud!OsDisk:interface": "Microsoft.NetworkCloud.OsDisk", + "@azure/arm-networkcloud!ImageRepositoryCredentials:interface": "Microsoft.NetworkCloud.ImageRepositoryCredentials", + "@azure/arm-networkcloud!VirtualMachinePatchParameters:interface": "Microsoft.NetworkCloud.VirtualMachinePatchParameters", + "@azure/arm-networkcloud!VirtualMachinePatchProperties:interface": "Microsoft.NetworkCloud.VirtualMachinePatchProperties", + "@azure/arm-networkcloud!VirtualMachineList:interface": "Microsoft.NetworkCloud.VirtualMachineList", + "@azure/arm-networkcloud!VirtualMachineAssignRelayParameters:interface": "Microsoft.NetworkCloud.VirtualMachineAssignRelayParameters", + "@azure/arm-networkcloud!VirtualMachinePowerOffParameters:interface": "Microsoft.NetworkCloud.VirtualMachinePowerOffParameters", + "@azure/arm-networkcloud!Volume:interface": "Microsoft.NetworkCloud.Volume", + "@azure/arm-networkcloud!VolumeProperties:interface": "Microsoft.NetworkCloud.VolumeProperties", + "@azure/arm-networkcloud!VolumePatchParameters:interface": "Microsoft.NetworkCloud.VolumePatchParameters", + "@azure/arm-networkcloud!VolumeList:interface": "Microsoft.NetworkCloud.VolumeList", + "@azure/arm-networkcloud!BareMetalMachineKeySet:interface": "Microsoft.NetworkCloud.BareMetalMachineKeySet", + "@azure/arm-networkcloud!BareMetalMachineKeySetProperties:interface": "Microsoft.NetworkCloud.BareMetalMachineKeySetProperties", + "@azure/arm-networkcloud!KeySetUser:interface": "Microsoft.NetworkCloud.KeySetUser", + "@azure/arm-networkcloud!KeySetUserStatus:interface": "Microsoft.NetworkCloud.KeySetUserStatus", + "@azure/arm-networkcloud!BareMetalMachineKeySetPatchParameters:interface": "Microsoft.NetworkCloud.BareMetalMachineKeySetPatchParameters", + "@azure/arm-networkcloud!BareMetalMachineKeySetPatchProperties:interface": "Microsoft.NetworkCloud.BareMetalMachineKeySetPatchProperties", + "@azure/arm-networkcloud!BareMetalMachineKeySetList:interface": "Microsoft.NetworkCloud.BareMetalMachineKeySetList", + "@azure/arm-networkcloud!BmcKeySet:interface": "Microsoft.NetworkCloud.BmcKeySet", + "@azure/arm-networkcloud!BmcKeySetProperties:interface": "Microsoft.NetworkCloud.BmcKeySetProperties", + "@azure/arm-networkcloud!BmcKeySetPatchParameters:interface": "Microsoft.NetworkCloud.BmcKeySetPatchParameters", + "@azure/arm-networkcloud!BmcKeySetPatchProperties:interface": "Microsoft.NetworkCloud.BmcKeySetPatchProperties", + "@azure/arm-networkcloud!BmcKeySetList:interface": "Microsoft.NetworkCloud.BmcKeySetList", + "@azure/arm-networkcloud!AgentPool:interface": "Microsoft.NetworkCloud.AgentPool", + "@azure/arm-networkcloud!AgentPoolProperties:interface": "Microsoft.NetworkCloud.AgentPoolProperties", + "@azure/arm-networkcloud!AgentPoolPatchParameters:interface": "Microsoft.NetworkCloud.AgentPoolPatchParameters", + "@azure/arm-networkcloud!AgentPoolPatchProperties:interface": "Microsoft.NetworkCloud.AgentPoolPatchProperties", + "@azure/arm-networkcloud!NodePoolAdministratorConfigurationPatch:interface": "Microsoft.NetworkCloud.NodePoolAdministratorConfigurationPatch", + "@azure/arm-networkcloud!AgentPoolList:interface": "Microsoft.NetworkCloud.AgentPoolList", + "@azure/arm-networkcloud!KubernetesClusterFeature:interface": "Microsoft.NetworkCloud.KubernetesClusterFeature", + "@azure/arm-networkcloud!KubernetesClusterFeatureProperties:interface": "Microsoft.NetworkCloud.KubernetesClusterFeatureProperties", + "@azure/arm-networkcloud!StringKeyValuePair:interface": "Microsoft.NetworkCloud.StringKeyValuePair", + "@azure/arm-networkcloud!KubernetesClusterFeaturePatchParameters:interface": "Microsoft.NetworkCloud.KubernetesClusterFeaturePatchParameters", + "@azure/arm-networkcloud!KubernetesClusterFeaturePatchProperties:interface": "Microsoft.NetworkCloud.KubernetesClusterFeaturePatchProperties", + "@azure/arm-networkcloud!KubernetesClusterFeatureList:interface": "Microsoft.NetworkCloud.KubernetesClusterFeatureList", + "@azure/arm-networkcloud!Console:interface": "Microsoft.NetworkCloud.Console", + "@azure/arm-networkcloud!ConsoleProperties:interface": "Microsoft.NetworkCloud.ConsoleProperties", + "@azure/arm-networkcloud!ConsolePatchParameters:interface": "Microsoft.NetworkCloud.ConsolePatchParameters", + "@azure/arm-networkcloud!ConsolePatchProperties:interface": "Microsoft.NetworkCloud.ConsolePatchProperties", + "@azure/arm-networkcloud!ConsoleList:interface": "Microsoft.NetworkCloud.ConsoleList", + "@azure/arm-networkcloud!ClusterMetricsConfiguration:interface": "Microsoft.NetworkCloud.ClusterMetricsConfiguration", + "@azure/arm-networkcloud!ClusterMetricsConfigurationProperties:interface": "Microsoft.NetworkCloud.ClusterMetricsConfigurationProperties", + "@azure/arm-networkcloud!ClusterMetricsConfigurationPatchParameters:interface": "Microsoft.NetworkCloud.ClusterMetricsConfigurationPatchParameters", + "@azure/arm-networkcloud!ClusterMetricsConfigurationPatchProperties:interface": "Microsoft.NetworkCloud.ClusterMetricsConfigurationPatchProperties", + "@azure/arm-networkcloud!ClusterMetricsConfigurationList:interface": "Microsoft.NetworkCloud.ClusterMetricsConfigurationList", + "@azure/arm-networkcloud!KnownOrigin:enum": "Azure.ResourceManager.CommonTypes.Origin", + "@azure/arm-networkcloud!KnownActionType:enum": "Azure.ResourceManager.CommonTypes.ActionType", + "@azure/arm-networkcloud!KnownAccessBridgeAllowedName:enum": "Microsoft.NetworkCloud.AccessBridgeAllowedName", + "@azure/arm-networkcloud!KnownSecurityRuleDirection:enum": "Microsoft.NetworkCloud.SecurityRuleDirection", + "@azure/arm-networkcloud!KnownAccessBridgeDetailedStatus:enum": "Microsoft.NetworkCloud.AccessBridgeDetailedStatus", + "@azure/arm-networkcloud!KnownTransportProtocol:enum": "Microsoft.NetworkCloud.TransportProtocol", + "@azure/arm-networkcloud!KnownAccessBridgeProvisioningState:enum": "Microsoft.NetworkCloud.AccessBridgeProvisioningState", + "@azure/arm-networkcloud!KnownExtendedLocationType:enum": "Azure.ResourceManager.CommonTypes.ExtendedLocationType", + "@azure/arm-networkcloud!KnowncreatedByType:enum": "Azure.ResourceManager.CommonTypes.createdByType", + "@azure/arm-networkcloud!KnownResourceProvisioningState:enum": "Azure.ResourceManager.ResourceProvisioningState", + "@azure/arm-networkcloud!KnownActionStateStatus:enum": "Microsoft.NetworkCloud.ActionStateStatus", + "@azure/arm-networkcloud!KnownStepStateStatus:enum": "Microsoft.NetworkCloud.StepStateStatus", + "@azure/arm-networkcloud!KnownBareMetalMachineCordonStatus:enum": "Microsoft.NetworkCloud.BareMetalMachineCordonStatus", + "@azure/arm-networkcloud!KnownBareMetalMachineDetailedStatus:enum": "Microsoft.NetworkCloud.BareMetalMachineDetailedStatus", + "@azure/arm-networkcloud!KnownBareMetalMachineHardwareValidationResult:enum": "Microsoft.NetworkCloud.BareMetalMachineHardwareValidationResult", + "@azure/arm-networkcloud!KnownBareMetalMachineMetricsConfigurationStatusLogLevel:enum": "Microsoft.NetworkCloud.BareMetalMachineMetricsConfigurationStatusLogLevel", + "@azure/arm-networkcloud!KnownBareMetalMachineMetricsConfigurationStatusMetricsLevel:enum": "Microsoft.NetworkCloud.BareMetalMachineMetricsConfigurationStatusMetricsLevel", + "@azure/arm-networkcloud!KnownBareMetalMachinePowerState:enum": "Microsoft.NetworkCloud.BareMetalMachinePowerState", + "@azure/arm-networkcloud!KnownBareMetalMachineReadyState:enum": "Microsoft.NetworkCloud.BareMetalMachineReadyState", + "@azure/arm-networkcloud!KnownRuntimeProtectionAgentHealthStatus:enum": "Microsoft.NetworkCloud.RuntimeProtectionAgentHealthStatus", + "@azure/arm-networkcloud!KnownRuntimeProtectionAgentLicenseStatus:enum": "Microsoft.NetworkCloud.RuntimeProtectionAgentLicenseStatus", + "@azure/arm-networkcloud!KnownRuntimeProtectionDefinitionUpdateMode:enum": "Microsoft.NetworkCloud.RuntimeProtectionDefinitionUpdateMode", + "@azure/arm-networkcloud!KnownRuntimeProtectionEnforcementLevel:enum": "Microsoft.NetworkCloud.RuntimeProtectionEnforcementLevel", + "@azure/arm-networkcloud!KnownBareMetalMachineProvisioningState:enum": "Microsoft.NetworkCloud.BareMetalMachineProvisioningState", + "@azure/arm-networkcloud!KnownBareMetalMachineEvacuate:enum": "Microsoft.NetworkCloud.BareMetalMachineEvacuate", + "@azure/arm-networkcloud!KnownBareMetalMachineSkipShutdown:enum": "Microsoft.NetworkCloud.BareMetalMachineSkipShutdown", + "@azure/arm-networkcloud!KnownBareMetalMachineReimageSafeguardMode:enum": "Microsoft.NetworkCloud.BareMetalMachineReimageSafeguardMode", + "@azure/arm-networkcloud!KnownBareMetalMachineReplaceSafeguardMode:enum": "Microsoft.NetworkCloud.BareMetalMachineReplaceSafeguardMode", + "@azure/arm-networkcloud!KnownBareMetalMachineReplaceStoragePolicy:enum": "Microsoft.NetworkCloud.BareMetalMachineReplaceStoragePolicy", + "@azure/arm-networkcloud!KnownCloudServicesNetworkEnableDefaultEgressEndpoints:enum": "Microsoft.NetworkCloud.CloudServicesNetworkEnableDefaultEgressEndpoints", + "@azure/arm-networkcloud!KnownCloudServicesNetworkStorageMode:enum": "Microsoft.NetworkCloud.CloudServicesNetworkStorageMode", + "@azure/arm-networkcloud!KnownCloudServicesNetworkDetailedStatus:enum": "Microsoft.NetworkCloud.CloudServicesNetworkDetailedStatus", + "@azure/arm-networkcloud!KnownCloudServicesNetworkStorageStatusStatus:enum": "Microsoft.NetworkCloud.CloudServicesNetworkStorageStatusStatus", + "@azure/arm-networkcloud!KnownCloudServicesNetworkProvisioningState:enum": "Microsoft.NetworkCloud.CloudServicesNetworkProvisioningState", + "@azure/arm-networkcloud!KnownClusterManagerDetailedStatus:enum": "Microsoft.NetworkCloud.ClusterManagerDetailedStatus", + "@azure/arm-networkcloud!KnownClusterManagerProvisioningState:enum": "Microsoft.NetworkCloud.ClusterManagerProvisioningState", + "@azure/arm-networkcloud!KnownManagedServiceIdentityType:enum": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "@azure/arm-networkcloud!KnownDeploymentType:enum": "Microsoft.NetworkCloud.DeploymentType", + "@azure/arm-networkcloud!KnownRelayPrivateEndpointConnectionState:enum": "Microsoft.NetworkCloud.RelayPrivateEndpointConnectionState", + "@azure/arm-networkcloud!KnownManagedServiceIdentitySelectorType:enum": "Microsoft.NetworkCloud.ManagedServiceIdentitySelectorType", + "@azure/arm-networkcloud!KnownClusterType:enum": "Microsoft.NetworkCloud.ClusterType", + "@azure/arm-networkcloud!KnownCommandOutputType:enum": "Microsoft.NetworkCloud.CommandOutputType", + "@azure/arm-networkcloud!KnownValidationThresholdGrouping:enum": "Microsoft.NetworkCloud.ValidationThresholdGrouping", + "@azure/arm-networkcloud!KnownValidationThresholdType:enum": "Microsoft.NetworkCloud.ValidationThresholdType", + "@azure/arm-networkcloud!KnownClusterSecretArchiveEnabled:enum": "Microsoft.NetworkCloud.ClusterSecretArchiveEnabled", + "@azure/arm-networkcloud!KnownClusterUpdateStrategyType:enum": "Microsoft.NetworkCloud.ClusterUpdateStrategyType", + "@azure/arm-networkcloud!KnownVulnerabilityScanningSettingsContainerScan:enum": "Microsoft.NetworkCloud.VulnerabilityScanningSettingsContainerScan", + "@azure/arm-networkcloud!KnownControlImpact:enum": "Microsoft.NetworkCloud.ControlImpact", + "@azure/arm-networkcloud!KnownWorkloadImpact:enum": "Microsoft.NetworkCloud.WorkloadImpact", + "@azure/arm-networkcloud!KnownClusterConnectionStatus:enum": "Microsoft.NetworkCloud.ClusterConnectionStatus", + "@azure/arm-networkcloud!KnownClusterManagerConnectionStatus:enum": "Microsoft.NetworkCloud.ClusterManagerConnectionStatus", + "@azure/arm-networkcloud!KnownClusterDetailedStatus:enum": "Microsoft.NetworkCloud.ClusterDetailedStatus", + "@azure/arm-networkcloud!KnownClusterProvisioningState:enum": "Microsoft.NetworkCloud.ClusterProvisioningState", + "@azure/arm-networkcloud!KnownClusterContinueUpdateVersionMachineGroupTargetingMode:enum": "Microsoft.NetworkCloud.ClusterContinueUpdateVersionMachineGroupTargetingMode", + "@azure/arm-networkcloud!KnownClusterContinueUpdateVersionSafeguardMode:enum": "Microsoft.NetworkCloud.ClusterContinueUpdateVersionSafeguardMode", + "@azure/arm-networkcloud!KnownClusterInspectAdditionalAction:enum": "Microsoft.NetworkCloud.ClusterInspectAdditionalAction", + "@azure/arm-networkcloud!KnownClusterScanRuntimeParametersScanActivity:enum": "Microsoft.NetworkCloud.ClusterScanRuntimeParametersScanActivity", + "@azure/arm-networkcloud!KnownClusterUpdateVersionSafeguardMode:enum": "Microsoft.NetworkCloud.ClusterUpdateVersionSafeguardMode", + "@azure/arm-networkcloud!KnownHugepagesSize:enum": "Microsoft.NetworkCloud.HugepagesSize", + "@azure/arm-networkcloud!KnownKubernetesPluginType:enum": "Microsoft.NetworkCloud.KubernetesPluginType", + "@azure/arm-networkcloud!KnownL3NetworkConfigurationIpamEnabled:enum": "Microsoft.NetworkCloud.L3NetworkConfigurationIpamEnabled", + "@azure/arm-networkcloud!KnownAgentPoolMode:enum": "Microsoft.NetworkCloud.AgentPoolMode", + "@azure/arm-networkcloud!KnownAdvertiseToFabric:enum": "Microsoft.NetworkCloud.AdvertiseToFabric", + "@azure/arm-networkcloud!KnownBfdEnabled:enum": "Microsoft.NetworkCloud.BfdEnabled", + "@azure/arm-networkcloud!KnownBgpMultiHop:enum": "Microsoft.NetworkCloud.BgpMultiHop", + "@azure/arm-networkcloud!KnownFabricPeeringEnabled:enum": "Microsoft.NetworkCloud.FabricPeeringEnabled", + "@azure/arm-networkcloud!KnownAvailabilityLifecycle:enum": "Microsoft.NetworkCloud.AvailabilityLifecycle", + "@azure/arm-networkcloud!KnownKubernetesClusterDetailedStatus:enum": "Microsoft.NetworkCloud.KubernetesClusterDetailedStatus", + "@azure/arm-networkcloud!KnownFeatureDetailedStatus:enum": "Microsoft.NetworkCloud.FeatureDetailedStatus", + "@azure/arm-networkcloud!KnownKubernetesClusterNodeDetailedStatus:enum": "Microsoft.NetworkCloud.KubernetesClusterNodeDetailedStatus", + "@azure/arm-networkcloud!KnownDefaultGateway:enum": "Microsoft.NetworkCloud.DefaultGateway", + "@azure/arm-networkcloud!KnownVirtualMachineIPAllocationMethod:enum": "Microsoft.NetworkCloud.VirtualMachineIPAllocationMethod", + "@azure/arm-networkcloud!KnownKubernetesNodePowerState:enum": "Microsoft.NetworkCloud.KubernetesNodePowerState", + "@azure/arm-networkcloud!KnownKubernetesNodeRole:enum": "Microsoft.NetworkCloud.KubernetesNodeRole", + "@azure/arm-networkcloud!KnownKubernetesClusterProvisioningState:enum": "Microsoft.NetworkCloud.KubernetesClusterProvisioningState", + "@azure/arm-networkcloud!KnownKubernetesVersionProvisioningState:enum": "Microsoft.NetworkCloud.KubernetesVersionProvisioningState", + "@azure/arm-networkcloud!KnownHybridAksPluginType:enum": "Microsoft.NetworkCloud.HybridAksPluginType", + "@azure/arm-networkcloud!KnownL2NetworkDetailedStatus:enum": "Microsoft.NetworkCloud.L2NetworkDetailedStatus", + "@azure/arm-networkcloud!KnownL2NetworkProvisioningState:enum": "Microsoft.NetworkCloud.L2NetworkProvisioningState", + "@azure/arm-networkcloud!KnownHybridAksIpamEnabled:enum": "Microsoft.NetworkCloud.HybridAksIpamEnabled", + "@azure/arm-networkcloud!KnownIpAllocationType:enum": "Microsoft.NetworkCloud.IpAllocationType", + "@azure/arm-networkcloud!KnownL3NetworkDetailedStatus:enum": "Microsoft.NetworkCloud.L3NetworkDetailedStatus", + "@azure/arm-networkcloud!KnownL3NetworkProvisioningState:enum": "Microsoft.NetworkCloud.L3NetworkProvisioningState", + "@azure/arm-networkcloud!KnownBootstrapProtocol:enum": "Microsoft.NetworkCloud.BootstrapProtocol", + "@azure/arm-networkcloud!KnownMachineSkuDiskConnectionType:enum": "Microsoft.NetworkCloud.MachineSkuDiskConnectionType", + "@azure/arm-networkcloud!KnownDiskType:enum": "Microsoft.NetworkCloud.DiskType", + "@azure/arm-networkcloud!KnownDeviceConnectionType:enum": "Microsoft.NetworkCloud.DeviceConnectionType", + "@azure/arm-networkcloud!KnownRackSkuProvisioningState:enum": "Microsoft.NetworkCloud.RackSkuProvisioningState", + "@azure/arm-networkcloud!KnownRackSkuType:enum": "Microsoft.NetworkCloud.RackSkuType", + "@azure/arm-networkcloud!KnownRackDetailedStatus:enum": "Microsoft.NetworkCloud.RackDetailedStatus", + "@azure/arm-networkcloud!KnownRackProvisioningState:enum": "Microsoft.NetworkCloud.RackProvisioningState", + "@azure/arm-networkcloud!KnownStorageApplianceDetailedStatus:enum": "Microsoft.NetworkCloud.StorageApplianceDetailedStatus", + "@azure/arm-networkcloud!KnownStorageApplianceMetricsConfigurationStatusLogLevel:enum": "Microsoft.NetworkCloud.StorageApplianceMetricsConfigurationStatusLogLevel", + "@azure/arm-networkcloud!KnownStorageApplianceMetricsConfigurationStatusMetricsLevel:enum": "Microsoft.NetworkCloud.StorageApplianceMetricsConfigurationStatusMetricsLevel", + "@azure/arm-networkcloud!KnownRemoteVendorManagementFeature:enum": "Microsoft.NetworkCloud.RemoteVendorManagementFeature", + "@azure/arm-networkcloud!KnownRemoteVendorManagementStatus:enum": "Microsoft.NetworkCloud.RemoteVendorManagementStatus", + "@azure/arm-networkcloud!KnownStorageApplianceProvisioningState:enum": "Microsoft.NetworkCloud.StorageApplianceProvisioningState", + "@azure/arm-networkcloud!KnownTrunkedNetworkDetailedStatus:enum": "Microsoft.NetworkCloud.TrunkedNetworkDetailedStatus", + "@azure/arm-networkcloud!KnownTrunkedNetworkProvisioningState:enum": "Microsoft.NetworkCloud.TrunkedNetworkProvisioningState", + "@azure/arm-networkcloud!KnownVirtualMachineBootMethod:enum": "Microsoft.NetworkCloud.VirtualMachineBootMethod", + "@azure/arm-networkcloud!KnownVirtualMachineIsolateEmulatorThread:enum": "Microsoft.NetworkCloud.VirtualMachineIsolateEmulatorThread", + "@azure/arm-networkcloud!KnownVirtualMachinePlacementHintType:enum": "Microsoft.NetworkCloud.VirtualMachinePlacementHintType", + "@azure/arm-networkcloud!KnownVirtualMachineSchedulingExecution:enum": "Microsoft.NetworkCloud.VirtualMachineSchedulingExecution", + "@azure/arm-networkcloud!KnownVirtualMachinePlacementHintPodAffinityScope:enum": "Microsoft.NetworkCloud.VirtualMachinePlacementHintPodAffinityScope", + "@azure/arm-networkcloud!KnownOsDiskCreateOption:enum": "Microsoft.NetworkCloud.OsDiskCreateOption", + "@azure/arm-networkcloud!KnownOsDiskDeleteOption:enum": "Microsoft.NetworkCloud.OsDiskDeleteOption", + "@azure/arm-networkcloud!KnownVirtualMachineVirtioInterfaceType:enum": "Microsoft.NetworkCloud.VirtualMachineVirtioInterfaceType", + "@azure/arm-networkcloud!KnownVirtualMachineDeviceModelType:enum": "Microsoft.NetworkCloud.VirtualMachineDeviceModelType", + "@azure/arm-networkcloud!KnownVirtualMachineDetailedStatus:enum": "Microsoft.NetworkCloud.VirtualMachineDetailedStatus", + "@azure/arm-networkcloud!KnownVirtualMachinePowerState:enum": "Microsoft.NetworkCloud.VirtualMachinePowerState", + "@azure/arm-networkcloud!KnownVirtualMachineProvisioningState:enum": "Microsoft.NetworkCloud.VirtualMachineProvisioningState", + "@azure/arm-networkcloud!KnownRelayType:enum": "Microsoft.NetworkCloud.RelayType", + "@azure/arm-networkcloud!KnownSkipShutdown:enum": "Microsoft.NetworkCloud.SkipShutdown", + "@azure/arm-networkcloud!KnownVolumeDetailedStatus:enum": "Microsoft.NetworkCloud.VolumeDetailedStatus", + "@azure/arm-networkcloud!KnownVolumeProvisioningState:enum": "Microsoft.NetworkCloud.VolumeProvisioningState", + "@azure/arm-networkcloud!KnownBareMetalMachineKeySetPrivilegeLevel:enum": "Microsoft.NetworkCloud.BareMetalMachineKeySetPrivilegeLevel", + "@azure/arm-networkcloud!KnownBareMetalMachineKeySetDetailedStatus:enum": "Microsoft.NetworkCloud.BareMetalMachineKeySetDetailedStatus", + "@azure/arm-networkcloud!KnownBareMetalMachineKeySetUserSetupStatus:enum": "Microsoft.NetworkCloud.BareMetalMachineKeySetUserSetupStatus", + "@azure/arm-networkcloud!KnownBareMetalMachineKeySetProvisioningState:enum": "Microsoft.NetworkCloud.BareMetalMachineKeySetProvisioningState", + "@azure/arm-networkcloud!KnownBmcKeySetPrivilegeLevel:enum": "Microsoft.NetworkCloud.BmcKeySetPrivilegeLevel", + "@azure/arm-networkcloud!KnownBmcKeySetDetailedStatus:enum": "Microsoft.NetworkCloud.BmcKeySetDetailedStatus", + "@azure/arm-networkcloud!KnownBmcKeySetProvisioningState:enum": "Microsoft.NetworkCloud.BmcKeySetProvisioningState", + "@azure/arm-networkcloud!KnownAgentPoolDetailedStatus:enum": "Microsoft.NetworkCloud.AgentPoolDetailedStatus", + "@azure/arm-networkcloud!KnownAgentPoolProvisioningState:enum": "Microsoft.NetworkCloud.AgentPoolProvisioningState", + "@azure/arm-networkcloud!KnownKubernetesClusterFeatureAvailabilityLifecycle:enum": "Microsoft.NetworkCloud.KubernetesClusterFeatureAvailabilityLifecycle", + "@azure/arm-networkcloud!KnownKubernetesClusterFeatureDetailedStatus:enum": "Microsoft.NetworkCloud.KubernetesClusterFeatureDetailedStatus", + "@azure/arm-networkcloud!KnownKubernetesClusterFeatureRequired:enum": "Microsoft.NetworkCloud.KubernetesClusterFeatureRequired", + "@azure/arm-networkcloud!KnownKubernetesClusterFeatureProvisioningState:enum": "Microsoft.NetworkCloud.KubernetesClusterFeatureProvisioningState", + "@azure/arm-networkcloud!KnownConsoleEnabled:enum": "Microsoft.NetworkCloud.ConsoleEnabled", + "@azure/arm-networkcloud!KnownConsoleDetailedStatus:enum": "Microsoft.NetworkCloud.ConsoleDetailedStatus", + "@azure/arm-networkcloud!KnownConsoleProvisioningState:enum": "Microsoft.NetworkCloud.ConsoleProvisioningState", + "@azure/arm-networkcloud!KnownClusterMetricsConfigurationDetailedStatus:enum": "Microsoft.NetworkCloud.ClusterMetricsConfigurationDetailedStatus", + "@azure/arm-networkcloud!KnownClusterMetricsConfigurationProvisioningState:enum": "Microsoft.NetworkCloud.ClusterMetricsConfigurationProvisioningState", + "@azure/arm-networkcloud!KnownVersions:enum": "Microsoft.NetworkCloud.Versions", + "@azure/arm-networkcloud!ManagedServiceIdentityUserAssignedIdentity:type": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentity.anonymous", + "@azure/arm-networkcloud!MetricsConfigurationsOperations#listByCluster:member": "Microsoft.NetworkCloud.ClusterMetricsConfigurations.listByCluster", + "@azure/arm-networkcloud!MetricsConfigurationsOperations#delete:member": "Microsoft.NetworkCloud.ClusterMetricsConfigurations.delete", + "@azure/arm-networkcloud!MetricsConfigurationsOperations#update:member": "Microsoft.NetworkCloud.ClusterMetricsConfigurations.update", + "@azure/arm-networkcloud!MetricsConfigurationsOperations#createOrUpdate:member": "Microsoft.NetworkCloud.ClusterMetricsConfigurations.createOrUpdate", + "@azure/arm-networkcloud!MetricsConfigurationsOperations#get:member": "Microsoft.NetworkCloud.ClusterMetricsConfigurations.get", + "@azure/arm-networkcloud!ConsolesOperations#listByVirtualMachine:member": "Microsoft.NetworkCloud.Consoles.listByVirtualMachine", + "@azure/arm-networkcloud!ConsolesOperations#delete:member": "Microsoft.NetworkCloud.Consoles.delete", + "@azure/arm-networkcloud!ConsolesOperations#update:member": "Microsoft.NetworkCloud.Consoles.update", + "@azure/arm-networkcloud!ConsolesOperations#createOrUpdate:member": "Microsoft.NetworkCloud.Consoles.createOrUpdate", + "@azure/arm-networkcloud!ConsolesOperations#get:member": "Microsoft.NetworkCloud.Consoles.get", + "@azure/arm-networkcloud!KubernetesClusterFeaturesOperations#listByKubernetesCluster:member": "Microsoft.NetworkCloud.KubernetesClusterFeatures.listByKubernetesCluster", + "@azure/arm-networkcloud!KubernetesClusterFeaturesOperations#delete:member": "Microsoft.NetworkCloud.KubernetesClusterFeatures.delete", + "@azure/arm-networkcloud!KubernetesClusterFeaturesOperations#update:member": "Microsoft.NetworkCloud.KubernetesClusterFeatures.update", + "@azure/arm-networkcloud!KubernetesClusterFeaturesOperations#createOrUpdate:member": "Microsoft.NetworkCloud.KubernetesClusterFeatures.createOrUpdate", + "@azure/arm-networkcloud!KubernetesClusterFeaturesOperations#get:member": "Microsoft.NetworkCloud.KubernetesClusterFeatures.get", + "@azure/arm-networkcloud!AgentPoolsOperations#listByKubernetesCluster:member": "Microsoft.NetworkCloud.AgentPools.listByKubernetesCluster", + "@azure/arm-networkcloud!AgentPoolsOperations#delete:member": "Microsoft.NetworkCloud.AgentPools.delete", + "@azure/arm-networkcloud!AgentPoolsOperations#update:member": "Microsoft.NetworkCloud.AgentPools.update", + "@azure/arm-networkcloud!AgentPoolsOperations#createOrUpdate:member": "Microsoft.NetworkCloud.AgentPools.createOrUpdate", + "@azure/arm-networkcloud!AgentPoolsOperations#get:member": "Microsoft.NetworkCloud.AgentPools.get", + "@azure/arm-networkcloud!BmcKeySetsOperations#listByCluster:member": "Microsoft.NetworkCloud.BmcKeySets.listByCluster", + "@azure/arm-networkcloud!BmcKeySetsOperations#delete:member": "Microsoft.NetworkCloud.BmcKeySets.delete", + "@azure/arm-networkcloud!BmcKeySetsOperations#update:member": "Microsoft.NetworkCloud.BmcKeySets.update", + "@azure/arm-networkcloud!BmcKeySetsOperations#createOrUpdate:member": "Microsoft.NetworkCloud.BmcKeySets.createOrUpdate", + "@azure/arm-networkcloud!BmcKeySetsOperations#get:member": "Microsoft.NetworkCloud.BmcKeySets.get", + "@azure/arm-networkcloud!BareMetalMachineKeySetsOperations#listByCluster:member": "Microsoft.NetworkCloud.BareMetalMachineKeySets.listByCluster", + "@azure/arm-networkcloud!BareMetalMachineKeySetsOperations#delete:member": "Microsoft.NetworkCloud.BareMetalMachineKeySets.delete", + "@azure/arm-networkcloud!BareMetalMachineKeySetsOperations#update:member": "Microsoft.NetworkCloud.BareMetalMachineKeySets.update", + "@azure/arm-networkcloud!BareMetalMachineKeySetsOperations#createOrUpdate:member": "Microsoft.NetworkCloud.BareMetalMachineKeySets.createOrUpdate", + "@azure/arm-networkcloud!BareMetalMachineKeySetsOperations#get:member": "Microsoft.NetworkCloud.BareMetalMachineKeySets.get", + "@azure/arm-networkcloud!VolumesOperations#listBySubscription:member": "Microsoft.NetworkCloud.Volumes.listBySubscription", + "@azure/arm-networkcloud!VolumesOperations#listByResourceGroup:member": "Microsoft.NetworkCloud.Volumes.listByResourceGroup", + "@azure/arm-networkcloud!VolumesOperations#delete:member": "Microsoft.NetworkCloud.Volumes.delete", + "@azure/arm-networkcloud!VolumesOperations#update:member": "Microsoft.NetworkCloud.Volumes.update", + "@azure/arm-networkcloud!VolumesOperations#createOrUpdate:member": "Microsoft.NetworkCloud.Volumes.createOrUpdate", + "@azure/arm-networkcloud!VolumesOperations#get:member": "Microsoft.NetworkCloud.Volumes.get", + "@azure/arm-networkcloud!VirtualMachinesOperations#start:member": "Microsoft.NetworkCloud.VirtualMachines.start", + "@azure/arm-networkcloud!VirtualMachinesOperations#restart:member": "Microsoft.NetworkCloud.VirtualMachines.restart", + "@azure/arm-networkcloud!VirtualMachinesOperations#reimage:member": "Microsoft.NetworkCloud.VirtualMachines.reimage", + "@azure/arm-networkcloud!VirtualMachinesOperations#powerOff:member": "Microsoft.NetworkCloud.VirtualMachines.powerOff", + "@azure/arm-networkcloud!VirtualMachinesOperations#assignRelay:member": "Microsoft.NetworkCloud.VirtualMachines.assignRelay", + "@azure/arm-networkcloud!VirtualMachinesOperations#listBySubscription:member": "Microsoft.NetworkCloud.VirtualMachines.listBySubscription", + "@azure/arm-networkcloud!VirtualMachinesOperations#listByResourceGroup:member": "Microsoft.NetworkCloud.VirtualMachines.listByResourceGroup", + "@azure/arm-networkcloud!VirtualMachinesOperations#delete:member": "Microsoft.NetworkCloud.VirtualMachines.delete", + "@azure/arm-networkcloud!VirtualMachinesOperations#update:member": "Microsoft.NetworkCloud.VirtualMachines.update", + "@azure/arm-networkcloud!VirtualMachinesOperations#createOrUpdate:member": "Microsoft.NetworkCloud.VirtualMachines.createOrUpdate", + "@azure/arm-networkcloud!VirtualMachinesOperations#get:member": "Microsoft.NetworkCloud.VirtualMachines.get", + "@azure/arm-networkcloud!TrunkedNetworksOperations#listBySubscription:member": "Microsoft.NetworkCloud.TrunkedNetworks.listBySubscription", + "@azure/arm-networkcloud!TrunkedNetworksOperations#listByResourceGroup:member": "Microsoft.NetworkCloud.TrunkedNetworks.listByResourceGroup", + "@azure/arm-networkcloud!TrunkedNetworksOperations#delete:member": "Microsoft.NetworkCloud.TrunkedNetworks.delete", + "@azure/arm-networkcloud!TrunkedNetworksOperations#update:member": "Microsoft.NetworkCloud.TrunkedNetworks.update", + "@azure/arm-networkcloud!TrunkedNetworksOperations#createOrUpdate:member": "Microsoft.NetworkCloud.TrunkedNetworks.createOrUpdate", + "@azure/arm-networkcloud!TrunkedNetworksOperations#get:member": "Microsoft.NetworkCloud.TrunkedNetworks.get", + "@azure/arm-networkcloud!StorageAppliancesOperations#runReadCommands:member": "Microsoft.NetworkCloud.StorageAppliances.runReadCommands", + "@azure/arm-networkcloud!StorageAppliancesOperations#enableRemoteVendorManagement:member": "Microsoft.NetworkCloud.StorageAppliances.enableRemoteVendorManagement", + "@azure/arm-networkcloud!StorageAppliancesOperations#disableRemoteVendorManagement:member": "Microsoft.NetworkCloud.StorageAppliances.disableRemoteVendorManagement", + "@azure/arm-networkcloud!StorageAppliancesOperations#listBySubscription:member": "Microsoft.NetworkCloud.StorageAppliances.listBySubscription", + "@azure/arm-networkcloud!StorageAppliancesOperations#listByResourceGroup:member": "Microsoft.NetworkCloud.StorageAppliances.listByResourceGroup", + "@azure/arm-networkcloud!StorageAppliancesOperations#delete:member": "Microsoft.NetworkCloud.StorageAppliances.delete", + "@azure/arm-networkcloud!StorageAppliancesOperations#update:member": "Microsoft.NetworkCloud.StorageAppliances.update", + "@azure/arm-networkcloud!StorageAppliancesOperations#createOrUpdate:member": "Microsoft.NetworkCloud.StorageAppliances.createOrUpdate", + "@azure/arm-networkcloud!StorageAppliancesOperations#get:member": "Microsoft.NetworkCloud.StorageAppliances.get", + "@azure/arm-networkcloud!RacksOperations#listBySubscription:member": "Microsoft.NetworkCloud.Racks.listBySubscription", + "@azure/arm-networkcloud!RacksOperations#listByResourceGroup:member": "Microsoft.NetworkCloud.Racks.listByResourceGroup", + "@azure/arm-networkcloud!RacksOperations#delete:member": "Microsoft.NetworkCloud.Racks.delete", + "@azure/arm-networkcloud!RacksOperations#update:member": "Microsoft.NetworkCloud.Racks.update", + "@azure/arm-networkcloud!RacksOperations#createOrUpdate:member": "Microsoft.NetworkCloud.Racks.createOrUpdate", + "@azure/arm-networkcloud!RacksOperations#get:member": "Microsoft.NetworkCloud.Racks.get", + "@azure/arm-networkcloud!RackSkusOperations#listBySubscription:member": "Microsoft.NetworkCloud.RackSkus.listBySubscription", + "@azure/arm-networkcloud!RackSkusOperations#get:member": "Microsoft.NetworkCloud.RackSkus.get", + "@azure/arm-networkcloud!L3NetworksOperations#listBySubscription:member": "Microsoft.NetworkCloud.L3Networks.listBySubscription", + "@azure/arm-networkcloud!L3NetworksOperations#listByResourceGroup:member": "Microsoft.NetworkCloud.L3Networks.listByResourceGroup", + "@azure/arm-networkcloud!L3NetworksOperations#delete:member": "Microsoft.NetworkCloud.L3Networks.delete", + "@azure/arm-networkcloud!L3NetworksOperations#update:member": "Microsoft.NetworkCloud.L3Networks.update", + "@azure/arm-networkcloud!L3NetworksOperations#createOrUpdate:member": "Microsoft.NetworkCloud.L3Networks.createOrUpdate", + "@azure/arm-networkcloud!L3NetworksOperations#get:member": "Microsoft.NetworkCloud.L3Networks.get", + "@azure/arm-networkcloud!L2NetworksOperations#listBySubscription:member": "Microsoft.NetworkCloud.L2Networks.listBySubscription", + "@azure/arm-networkcloud!L2NetworksOperations#listByResourceGroup:member": "Microsoft.NetworkCloud.L2Networks.listByResourceGroup", + "@azure/arm-networkcloud!L2NetworksOperations#delete:member": "Microsoft.NetworkCloud.L2Networks.delete", + "@azure/arm-networkcloud!L2NetworksOperations#update:member": "Microsoft.NetworkCloud.L2Networks.update", + "@azure/arm-networkcloud!L2NetworksOperations#createOrUpdate:member": "Microsoft.NetworkCloud.L2Networks.createOrUpdate", + "@azure/arm-networkcloud!L2NetworksOperations#get:member": "Microsoft.NetworkCloud.L2Networks.get", + "@azure/arm-networkcloud!KubernetesVersionsOperations#listBySubscription:member": "Microsoft.NetworkCloud.KubernetesVersions.listBySubscription", + "@azure/arm-networkcloud!KubernetesVersionsOperations#listByResourceGroup:member": "Microsoft.NetworkCloud.KubernetesVersions.listByResourceGroup", + "@azure/arm-networkcloud!KubernetesVersionsOperations#delete:member": "Microsoft.NetworkCloud.KubernetesVersions.delete", + "@azure/arm-networkcloud!KubernetesVersionsOperations#update:member": "Microsoft.NetworkCloud.KubernetesVersions.update", + "@azure/arm-networkcloud!KubernetesVersionsOperations#createOrUpdate:member": "Microsoft.NetworkCloud.KubernetesVersions.createOrUpdate", + "@azure/arm-networkcloud!KubernetesVersionsOperations#get:member": "Microsoft.NetworkCloud.KubernetesVersions.get", + "@azure/arm-networkcloud!KubernetesClustersOperations#restartNode:member": "Microsoft.NetworkCloud.KubernetesClusters.restartNode", + "@azure/arm-networkcloud!KubernetesClustersOperations#listBySubscription:member": "Microsoft.NetworkCloud.KubernetesClusters.listBySubscription", + "@azure/arm-networkcloud!KubernetesClustersOperations#listByResourceGroup:member": "Microsoft.NetworkCloud.KubernetesClusters.listByResourceGroup", + "@azure/arm-networkcloud!KubernetesClustersOperations#delete:member": "Microsoft.NetworkCloud.KubernetesClusters.delete", + "@azure/arm-networkcloud!KubernetesClustersOperations#update:member": "Microsoft.NetworkCloud.KubernetesClusters.update", + "@azure/arm-networkcloud!KubernetesClustersOperations#createOrUpdate:member": "Microsoft.NetworkCloud.KubernetesClusters.createOrUpdate", + "@azure/arm-networkcloud!KubernetesClustersOperations#get:member": "Microsoft.NetworkCloud.KubernetesClusters.get", + "@azure/arm-networkcloud!ClustersOperations#updateVersion:member": "Microsoft.NetworkCloud.Clusters.updateVersion", + "@azure/arm-networkcloud!ClustersOperations#scanRuntime:member": "Microsoft.NetworkCloud.Clusters.scanRuntime", + "@azure/arm-networkcloud!ClustersOperations#rotateCredential:member": "Microsoft.NetworkCloud.Clusters.rotateCredential", + "@azure/arm-networkcloud!ClustersOperations#inspect:member": "Microsoft.NetworkCloud.Clusters.inspect", + "@azure/arm-networkcloud!ClustersOperations#deploy:member": "Microsoft.NetworkCloud.Clusters.deploy", + "@azure/arm-networkcloud!ClustersOperations#continueUpdateVersion:member": "Microsoft.NetworkCloud.Clusters.continueUpdateVersion", + "@azure/arm-networkcloud!ClustersOperations#listBySubscription:member": "Microsoft.NetworkCloud.Clusters.listBySubscription", + "@azure/arm-networkcloud!ClustersOperations#listByResourceGroup:member": "Microsoft.NetworkCloud.Clusters.listByResourceGroup", + "@azure/arm-networkcloud!ClustersOperations#delete:member": "Microsoft.NetworkCloud.Clusters.delete", + "@azure/arm-networkcloud!ClustersOperations#update:member": "Microsoft.NetworkCloud.Clusters.update", + "@azure/arm-networkcloud!ClustersOperations#createOrUpdate:member": "Microsoft.NetworkCloud.Clusters.createOrUpdate", + "@azure/arm-networkcloud!ClustersOperations#get:member": "Microsoft.NetworkCloud.Clusters.get", + "@azure/arm-networkcloud!ClusterManagersOperations#updateRelayPrivateEndpointConnection:member": "Microsoft.NetworkCloud.ClusterManagers.updateRelayPrivateEndpointConnection", + "@azure/arm-networkcloud!ClusterManagersOperations#listBySubscription:member": "Microsoft.NetworkCloud.ClusterManagers.listBySubscription", + "@azure/arm-networkcloud!ClusterManagersOperations#listByResourceGroup:member": "Microsoft.NetworkCloud.ClusterManagers.listByResourceGroup", + "@azure/arm-networkcloud!ClusterManagersOperations#delete:member": "Microsoft.NetworkCloud.ClusterManagers.delete", + "@azure/arm-networkcloud!ClusterManagersOperations#update:member": "Microsoft.NetworkCloud.ClusterManagers.update", + "@azure/arm-networkcloud!ClusterManagersOperations#createOrUpdate:member": "Microsoft.NetworkCloud.ClusterManagers.createOrUpdate", + "@azure/arm-networkcloud!ClusterManagersOperations#get:member": "Microsoft.NetworkCloud.ClusterManagers.get", + "@azure/arm-networkcloud!CloudServicesNetworksOperations#listBySubscription:member": "Microsoft.NetworkCloud.CloudServicesNetworks.listBySubscription", + "@azure/arm-networkcloud!CloudServicesNetworksOperations#listByResourceGroup:member": "Microsoft.NetworkCloud.CloudServicesNetworks.listByResourceGroup", + "@azure/arm-networkcloud!CloudServicesNetworksOperations#delete:member": "Microsoft.NetworkCloud.CloudServicesNetworks.delete", + "@azure/arm-networkcloud!CloudServicesNetworksOperations#update:member": "Microsoft.NetworkCloud.CloudServicesNetworks.update", + "@azure/arm-networkcloud!CloudServicesNetworksOperations#createOrUpdate:member": "Microsoft.NetworkCloud.CloudServicesNetworks.createOrUpdate", + "@azure/arm-networkcloud!CloudServicesNetworksOperations#get:member": "Microsoft.NetworkCloud.CloudServicesNetworks.get", + "@azure/arm-networkcloud!BareMetalMachinesOperations#uncordon:member": "Microsoft.NetworkCloud.BareMetalMachines.uncordon", + "@azure/arm-networkcloud!BareMetalMachinesOperations#start:member": "Microsoft.NetworkCloud.BareMetalMachines.start", + "@azure/arm-networkcloud!BareMetalMachinesOperations#runReadCommands:member": "Microsoft.NetworkCloud.BareMetalMachines.runReadCommands", + "@azure/arm-networkcloud!BareMetalMachinesOperations#runDataExtractsRestricted:member": "Microsoft.NetworkCloud.BareMetalMachines.runDataExtractsRestricted", + "@azure/arm-networkcloud!BareMetalMachinesOperations#runDataExtracts:member": "Microsoft.NetworkCloud.BareMetalMachines.runDataExtracts", + "@azure/arm-networkcloud!BareMetalMachinesOperations#runCommand:member": "Microsoft.NetworkCloud.BareMetalMachines.runCommand", + "@azure/arm-networkcloud!BareMetalMachinesOperations#restart:member": "Microsoft.NetworkCloud.BareMetalMachines.restart", + "@azure/arm-networkcloud!BareMetalMachinesOperations#replace:member": "Microsoft.NetworkCloud.BareMetalMachines.replace", + "@azure/arm-networkcloud!BareMetalMachinesOperations#reimage:member": "Microsoft.NetworkCloud.BareMetalMachines.reimage", + "@azure/arm-networkcloud!BareMetalMachinesOperations#powerOff:member": "Microsoft.NetworkCloud.BareMetalMachines.powerOff", + "@azure/arm-networkcloud!BareMetalMachinesOperations#cordon:member": "Microsoft.NetworkCloud.BareMetalMachines.cordon", + "@azure/arm-networkcloud!BareMetalMachinesOperations#listBySubscription:member": "Microsoft.NetworkCloud.BareMetalMachines.listBySubscription", + "@azure/arm-networkcloud!BareMetalMachinesOperations#listByResourceGroup:member": "Microsoft.NetworkCloud.BareMetalMachines.listByResourceGroup", + "@azure/arm-networkcloud!BareMetalMachinesOperations#delete:member": "Microsoft.NetworkCloud.BareMetalMachines.delete", + "@azure/arm-networkcloud!BareMetalMachinesOperations#update:member": "Microsoft.NetworkCloud.BareMetalMachines.update", + "@azure/arm-networkcloud!BareMetalMachinesOperations#createOrUpdate:member": "Microsoft.NetworkCloud.BareMetalMachines.createOrUpdate", + "@azure/arm-networkcloud!BareMetalMachinesOperations#get:member": "Microsoft.NetworkCloud.BareMetalMachines.get", + "@azure/arm-networkcloud!AccessBridgesOperations#listBySubscription:member": "Microsoft.NetworkCloud.AccessBridges.listBySubscription", + "@azure/arm-networkcloud!AccessBridgesOperations#listByResourceGroup:member": "Microsoft.NetworkCloud.AccessBridges.listByResourceGroup", + "@azure/arm-networkcloud!AccessBridgesOperations#delete:member": "Microsoft.NetworkCloud.AccessBridges.delete", + "@azure/arm-networkcloud!AccessBridgesOperations#update:member": "Microsoft.NetworkCloud.AccessBridges.update", + "@azure/arm-networkcloud!AccessBridgesOperations#createOrUpdate:member": "Microsoft.NetworkCloud.AccessBridges.createOrUpdate", + "@azure/arm-networkcloud!AccessBridgesOperations#get:member": "Microsoft.NetworkCloud.AccessBridges.get", + "@azure/arm-networkcloud!OperationsOperations#list:member": "Azure.ResourceManager.Operations.list" + } + } +} diff --git a/sdk/networkcloud/arm-networkcloud/package.json b/sdk/networkcloud/arm-networkcloud/package.json index f5baadca7981..cc6f7fb9eecc 100644 --- a/sdk/networkcloud/arm-networkcloud/package.json +++ b/sdk/networkcloud/arm-networkcloud/package.json @@ -1,123 +1,550 @@ { "name": "@azure/arm-networkcloud", - "sdk-type": "mgmt", - "author": "Microsoft Corporation", - "description": "A generated SDK for NetworkCloud.", - "version": "1.3.0", + "version": "2.0.0-beta.2", + "description": "A generated SDK for NetworkCloudClient.", "engines": { "node": ">=20.0.0" }, - "dependencies": { - "@azure/core-lro": "^2.5.4", - "@azure/abort-controller": "^2.1.2", - "@azure/core-paging": "^1.6.2", - "@azure/core-client": "^1.9.3", - "@azure/core-auth": "^1.9.0", - "@azure/core-rest-pipeline": "^1.19.1", - "tslib": "^2.8.1" + "sideEffects": false, + "autoPublish": false, + "type": "module", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", + "browser": "./dist/browser/index.js", + "react-native": "./dist/react-native/index.js", + "exports": { + "./package.json": "./package.json", + ".": { + "browser": { + "types": "./dist/browser/index.d.ts", + "default": "./dist/browser/index.js" + }, + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + }, + "./api": { + "browser": { + "types": "./dist/browser/api/index.d.ts", + "default": "./dist/browser/api/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/index.d.ts", + "default": "./dist/react-native/api/index.js" + }, + "import": { + "types": "./dist/esm/api/index.d.ts", + "default": "./dist/esm/api/index.js" + }, + "require": { + "types": "./dist/commonjs/api/index.d.ts", + "default": "./dist/commonjs/api/index.js" + } + }, + "./api/metricsConfigurations": { + "browser": { + "types": "./dist/browser/api/metricsConfigurations/index.d.ts", + "default": "./dist/browser/api/metricsConfigurations/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/metricsConfigurations/index.d.ts", + "default": "./dist/react-native/api/metricsConfigurations/index.js" + }, + "import": { + "types": "./dist/esm/api/metricsConfigurations/index.d.ts", + "default": "./dist/esm/api/metricsConfigurations/index.js" + }, + "require": { + "types": "./dist/commonjs/api/metricsConfigurations/index.d.ts", + "default": "./dist/commonjs/api/metricsConfigurations/index.js" + } + }, + "./api/consoles": { + "browser": { + "types": "./dist/browser/api/consoles/index.d.ts", + "default": "./dist/browser/api/consoles/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/consoles/index.d.ts", + "default": "./dist/react-native/api/consoles/index.js" + }, + "import": { + "types": "./dist/esm/api/consoles/index.d.ts", + "default": "./dist/esm/api/consoles/index.js" + }, + "require": { + "types": "./dist/commonjs/api/consoles/index.d.ts", + "default": "./dist/commonjs/api/consoles/index.js" + } + }, + "./api/kubernetesClusterFeatures": { + "browser": { + "types": "./dist/browser/api/kubernetesClusterFeatures/index.d.ts", + "default": "./dist/browser/api/kubernetesClusterFeatures/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/kubernetesClusterFeatures/index.d.ts", + "default": "./dist/react-native/api/kubernetesClusterFeatures/index.js" + }, + "import": { + "types": "./dist/esm/api/kubernetesClusterFeatures/index.d.ts", + "default": "./dist/esm/api/kubernetesClusterFeatures/index.js" + }, + "require": { + "types": "./dist/commonjs/api/kubernetesClusterFeatures/index.d.ts", + "default": "./dist/commonjs/api/kubernetesClusterFeatures/index.js" + } + }, + "./api/agentPools": { + "browser": { + "types": "./dist/browser/api/agentPools/index.d.ts", + "default": "./dist/browser/api/agentPools/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/agentPools/index.d.ts", + "default": "./dist/react-native/api/agentPools/index.js" + }, + "import": { + "types": "./dist/esm/api/agentPools/index.d.ts", + "default": "./dist/esm/api/agentPools/index.js" + }, + "require": { + "types": "./dist/commonjs/api/agentPools/index.d.ts", + "default": "./dist/commonjs/api/agentPools/index.js" + } + }, + "./api/bmcKeySets": { + "browser": { + "types": "./dist/browser/api/bmcKeySets/index.d.ts", + "default": "./dist/browser/api/bmcKeySets/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/bmcKeySets/index.d.ts", + "default": "./dist/react-native/api/bmcKeySets/index.js" + }, + "import": { + "types": "./dist/esm/api/bmcKeySets/index.d.ts", + "default": "./dist/esm/api/bmcKeySets/index.js" + }, + "require": { + "types": "./dist/commonjs/api/bmcKeySets/index.d.ts", + "default": "./dist/commonjs/api/bmcKeySets/index.js" + } + }, + "./api/bareMetalMachineKeySets": { + "browser": { + "types": "./dist/browser/api/bareMetalMachineKeySets/index.d.ts", + "default": "./dist/browser/api/bareMetalMachineKeySets/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/bareMetalMachineKeySets/index.d.ts", + "default": "./dist/react-native/api/bareMetalMachineKeySets/index.js" + }, + "import": { + "types": "./dist/esm/api/bareMetalMachineKeySets/index.d.ts", + "default": "./dist/esm/api/bareMetalMachineKeySets/index.js" + }, + "require": { + "types": "./dist/commonjs/api/bareMetalMachineKeySets/index.d.ts", + "default": "./dist/commonjs/api/bareMetalMachineKeySets/index.js" + } + }, + "./api/volumes": { + "browser": { + "types": "./dist/browser/api/volumes/index.d.ts", + "default": "./dist/browser/api/volumes/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/volumes/index.d.ts", + "default": "./dist/react-native/api/volumes/index.js" + }, + "import": { + "types": "./dist/esm/api/volumes/index.d.ts", + "default": "./dist/esm/api/volumes/index.js" + }, + "require": { + "types": "./dist/commonjs/api/volumes/index.d.ts", + "default": "./dist/commonjs/api/volumes/index.js" + } + }, + "./api/virtualMachines": { + "browser": { + "types": "./dist/browser/api/virtualMachines/index.d.ts", + "default": "./dist/browser/api/virtualMachines/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/virtualMachines/index.d.ts", + "default": "./dist/react-native/api/virtualMachines/index.js" + }, + "import": { + "types": "./dist/esm/api/virtualMachines/index.d.ts", + "default": "./dist/esm/api/virtualMachines/index.js" + }, + "require": { + "types": "./dist/commonjs/api/virtualMachines/index.d.ts", + "default": "./dist/commonjs/api/virtualMachines/index.js" + } + }, + "./api/trunkedNetworks": { + "browser": { + "types": "./dist/browser/api/trunkedNetworks/index.d.ts", + "default": "./dist/browser/api/trunkedNetworks/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/trunkedNetworks/index.d.ts", + "default": "./dist/react-native/api/trunkedNetworks/index.js" + }, + "import": { + "types": "./dist/esm/api/trunkedNetworks/index.d.ts", + "default": "./dist/esm/api/trunkedNetworks/index.js" + }, + "require": { + "types": "./dist/commonjs/api/trunkedNetworks/index.d.ts", + "default": "./dist/commonjs/api/trunkedNetworks/index.js" + } + }, + "./api/storageAppliances": { + "browser": { + "types": "./dist/browser/api/storageAppliances/index.d.ts", + "default": "./dist/browser/api/storageAppliances/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/storageAppliances/index.d.ts", + "default": "./dist/react-native/api/storageAppliances/index.js" + }, + "import": { + "types": "./dist/esm/api/storageAppliances/index.d.ts", + "default": "./dist/esm/api/storageAppliances/index.js" + }, + "require": { + "types": "./dist/commonjs/api/storageAppliances/index.d.ts", + "default": "./dist/commonjs/api/storageAppliances/index.js" + } + }, + "./api/racks": { + "browser": { + "types": "./dist/browser/api/racks/index.d.ts", + "default": "./dist/browser/api/racks/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/racks/index.d.ts", + "default": "./dist/react-native/api/racks/index.js" + }, + "import": { + "types": "./dist/esm/api/racks/index.d.ts", + "default": "./dist/esm/api/racks/index.js" + }, + "require": { + "types": "./dist/commonjs/api/racks/index.d.ts", + "default": "./dist/commonjs/api/racks/index.js" + } + }, + "./api/rackSkus": { + "browser": { + "types": "./dist/browser/api/rackSkus/index.d.ts", + "default": "./dist/browser/api/rackSkus/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/rackSkus/index.d.ts", + "default": "./dist/react-native/api/rackSkus/index.js" + }, + "import": { + "types": "./dist/esm/api/rackSkus/index.d.ts", + "default": "./dist/esm/api/rackSkus/index.js" + }, + "require": { + "types": "./dist/commonjs/api/rackSkus/index.d.ts", + "default": "./dist/commonjs/api/rackSkus/index.js" + } + }, + "./api/l3Networks": { + "browser": { + "types": "./dist/browser/api/l3Networks/index.d.ts", + "default": "./dist/browser/api/l3Networks/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/l3Networks/index.d.ts", + "default": "./dist/react-native/api/l3Networks/index.js" + }, + "import": { + "types": "./dist/esm/api/l3Networks/index.d.ts", + "default": "./dist/esm/api/l3Networks/index.js" + }, + "require": { + "types": "./dist/commonjs/api/l3Networks/index.d.ts", + "default": "./dist/commonjs/api/l3Networks/index.js" + } + }, + "./api/l2Networks": { + "browser": { + "types": "./dist/browser/api/l2Networks/index.d.ts", + "default": "./dist/browser/api/l2Networks/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/l2Networks/index.d.ts", + "default": "./dist/react-native/api/l2Networks/index.js" + }, + "import": { + "types": "./dist/esm/api/l2Networks/index.d.ts", + "default": "./dist/esm/api/l2Networks/index.js" + }, + "require": { + "types": "./dist/commonjs/api/l2Networks/index.d.ts", + "default": "./dist/commonjs/api/l2Networks/index.js" + } + }, + "./api/kubernetesVersions": { + "browser": { + "types": "./dist/browser/api/kubernetesVersions/index.d.ts", + "default": "./dist/browser/api/kubernetesVersions/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/kubernetesVersions/index.d.ts", + "default": "./dist/react-native/api/kubernetesVersions/index.js" + }, + "import": { + "types": "./dist/esm/api/kubernetesVersions/index.d.ts", + "default": "./dist/esm/api/kubernetesVersions/index.js" + }, + "require": { + "types": "./dist/commonjs/api/kubernetesVersions/index.d.ts", + "default": "./dist/commonjs/api/kubernetesVersions/index.js" + } + }, + "./api/kubernetesClusters": { + "browser": { + "types": "./dist/browser/api/kubernetesClusters/index.d.ts", + "default": "./dist/browser/api/kubernetesClusters/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/kubernetesClusters/index.d.ts", + "default": "./dist/react-native/api/kubernetesClusters/index.js" + }, + "import": { + "types": "./dist/esm/api/kubernetesClusters/index.d.ts", + "default": "./dist/esm/api/kubernetesClusters/index.js" + }, + "require": { + "types": "./dist/commonjs/api/kubernetesClusters/index.d.ts", + "default": "./dist/commonjs/api/kubernetesClusters/index.js" + } + }, + "./api/clusters": { + "browser": { + "types": "./dist/browser/api/clusters/index.d.ts", + "default": "./dist/browser/api/clusters/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/clusters/index.d.ts", + "default": "./dist/react-native/api/clusters/index.js" + }, + "import": { + "types": "./dist/esm/api/clusters/index.d.ts", + "default": "./dist/esm/api/clusters/index.js" + }, + "require": { + "types": "./dist/commonjs/api/clusters/index.d.ts", + "default": "./dist/commonjs/api/clusters/index.js" + } + }, + "./api/clusterManagers": { + "browser": { + "types": "./dist/browser/api/clusterManagers/index.d.ts", + "default": "./dist/browser/api/clusterManagers/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/clusterManagers/index.d.ts", + "default": "./dist/react-native/api/clusterManagers/index.js" + }, + "import": { + "types": "./dist/esm/api/clusterManagers/index.d.ts", + "default": "./dist/esm/api/clusterManagers/index.js" + }, + "require": { + "types": "./dist/commonjs/api/clusterManagers/index.d.ts", + "default": "./dist/commonjs/api/clusterManagers/index.js" + } + }, + "./api/cloudServicesNetworks": { + "browser": { + "types": "./dist/browser/api/cloudServicesNetworks/index.d.ts", + "default": "./dist/browser/api/cloudServicesNetworks/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/cloudServicesNetworks/index.d.ts", + "default": "./dist/react-native/api/cloudServicesNetworks/index.js" + }, + "import": { + "types": "./dist/esm/api/cloudServicesNetworks/index.d.ts", + "default": "./dist/esm/api/cloudServicesNetworks/index.js" + }, + "require": { + "types": "./dist/commonjs/api/cloudServicesNetworks/index.d.ts", + "default": "./dist/commonjs/api/cloudServicesNetworks/index.js" + } + }, + "./api/bareMetalMachines": { + "browser": { + "types": "./dist/browser/api/bareMetalMachines/index.d.ts", + "default": "./dist/browser/api/bareMetalMachines/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/bareMetalMachines/index.d.ts", + "default": "./dist/react-native/api/bareMetalMachines/index.js" + }, + "import": { + "types": "./dist/esm/api/bareMetalMachines/index.d.ts", + "default": "./dist/esm/api/bareMetalMachines/index.js" + }, + "require": { + "types": "./dist/commonjs/api/bareMetalMachines/index.d.ts", + "default": "./dist/commonjs/api/bareMetalMachines/index.js" + } + }, + "./api/accessBridges": { + "browser": { + "types": "./dist/browser/api/accessBridges/index.d.ts", + "default": "./dist/browser/api/accessBridges/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/accessBridges/index.d.ts", + "default": "./dist/react-native/api/accessBridges/index.js" + }, + "import": { + "types": "./dist/esm/api/accessBridges/index.d.ts", + "default": "./dist/esm/api/accessBridges/index.js" + }, + "require": { + "types": "./dist/commonjs/api/accessBridges/index.d.ts", + "default": "./dist/commonjs/api/accessBridges/index.js" + } + }, + "./api/operations": { + "browser": { + "types": "./dist/browser/api/operations/index.d.ts", + "default": "./dist/browser/api/operations/index.js" + }, + "react-native": { + "types": "./dist/react-native/api/operations/index.d.ts", + "default": "./dist/react-native/api/operations/index.js" + }, + "import": { + "types": "./dist/esm/api/operations/index.d.ts", + "default": "./dist/esm/api/operations/index.js" + }, + "require": { + "types": "./dist/commonjs/api/operations/index.d.ts", + "default": "./dist/commonjs/api/operations/index.js" + } + }, + "./models": { + "browser": { + "types": "./dist/browser/models/index.d.ts", + "default": "./dist/browser/models/index.js" + }, + "react-native": { + "types": "./dist/react-native/models/index.d.ts", + "default": "./dist/react-native/models/index.js" + }, + "import": { + "types": "./dist/esm/models/index.d.ts", + "default": "./dist/esm/models/index.js" + }, + "require": { + "types": "./dist/commonjs/models/index.d.ts", + "default": "./dist/commonjs/models/index.js" + } + } }, "keywords": [ "node", "azure", + "cloud", "typescript", "browser", - "isomorphic", - "cloud" + "isomorphic" ], + "author": "Microsoft Corporation", "license": "MIT", - "main": "./dist/commonjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/commonjs/index.d.ts", - "type": "module", + "files": [ + "dist/", + "!dist/**/*.d.*ts.map", + "README.md", + "LICENSE" + ], + "sdk-type": "mgmt", + "repository": "github:Azure/azure-sdk-for-js", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud/README.md", + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "//metadata": { + "constantPaths": [ + { + "path": "src/api/networkCloudContext.ts", + "prefix": "userAgentInfo" + } + ] + }, + "dependencies": { + "@azure/core-util": "^1.12.0", + "@azure-rest/core-client": "^2.3.1", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-lro": "^3.1.0", + "@azure/core-rest-pipeline": "^1.20.0", + "@azure/logger": "^1.2.0", + "tslib": "^2.8.1" + }, "devDependencies": { "@azure-tools/test-credential": "workspace:^", "@azure-tools/test-recorder": "workspace:^", "@azure-tools/test-utils-vitest": "workspace:^", "@azure/dev-tool": "workspace:^", + "@azure/eslint-plugin-azure-sdk": "workspace:^", "@azure/identity": "catalog:internal", - "@azure/logger": "workspace:^", "@types/node": "catalog:", - "@vitest/browser-playwright": "catalog:testing", - "@vitest/coverage-istanbul": "catalog:testing", "cross-env": "catalog:", - "dotenv": "catalog:testing", "eslint": "catalog:", - "playwright": "catalog:testing", "prettier": "catalog:", "rimraf": "catalog:", + "@vitest/browser-playwright": "catalog:testing", + "@vitest/coverage-istanbul": "catalog:testing", + "dotenv": "catalog:testing", + "playwright": "catalog:testing", "typescript": "catalog:", "vitest": "catalog:testing" }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js", - "directory": "sdk/networkcloud/arm-networkcloud" - }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/", - "README.md", - "LICENSE" - ], "scripts": { - "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "extract-api": "rimraf review && dev-tool run extract-api", "pack": "pnpm pack 2>&1", - "extract-api": "dev-tool run extract-api", "lint": "echo skipped", - "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "lint:fix": "echo skipped", "build:samples": "tsc -p config/tsconfig.samples.json && dev-tool samples publish -f", - "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", - "execute:samples": "echo skipped", - "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", - "test": "tsc -b --noEmit && npm run test:node && npm run test:browser", - "test:node": "dev-tool run test:vitest", + "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", + "execute:samples": "dev-tool samples run samples-dev", + "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", + "generate:client": "echo skipped", "test:browser": "echo skipped", - "update-snippets": "dev-tool run update-snippets", - "test:node:esm": "dev-tool run test:vitest --esm" - }, - "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/networkCloud.ts", - "prefix": "packageDetails" - } - ] + "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", + "test:node": "dev-tool run test:vitest", + "test": "tsc -b --noEmit && npm run test:node && npm run test:browser", + "update-snippets": "dev-tool run update-snippets" }, - "autoPublish": true, - "browser": "./dist/browser/index.js", - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud/README.md", "//sampleConfiguration": { - "productName": "", + "productName": "@azure/arm-networkcloud", "productSlugs": [ "azure" ], "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-networkcloud?view=azure-node-preview" - }, - "exports": { - "./package.json": "./package.json", - ".": { - "browser": { - "types": "./dist/browser/index.d.ts", - "default": "./dist/browser/index.js" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - }, - "imports": { - "#platform/*": { - "browser": "./src/*-browser.mts", - "default": "./src/*.ts" - } } } diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-accessBridges-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-accessBridges-node.api.md new file mode 100644 index 000000000000..4bd87116ebfc --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-accessBridges-node.api.md @@ -0,0 +1,68 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, accessBridgeName: AccessBridgeAllowedName, options?: AccessBridgesDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export interface AccessBridgesCreateOrUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface AccessBridgesDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface AccessBridgesGetOptionalParams extends OperationOptions { +} + +// @public +export interface AccessBridgesListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface AccessBridgesListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface AccessBridgesUpdateOptionalParams extends OperationOptions { + accessBridgeUpdateParameters?: AccessBridgePatchParameters; + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, accessBridgeName: AccessBridgeAllowedName, accessBridge: AccessBridge, options?: AccessBridgesCreateOrUpdateOptionalParams): PollerLike, AccessBridge>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, accessBridgeName: AccessBridgeAllowedName, options?: AccessBridgesGetOptionalParams): Promise; + +// @public +export function listByResourceGroup(context: NetworkCloudContext, resourceGroupName: string, options?: AccessBridgesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: AccessBridgesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, accessBridgeName: AccessBridgeAllowedName, options?: AccessBridgesUpdateOptionalParams): PollerLike, AccessBridge>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-agentPools-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-agentPools-node.api.md new file mode 100644 index 000000000000..175cbe216aaa --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-agentPools-node.api.md @@ -0,0 +1,61 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export interface AgentPoolsCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface AgentPoolsDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface AgentPoolsGetOptionalParams extends OperationOptions { +} + +// @public +export interface AgentPoolsListByKubernetesClusterOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface AgentPoolsUpdateOptionalParams extends OperationOptions { + agentPoolUpdateParameters?: AgentPoolPatchParameters; + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, agentPoolParameters: AgentPool, options?: AgentPoolsCreateOrUpdateOptionalParams): PollerLike, AgentPool>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsGetOptionalParams): Promise; + +// @public +export function listByKubernetesCluster(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, options?: AgentPoolsListByKubernetesClusterOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsUpdateOptionalParams): PollerLike, AgentPool>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-bareMetalMachineKeySets-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-bareMetalMachineKeySets-node.api.md new file mode 100644 index 000000000000..ff63ed154a9f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-bareMetalMachineKeySets-node.api.md @@ -0,0 +1,61 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export interface BareMetalMachineKeySetsCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachineKeySetsDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachineKeySetsGetOptionalParams extends OperationOptions { +} + +// @public +export interface BareMetalMachineKeySetsListByClusterOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface BareMetalMachineKeySetsUpdateOptionalParams extends OperationOptions { + bareMetalMachineKeySetUpdateParameters?: BareMetalMachineKeySetPatchParameters; + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, bareMetalMachineKeySetParameters: BareMetalMachineKeySet, options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams): PollerLike, BareMetalMachineKeySet>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsGetOptionalParams): Promise; + +// @public +export function listByCluster(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, options?: BareMetalMachineKeySetsListByClusterOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsUpdateOptionalParams): PollerLike, BareMetalMachineKeySet>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-bareMetalMachines-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-bareMetalMachines-node.api.md new file mode 100644 index 000000000000..da6e488ff98d --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-bareMetalMachines-node.api.md @@ -0,0 +1,162 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export interface BareMetalMachinesCordonOptionalParams extends OperationOptions { + bareMetalMachineCordonParameters?: BareMetalMachineCordonParameters; + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachinesCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachinesDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachinesGetOptionalParams extends OperationOptions { +} + +// @public +export interface BareMetalMachinesListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface BareMetalMachinesListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface BareMetalMachinesPowerOffOptionalParams extends OperationOptions { + bareMetalMachinePowerOffParameters?: BareMetalMachinePowerOffParameters; + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachinesReimageOptionalParams extends OperationOptions { + body?: BareMetalMachineReimageParameters; + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachinesReplaceOptionalParams extends OperationOptions { + bareMetalMachineReplaceParameters?: BareMetalMachineReplaceParameters; + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachinesRestartOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachinesRunCommandOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachinesRunDataExtractsOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachinesRunDataExtractsRestrictedOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachinesRunReadCommandsOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachinesStartOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachinesUncordonOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface BareMetalMachinesUpdateOptionalParams extends OperationOptions { + bareMetalMachineUpdateParameters?: BareMetalMachinePatchParameters; + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export function cordon(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesCordonOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineParameters: BareMetalMachine, options?: BareMetalMachinesCreateOrUpdateOptionalParams): PollerLike, BareMetalMachine>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesGetOptionalParams): Promise; + +// @public +export function listByResourceGroup(context: NetworkCloudContext, resourceGroupName: string, options?: BareMetalMachinesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: BareMetalMachinesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function powerOff(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesPowerOffOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function reimage(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesReimageOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function replace(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesReplaceOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function restart(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesRestartOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function runCommand(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, options?: BareMetalMachinesRunCommandOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function runDataExtracts(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, options?: BareMetalMachinesRunDataExtractsOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function runDataExtractsRestricted(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function runReadCommands(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, options?: BareMetalMachinesRunReadCommandsOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function start(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesStartOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function uncordon(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesUncordonOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesUpdateOptionalParams): PollerLike, BareMetalMachine>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-bmcKeySets-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-bmcKeySets-node.api.md new file mode 100644 index 000000000000..2841abd8187e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-bmcKeySets-node.api.md @@ -0,0 +1,61 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export interface BmcKeySetsCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface BmcKeySetsDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface BmcKeySetsGetOptionalParams extends OperationOptions { +} + +// @public +export interface BmcKeySetsListByClusterOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface BmcKeySetsUpdateOptionalParams extends OperationOptions { + bmcKeySetUpdateParameters?: BmcKeySetPatchParameters; + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, bmcKeySetName: string, bmcKeySetParameters: BmcKeySet, options?: BmcKeySetsCreateOrUpdateOptionalParams): PollerLike, BmcKeySet>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsGetOptionalParams): Promise; + +// @public +export function listByCluster(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, options?: BmcKeySetsListByClusterOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsUpdateOptionalParams): PollerLike, BmcKeySet>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-cloudServicesNetworks-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-cloudServicesNetworks-node.api.md new file mode 100644 index 000000000000..d0032ef5e3cb --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-cloudServicesNetworks-node.api.md @@ -0,0 +1,70 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export interface CloudServicesNetworksCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CloudServicesNetworksDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CloudServicesNetworksGetOptionalParams extends OperationOptions { +} + +// @public +export interface CloudServicesNetworksListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface CloudServicesNetworksListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface CloudServicesNetworksUpdateOptionalParams extends OperationOptions { + cloudServicesNetworkUpdateParameters?: CloudServicesNetworkPatchParameters; + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, cloudServicesNetworkName: string, cloudServicesNetworkParameters: CloudServicesNetwork, options?: CloudServicesNetworksCreateOrUpdateOptionalParams): PollerLike, CloudServicesNetwork>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksGetOptionalParams): Promise; + +// @public +export function listByResourceGroup(context: NetworkCloudContext, resourceGroupName: string, options?: CloudServicesNetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: CloudServicesNetworksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksUpdateOptionalParams): PollerLike, CloudServicesNetwork>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-clusterManagers-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-clusterManagers-node.api.md new file mode 100644 index 000000000000..c862e1a387a6 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-clusterManagers-node.api.md @@ -0,0 +1,78 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export interface ClusterManagersCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ClusterManagersDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ClusterManagersGetOptionalParams extends OperationOptions { +} + +// @public +export interface ClusterManagersListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface ClusterManagersListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface ClusterManagersUpdateOptionalParams extends OperationOptions { + clusterManagerUpdateParameters?: ClusterManagerPatchParameters; + ifMatch?: string; + ifNoneMatch?: string; +} + +// @public +export interface ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams extends OperationOptions { + clusterManagerUpdateRelayPrivateEndpointConnectionParameters?: ClusterManagerUpdateRelayPrivateEndpointConnectionParameters; + updateIntervalInMs?: number; +} + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, clusterManagerName: string, clusterManagerParameters: ClusterManager, options?: ClusterManagersCreateOrUpdateOptionalParams): PollerLike, ClusterManager>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersGetOptionalParams): Promise; + +// @public +export function listByResourceGroup(context: NetworkCloudContext, resourceGroupName: string, options?: ClusterManagersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: ClusterManagersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersUpdateOptionalParams): Promise; + +// @public +export function updateRelayPrivateEndpointConnection(context: NetworkCloudContext, resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams): PollerLike, OperationStatusResult>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-clusters-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-clusters-node.api.md new file mode 100644 index 000000000000..2acf6a01ee61 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-clusters-node.api.md @@ -0,0 +1,121 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export interface ClustersContinueUpdateVersionOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface ClustersCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ClustersDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ClustersDeployOptionalParams extends OperationOptions { + clusterDeployParameters?: ClusterDeployParameters; + updateIntervalInMs?: number; +} + +// @public +export interface ClustersGetOptionalParams extends OperationOptions { +} + +// @public +export interface ClustersInspectOptionalParams extends OperationOptions { + clusterInspectParameters?: ClusterInspectParameters; + updateIntervalInMs?: number; +} + +// @public +export interface ClustersListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface ClustersListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface ClustersRotateCredentialOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface ClustersScanRuntimeOptionalParams extends OperationOptions { + clusterScanRuntimeParameters?: ClusterScanRuntimeParameters; + updateIntervalInMs?: number; +} + +// @public +export interface ClustersUpdateOptionalParams extends OperationOptions { + clusterUpdateParameters?: ClusterPatchParameters; + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ClustersUpdateVersionOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export function continueUpdateVersion(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, options?: ClustersContinueUpdateVersionOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, clusterParameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams): PollerLike, Cluster>; + +// @public +export function deploy(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, options?: ClustersDeployOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, options?: ClustersGetOptionalParams): Promise; + +// @public +export function inspect(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, options?: ClustersInspectOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function listByResourceGroup(context: NetworkCloudContext, resourceGroupName: string, options?: ClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: ClustersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function rotateCredential(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, body: ClusterRotateCredentialParameters, options?: ClustersRotateCredentialOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function scanRuntime(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, options?: ClustersScanRuntimeOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, options?: ClustersUpdateOptionalParams): PollerLike, Cluster>; + +// @public +export function updateVersion(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, clusterUpdateVersionParameters: ClusterUpdateVersionParameters, options?: ClustersUpdateVersionOptionalParams): PollerLike, OperationStatusResult>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-consoles-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-consoles-node.api.md new file mode 100644 index 000000000000..615d71c3da70 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-consoles-node.api.md @@ -0,0 +1,61 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export interface ConsolesCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ConsolesDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ConsolesGetOptionalParams extends OperationOptions { +} + +// @public +export interface ConsolesListByVirtualMachineOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface ConsolesUpdateOptionalParams extends OperationOptions { + consoleUpdateParameters?: ConsolePatchParameters; + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, virtualMachineName: string, consoleName: string, consoleParameters: Console_2, options?: ConsolesCreateOrUpdateOptionalParams): PollerLike, Console_2>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesGetOptionalParams): Promise; + +// @public +export function listByVirtualMachine(context: NetworkCloudContext, resourceGroupName: string, virtualMachineName: string, options?: ConsolesListByVirtualMachineOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesUpdateOptionalParams): PollerLike, Console_2>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-kubernetesClusterFeatures-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-kubernetesClusterFeatures-node.api.md new file mode 100644 index 000000000000..0437dbcca9f0 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-kubernetesClusterFeatures-node.api.md @@ -0,0 +1,61 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, featureName: string, kubernetesClusterFeatureParameters: KubernetesClusterFeature, options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams): PollerLike, KubernetesClusterFeature>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesGetOptionalParams): Promise; + +// @public +export interface KubernetesClusterFeaturesCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface KubernetesClusterFeaturesDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface KubernetesClusterFeaturesGetOptionalParams extends OperationOptions { +} + +// @public +export interface KubernetesClusterFeaturesListByKubernetesClusterOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface KubernetesClusterFeaturesUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + kubernetesClusterFeatureUpdateParameters?: KubernetesClusterFeaturePatchParameters; + updateIntervalInMs?: number; +} + +// @public +export function listByKubernetesCluster(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClusterFeaturesListByKubernetesClusterOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesUpdateOptionalParams): PollerLike, KubernetesClusterFeature>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-kubernetesClusters-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-kubernetesClusters-node.api.md new file mode 100644 index 000000000000..063b9fe9abff --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-kubernetesClusters-node.api.md @@ -0,0 +1,78 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, kubernetesClusterParameters: KubernetesCluster, options?: KubernetesClustersCreateOrUpdateOptionalParams): PollerLike, KubernetesCluster>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersGetOptionalParams): Promise; + +// @public +export interface KubernetesClustersCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface KubernetesClustersDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface KubernetesClustersGetOptionalParams extends OperationOptions { +} + +// @public +export interface KubernetesClustersListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface KubernetesClustersListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface KubernetesClustersRestartNodeOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface KubernetesClustersUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + kubernetesClusterUpdateParameters?: KubernetesClusterPatchParameters; + updateIntervalInMs?: number; +} + +// @public +export function listByResourceGroup(context: NetworkCloudContext, resourceGroupName: string, options?: KubernetesClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: KubernetesClustersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function restartNode(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, options?: KubernetesClustersRestartNodeOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersUpdateOptionalParams): PollerLike, KubernetesCluster>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-kubernetesVersions-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-kubernetesVersions-node.api.md new file mode 100644 index 000000000000..9b0e433ac751 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-kubernetesVersions-node.api.md @@ -0,0 +1,70 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, kubernetesVersionName: string, options?: KubernetesVersionsDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, kubernetesVersionName: string, kubernetesVersionParameters: KubernetesVersion, options?: KubernetesVersionsCreateOrUpdateOptionalParams): PollerLike, KubernetesVersion>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, kubernetesVersionName: string, options?: KubernetesVersionsGetOptionalParams): Promise; + +// @public +export interface KubernetesVersionsCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface KubernetesVersionsDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface KubernetesVersionsGetOptionalParams extends OperationOptions { +} + +// @public +export interface KubernetesVersionsListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface KubernetesVersionsListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface KubernetesVersionsUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + kubernetesVersionPatchParameters?: KubernetesVersionPatchParameters; + updateIntervalInMs?: number; +} + +// @public +export function listByResourceGroup(context: NetworkCloudContext, resourceGroupName: string, options?: KubernetesVersionsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: KubernetesVersionsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, kubernetesVersionName: string, options?: KubernetesVersionsUpdateOptionalParams): PollerLike, KubernetesVersion>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-l2Networks-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-l2Networks-node.api.md new file mode 100644 index 000000000000..52c8a80565ec --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-l2Networks-node.api.md @@ -0,0 +1,69 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, l2NetworkName: string, options?: L2NetworksDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, l2NetworkName: string, l2NetworkParameters: L2Network, options?: L2NetworksCreateOrUpdateOptionalParams): PollerLike, L2Network>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, l2NetworkName: string, options?: L2NetworksGetOptionalParams): Promise; + +// @public +export interface L2NetworksCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface L2NetworksDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface L2NetworksGetOptionalParams extends OperationOptions { +} + +// @public +export interface L2NetworksListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface L2NetworksListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface L2NetworksUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + l2NetworkUpdateParameters?: L2NetworkPatchParameters; +} + +// @public +export function listByResourceGroup(context: NetworkCloudContext, resourceGroupName: string, options?: L2NetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: L2NetworksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, l2NetworkName: string, options?: L2NetworksUpdateOptionalParams): Promise; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-l3Networks-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-l3Networks-node.api.md new file mode 100644 index 000000000000..665d688a6de7 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-l3Networks-node.api.md @@ -0,0 +1,69 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, l3NetworkName: string, options?: L3NetworksDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, l3NetworkName: string, l3NetworkParameters: L3Network, options?: L3NetworksCreateOrUpdateOptionalParams): PollerLike, L3Network>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, l3NetworkName: string, options?: L3NetworksGetOptionalParams): Promise; + +// @public +export interface L3NetworksCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface L3NetworksDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface L3NetworksGetOptionalParams extends OperationOptions { +} + +// @public +export interface L3NetworksListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface L3NetworksListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface L3NetworksUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + l3NetworkUpdateParameters?: L3NetworkPatchParameters; +} + +// @public +export function listByResourceGroup(context: NetworkCloudContext, resourceGroupName: string, options?: L3NetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: L3NetworksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, l3NetworkName: string, options?: L3NetworksUpdateOptionalParams): Promise; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-metricsConfigurations-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-metricsConfigurations-node.api.md new file mode 100644 index 000000000000..e2a9cd3f07b0 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-metricsConfigurations-node.api.md @@ -0,0 +1,61 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, metricsConfigurationName: string, metricsConfigurationParameters: ClusterMetricsConfiguration, options?: MetricsConfigurationsCreateOrUpdateOptionalParams): PollerLike, ClusterMetricsConfiguration>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsGetOptionalParams): Promise; + +// @public +export function listByCluster(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, options?: MetricsConfigurationsListByClusterOptionalParams): PagedAsyncIterableIterator; + +// @public +export interface MetricsConfigurationsCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface MetricsConfigurationsDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface MetricsConfigurationsGetOptionalParams extends OperationOptions { +} + +// @public +export interface MetricsConfigurationsListByClusterOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface MetricsConfigurationsUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + metricsConfigurationUpdateParameters?: ClusterMetricsConfigurationPatchParameters; + updateIntervalInMs?: number; +} + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsUpdateOptionalParams): PollerLike, ClusterMetricsConfiguration>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-node.api.md new file mode 100644 index 000000000000..a0eb887d7eb5 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-node.api.md @@ -0,0 +1,28 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { ClientOptions } from '@azure-rest/core-client'; +import { TokenCredential } from '@azure/core-auth'; + +// @public +export function createNetworkCloud(credential: TokenCredential, subscriptionId: string, options?: NetworkCloudOptionalParams): NetworkCloudContext; + +// @public +export interface NetworkCloudContext extends Client { + apiVersion?: string; + subscriptionId: string; +} + +// @public +export interface NetworkCloudOptionalParams extends ClientOptions { + apiVersion?: string; + cloudSetting?: AzureSupportedClouds; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-operations-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-operations-node.api.md new file mode 100644 index 000000000000..2a087eaaf467 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-operations-node.api.md @@ -0,0 +1,19 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; + +// @public +export function list(context: NetworkCloudContext, options?: OperationsListOptionalParams): PagedAsyncIterableIterator; + +// @public +export interface OperationsListOptionalParams extends OperationOptions { +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-rackSkus-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-rackSkus-node.api.md new file mode 100644 index 000000000000..8e7c61d82cfa --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-rackSkus-node.api.md @@ -0,0 +1,26 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; + +// @public +export function get(context: NetworkCloudContext, rackSkuName: string, options?: RackSkusGetOptionalParams): Promise; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: RackSkusListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export interface RackSkusGetOptionalParams extends OperationOptions { +} + +// @public +export interface RackSkusListBySubscriptionOptionalParams extends OperationOptions { +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-racks-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-racks-node.api.md new file mode 100644 index 000000000000..f4a52a21e2d0 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-racks-node.api.md @@ -0,0 +1,70 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, rackName: string, options?: RacksDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, rackName: string, rackParameters: Rack, options?: RacksCreateOrUpdateOptionalParams): PollerLike, Rack>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, rackName: string, options?: RacksGetOptionalParams): Promise; + +// @public +export function listByResourceGroup(context: NetworkCloudContext, resourceGroupName: string, options?: RacksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: RacksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export interface RacksCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface RacksDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface RacksGetOptionalParams extends OperationOptions { +} + +// @public +export interface RacksListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface RacksListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface RacksUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + rackUpdateParameters?: RackPatchParameters; + updateIntervalInMs?: number; +} + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, rackName: string, options?: RacksUpdateOptionalParams): PollerLike, Rack>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-storageAppliances-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-storageAppliances-node.api.md new file mode 100644 index 000000000000..ada849245750 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-storageAppliances-node.api.md @@ -0,0 +1,95 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, storageApplianceName: string, storageApplianceParameters: StorageAppliance, options?: StorageAppliancesCreateOrUpdateOptionalParams): PollerLike, StorageAppliance>; + +// @public +export function disableRemoteVendorManagement(context: NetworkCloudContext, resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function enableRemoteVendorManagement(context: NetworkCloudContext, resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesGetOptionalParams): Promise; + +// @public +export function listByResourceGroup(context: NetworkCloudContext, resourceGroupName: string, options?: StorageAppliancesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: StorageAppliancesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function runReadCommands(context: NetworkCloudContext, resourceGroupName: string, storageApplianceName: string, storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, options?: StorageAppliancesRunReadCommandsOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export interface StorageAppliancesCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface StorageAppliancesDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface StorageAppliancesDisableRemoteVendorManagementOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface StorageAppliancesEnableRemoteVendorManagementOptionalParams extends OperationOptions { + storageApplianceEnableRemoteVendorManagementParameters?: StorageApplianceEnableRemoteVendorManagementParameters; + updateIntervalInMs?: number; +} + +// @public +export interface StorageAppliancesGetOptionalParams extends OperationOptions { +} + +// @public +export interface StorageAppliancesListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface StorageAppliancesListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface StorageAppliancesRunReadCommandsOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface StorageAppliancesUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + storageApplianceUpdateParameters?: StorageAppliancePatchParameters; + updateIntervalInMs?: number; +} + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesUpdateOptionalParams): PollerLike, StorageAppliance>; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-trunkedNetworks-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-trunkedNetworks-node.api.md new file mode 100644 index 000000000000..ab1f0396f079 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-trunkedNetworks-node.api.md @@ -0,0 +1,69 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, trunkedNetworkName: string, options?: TrunkedNetworksDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, trunkedNetworkName: string, trunkedNetworkParameters: TrunkedNetwork, options?: TrunkedNetworksCreateOrUpdateOptionalParams): PollerLike, TrunkedNetwork>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, trunkedNetworkName: string, options?: TrunkedNetworksGetOptionalParams): Promise; + +// @public +export function listByResourceGroup(context: NetworkCloudContext, resourceGroupName: string, options?: TrunkedNetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: TrunkedNetworksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export interface TrunkedNetworksCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface TrunkedNetworksDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface TrunkedNetworksGetOptionalParams extends OperationOptions { +} + +// @public +export interface TrunkedNetworksListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface TrunkedNetworksListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface TrunkedNetworksUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + trunkedNetworkUpdateParameters?: TrunkedNetworkPatchParameters; +} + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, trunkedNetworkName: string, options?: TrunkedNetworksUpdateOptionalParams): Promise; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-virtualMachines-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-virtualMachines-node.api.md new file mode 100644 index 000000000000..fd8e1121bbba --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-virtualMachines-node.api.md @@ -0,0 +1,112 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function assignRelay(context: NetworkCloudContext, resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesAssignRelayOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, virtualMachineName: string, virtualMachineParameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams): PollerLike, VirtualMachine>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesGetOptionalParams): Promise; + +// @public +export function listByResourceGroup(context: NetworkCloudContext, resourceGroupName: string, options?: VirtualMachinesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: VirtualMachinesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function powerOff(context: NetworkCloudContext, resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesPowerOffOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function reimage(context: NetworkCloudContext, resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesReimageOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function restart(context: NetworkCloudContext, resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesRestartOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function start(context: NetworkCloudContext, resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStartOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesUpdateOptionalParams): PollerLike, VirtualMachine>; + +// @public +export interface VirtualMachinesAssignRelayOptionalParams extends OperationOptions { + updateIntervalInMs?: number; + virtualMachineAssignRelayParameters?: VirtualMachineAssignRelayParameters; +} + +// @public +export interface VirtualMachinesCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachinesDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachinesGetOptionalParams extends OperationOptions { +} + +// @public +export interface VirtualMachinesListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface VirtualMachinesListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface VirtualMachinesPowerOffOptionalParams extends OperationOptions { + updateIntervalInMs?: number; + virtualMachinePowerOffParameters?: VirtualMachinePowerOffParameters; +} + +// @public +export interface VirtualMachinesReimageOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachinesRestartOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachinesStartOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachinesUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; + virtualMachineUpdateParameters?: VirtualMachinePatchParameters; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-volumes-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-volumes-node.api.md new file mode 100644 index 000000000000..9d40b01bba08 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-api-volumes-node.api.md @@ -0,0 +1,69 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PollerLike } from '@azure/core-lro'; + +// @public +export function $delete(context: NetworkCloudContext, resourceGroupName: string, volumeName: string, options?: VolumesDeleteOptionalParams): PollerLike, OperationStatusResult>; + +// @public +export function createOrUpdate(context: NetworkCloudContext, resourceGroupName: string, volumeName: string, volumeParameters: Volume, options?: VolumesCreateOrUpdateOptionalParams): PollerLike, Volume>; + +// @public +export function get(context: NetworkCloudContext, resourceGroupName: string, volumeName: string, options?: VolumesGetOptionalParams): Promise; + +// @public +export function listByResourceGroup(context: NetworkCloudContext, resourceGroupName: string, options?: VolumesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + +// @public +export function listBySubscription(context: NetworkCloudContext, options?: VolumesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + +// @public +export function update(context: NetworkCloudContext, resourceGroupName: string, volumeName: string, options?: VolumesUpdateOptionalParams): Promise; + +// @public +export interface VolumesCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VolumesDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VolumesGetOptionalParams extends OperationOptions { +} + +// @public +export interface VolumesListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface VolumesListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface VolumesUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + volumeUpdateParameters?: VolumePatchParameters; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-models-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-models-node.api.md new file mode 100644 index 000000000000..442b25bbc475 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-models-node.api.md @@ -0,0 +1,3248 @@ +## API Report File for "@azure/arm-networkcloud" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public +export interface AadConfiguration { + adminGroupObjectIds: string[]; +} + +// @public +export interface AccessBridge extends TrackedResource { + readonly detailedStatus?: AccessBridgeDetailedStatus; + readonly detailedStatusMessage?: string; + readonly endpoints?: AccessBridgeEndpoint[]; + readonly etag?: string; + extendedLocation: ExtendedLocation; + ipv4ConnectedPrefix?: string; + ipv6ConnectedPrefix?: string; + networkId: string; + readonly protocol?: TransportProtocol; + readonly provisioningState?: AccessBridgeProvisioningState; + securityRules?: AccessBridgeSecurityRule[]; +} + +// @public +export type AccessBridgeAllowedName = string; + +// @public +export type AccessBridgeDetailedStatus = string; + +// @public +export interface AccessBridgeEndpoint { + readonly fqdn?: string; + readonly ipv4Address?: string; + readonly ipv6Address?: string; + readonly name?: string; +} + +// @public +export interface AccessBridgePatchParameters { + properties?: AccessBridgePatchProperties; + tags?: Record; +} + +// @public +export interface AccessBridgePatchProperties { + securityRules?: AccessBridgeSecurityRule[]; +} + +// @public +export interface AccessBridgeProperties { + readonly detailedStatus?: AccessBridgeDetailedStatus; + readonly detailedStatusMessage?: string; + readonly endpoints?: AccessBridgeEndpoint[]; + ipv4ConnectedPrefix?: string; + ipv6ConnectedPrefix?: string; + networkId: string; + readonly protocol?: TransportProtocol; + readonly provisioningState?: AccessBridgeProvisioningState; + securityRules?: AccessBridgeSecurityRule[]; +} + +// @public +export type AccessBridgeProvisioningState = string; + +// @public +export interface AccessBridgeSecurityRule { + description?: string; + direction: SecurityRuleDirection; + ipv4Addresses?: string[]; + ipv6Addresses?: string[]; + port: string; +} + +// @public +export interface ActionState { + readonly actionType?: string; + readonly correlationId?: string; + readonly endTime?: string; + readonly message?: string; + readonly startTime?: string; + readonly status?: ActionStateStatus; + readonly stepStates?: StepState[]; +} + +// @public +export type ActionStateStatus = string; + +// @public +export type ActionType = string; + +// @public +export interface AdministrativeCredentials { + password: string; + username: string; +} + +// @public +export interface AdministratorConfiguration { + adminUsername?: string; + sshPublicKeys?: SshPublicKey[]; +} + +// @public +export interface AdministratorConfigurationPatch { + sshPublicKeys?: SshPublicKey[]; +} + +// @public +export type AdvertiseToFabric = string; + +// @public +export interface AgentOptions { + hugepagesCount: number; + hugepagesSize?: HugepagesSize; +} + +// @public +export interface AgentPool extends TrackedResource { + administratorConfiguration?: AdministratorConfiguration; + agentOptions?: AgentOptions; + attachedNetworkConfiguration?: AttachedNetworkConfiguration; + availabilityZones?: string[]; + count: number; + readonly detailedStatus?: AgentPoolDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + // (undocumented) + extendedLocation?: ExtendedLocation; + readonly kubernetesVersion?: string; + labels?: KubernetesLabel[]; + mode: AgentPoolMode; + readonly provisioningState?: AgentPoolProvisioningState; + taints?: KubernetesLabel[]; + upgradeSettings?: AgentPoolUpgradeSettings; + vmSkuName: string; +} + +// @public +export type AgentPoolDetailedStatus = string; + +// @public +export type AgentPoolMode = string; + +// @public +export interface AgentPoolPatchParameters { + administratorConfiguration?: NodePoolAdministratorConfigurationPatch; + count?: number; + tags?: Record; + upgradeSettings?: AgentPoolUpgradeSettings; +} + +// @public +export interface AgentPoolPatchProperties { + administratorConfiguration?: NodePoolAdministratorConfigurationPatch; + count?: number; + upgradeSettings?: AgentPoolUpgradeSettings; +} + +// @public +export interface AgentPoolProperties { + administratorConfiguration?: AdministratorConfiguration; + agentOptions?: AgentOptions; + attachedNetworkConfiguration?: AttachedNetworkConfiguration; + availabilityZones?: string[]; + count: number; + readonly detailedStatus?: AgentPoolDetailedStatus; + readonly detailedStatusMessage?: string; + readonly kubernetesVersion?: string; + labels?: KubernetesLabel[]; + mode: AgentPoolMode; + readonly provisioningState?: AgentPoolProvisioningState; + taints?: KubernetesLabel[]; + upgradeSettings?: AgentPoolUpgradeSettings; + vmSkuName: string; +} + +// @public +export type AgentPoolProvisioningState = string; + +// @public +export interface AgentPoolUpgradeSettings { + drainTimeout?: number; + maxSurge?: string; + maxUnavailable?: string; +} + +// @public +export interface AnalyticsOutputSettings { + analyticsWorkspaceId?: string; + associatedIdentity?: IdentitySelector; +} + +// @public +export interface AttachedNetworkConfiguration { + l2Networks?: L2NetworkAttachmentConfiguration[]; + l3Networks?: L3NetworkAttachmentConfiguration[]; + trunkedNetworks?: TrunkedNetworkAttachmentConfiguration[]; +} + +// @public +export type AvailabilityLifecycle = string; + +// @public +export interface AvailableUpgrade { + readonly availabilityLifecycle?: AvailabilityLifecycle; + readonly version?: string; +} + +// @public +export interface BareMetalMachine extends TrackedResource { + readonly actionStates?: ActionState[]; + readonly associatedResourceIds?: string[]; + bmcConnectionString: string; + bmcCredentials: AdministrativeCredentials; + readonly bmcIpv4Address?: string; + readonly bmcIpv6Address?: string; + bmcMacAddress: string; + bootMacAddress: string; + readonly caCertificate?: CertificateInfo; + readonly clusterId?: string; + readonly cordonStatus?: BareMetalMachineCordonStatus; + readonly detailedStatus?: BareMetalMachineDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + extendedLocation: ExtendedLocation; + readonly hardwareInventory?: HardwareInventory; + readonly hardwareValidationStatus?: HardwareValidationStatus; + readonly hybridAksClustersAssociatedIds?: string[]; + readonly kubernetesNodeName?: string; + readonly kubernetesVersion?: string; + machineClusterVersion?: string; + machineDetails: string; + machineName: string; + readonly machineRoles?: string[]; + machineSkuId: string; + readonly monitoringConfigurationStatus?: BareMetalMachineMonitoringConfigurationStatus; + readonly oamIpv4Address?: string; + readonly oamIpv6Address?: string; + readonly osImage?: string; + readonly powerState?: BareMetalMachinePowerState; + readonly provisioningState?: BareMetalMachineProvisioningState; + rackId: string; + rackSlot: number; + readonly readyState?: BareMetalMachineReadyState; + readonly runtimeProtectionStatus?: RuntimeProtectionStatus; + readonly secretRotationStatus?: SecretRotationStatus[]; + serialNumber: string; + readonly serviceTag?: string; + readonly virtualMachinesAssociatedIds?: string[]; +} + +// @public +export interface BareMetalMachineCommandSpecification { + arguments?: string[]; + command: string; +} + +// @public +export interface BareMetalMachineConfigurationData { + readonly bmcConnectionString?: string; + bmcCredentials: AdministrativeCredentials; + bmcMacAddress: string; + bootMacAddress: string; + machineDetails?: string; + machineName?: string; + rackSlot: number; + serialNumber: string; +} + +// @public +export interface BareMetalMachineCordonParameters { + evacuate?: BareMetalMachineEvacuate; +} + +// @public +export type BareMetalMachineCordonStatus = string; + +// @public +export type BareMetalMachineDetailedStatus = string; + +// @public +export type BareMetalMachineEvacuate = string; + +// @public +export type BareMetalMachineHardwareValidationResult = string; + +// @public +export interface BareMetalMachineKeySet extends TrackedResource { + azureGroupId: string; + readonly detailedStatus?: BareMetalMachineKeySetDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + expiration: Date; + extendedLocation: ExtendedLocation; + jumpHostsAllowed: string[]; + readonly lastValidation?: Date; + osGroupName?: string; + privilegeLevel: BareMetalMachineKeySetPrivilegeLevel; + privilegeLevelName?: string; + readonly provisioningState?: BareMetalMachineKeySetProvisioningState; + userList: KeySetUser[]; + readonly userListStatus?: KeySetUserStatus[]; +} + +// @public +export type BareMetalMachineKeySetDetailedStatus = string; + +// @public +export interface BareMetalMachineKeySetPatchParameters { + expiration?: Date; + jumpHostsAllowed?: string[]; + tags?: Record; + userList?: KeySetUser[]; +} + +// @public +export interface BareMetalMachineKeySetPatchProperties { + expiration?: Date; + jumpHostsAllowed?: string[]; + userList?: KeySetUser[]; +} + +// @public +export type BareMetalMachineKeySetPrivilegeLevel = string; + +// @public +export interface BareMetalMachineKeySetProperties { + azureGroupId: string; + readonly detailedStatus?: BareMetalMachineKeySetDetailedStatus; + readonly detailedStatusMessage?: string; + expiration: Date; + jumpHostsAllowed: string[]; + readonly lastValidation?: Date; + osGroupName?: string; + privilegeLevel: BareMetalMachineKeySetPrivilegeLevel; + privilegeLevelName?: string; + readonly provisioningState?: BareMetalMachineKeySetProvisioningState; + userList: KeySetUser[]; + readonly userListStatus?: KeySetUserStatus[]; +} + +// @public +export type BareMetalMachineKeySetProvisioningState = string; + +// @public +export type BareMetalMachineKeySetUserSetupStatus = string; + +// @public +export type BareMetalMachineMetricsConfigurationStatusLogLevel = string; + +// @public +export type BareMetalMachineMetricsConfigurationStatusMetricsLevel = string; + +// @public +export interface BareMetalMachineMonitoringConfigurationStatus { + logLevel?: BareMetalMachineMetricsConfigurationStatusLogLevel; + metricsLevel?: BareMetalMachineMetricsConfigurationStatusMetricsLevel; +} + +// @public +export interface BareMetalMachinePatchParameters { + machineDetails?: string; + tags?: Record; +} + +// @public +export interface BareMetalMachinePatchProperties { + machineDetails?: string; +} + +// @public +export interface BareMetalMachinePowerOffParameters { + skipShutdown?: BareMetalMachineSkipShutdown; +} + +// @public +export type BareMetalMachinePowerState = string; + +// @public +export interface BareMetalMachineProperties { + readonly actionStates?: ActionState[]; + readonly associatedResourceIds?: string[]; + bmcConnectionString: string; + bmcCredentials: AdministrativeCredentials; + readonly bmcIpv4Address?: string; + readonly bmcIpv6Address?: string; + bmcMacAddress: string; + bootMacAddress: string; + readonly caCertificate?: CertificateInfo; + readonly clusterId?: string; + readonly cordonStatus?: BareMetalMachineCordonStatus; + readonly detailedStatus?: BareMetalMachineDetailedStatus; + readonly detailedStatusMessage?: string; + readonly hardwareInventory?: HardwareInventory; + readonly hardwareValidationStatus?: HardwareValidationStatus; + readonly hybridAksClustersAssociatedIds?: string[]; + readonly kubernetesNodeName?: string; + readonly kubernetesVersion?: string; + machineClusterVersion?: string; + machineDetails: string; + machineName: string; + readonly machineRoles?: string[]; + machineSkuId: string; + readonly monitoringConfigurationStatus?: BareMetalMachineMonitoringConfigurationStatus; + readonly oamIpv4Address?: string; + readonly oamIpv6Address?: string; + readonly osImage?: string; + readonly powerState?: BareMetalMachinePowerState; + readonly provisioningState?: BareMetalMachineProvisioningState; + rackId: string; + rackSlot: number; + readonly readyState?: BareMetalMachineReadyState; + readonly runtimeProtectionStatus?: RuntimeProtectionStatus; + readonly secretRotationStatus?: SecretRotationStatus[]; + serialNumber: string; + readonly serviceTag?: string; + readonly virtualMachinesAssociatedIds?: string[]; +} + +// @public +export type BareMetalMachineProvisioningState = string; + +// @public +export type BareMetalMachineReadyState = string; + +// @public +export interface BareMetalMachineReimageParameters { + safeguardMode?: BareMetalMachineReimageSafeguardMode; +} + +// @public +export type BareMetalMachineReimageSafeguardMode = string; + +// @public +export interface BareMetalMachineReplaceParameters { + bmcCredentials?: AdministrativeCredentials; + bmcMacAddress?: string; + bootMacAddress?: string; + machineName?: string; + safeguardMode?: BareMetalMachineReplaceSafeguardMode; + serialNumber?: string; + storagePolicy?: BareMetalMachineReplaceStoragePolicy; +} + +// @public +export type BareMetalMachineReplaceSafeguardMode = string; + +// @public +export type BareMetalMachineReplaceStoragePolicy = string; + +// @public +export interface BareMetalMachineRunCommandParameters { + arguments?: string[]; + limitTimeSeconds: number; + script: string; +} + +// @public +export interface BareMetalMachineRunDataExtractsParameters { + commands: BareMetalMachineCommandSpecification[]; + limitTimeSeconds: number; +} + +// @public +export interface BareMetalMachineRunReadCommandsParameters { + commands: BareMetalMachineCommandSpecification[]; + limitTimeSeconds: number; +} + +// @public +export type BareMetalMachineSkipShutdown = string; + +// @public +export type BfdEnabled = string; + +// @public +export interface BgpAdvertisement { + advertiseToFabric?: AdvertiseToFabric; + communities?: string[]; + ipAddressPools: string[]; + peers?: string[]; +} + +// @public +export type BgpMultiHop = string; + +// @public +export interface BgpServiceLoadBalancerConfiguration { + bgpAdvertisements?: BgpAdvertisement[]; + bgpPeers?: ServiceLoadBalancerBgpPeer[]; + fabricPeeringEnabled?: FabricPeeringEnabled; + ipAddressPools?: IpAddressPool[]; +} + +// @public +export interface BmcKeySet extends TrackedResource { + azureGroupId: string; + readonly detailedStatus?: BmcKeySetDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + expiration: Date; + extendedLocation: ExtendedLocation; + readonly lastValidation?: Date; + privilegeLevel: BmcKeySetPrivilegeLevel; + readonly provisioningState?: BmcKeySetProvisioningState; + userList: KeySetUser[]; + readonly userListStatus?: KeySetUserStatus[]; +} + +// @public +export type BmcKeySetDetailedStatus = string; + +// @public +export interface BmcKeySetPatchParameters { + expiration?: Date; + tags?: Record; + userList?: KeySetUser[]; +} + +// @public +export interface BmcKeySetPatchProperties { + expiration?: Date; + userList?: KeySetUser[]; +} + +// @public +export type BmcKeySetPrivilegeLevel = string; + +// @public +export interface BmcKeySetProperties { + azureGroupId: string; + readonly detailedStatus?: BmcKeySetDetailedStatus; + readonly detailedStatusMessage?: string; + expiration: Date; + readonly lastValidation?: Date; + privilegeLevel: BmcKeySetPrivilegeLevel; + readonly provisioningState?: BmcKeySetProvisioningState; + userList: KeySetUser[]; + readonly userListStatus?: KeySetUserStatus[]; +} + +// @public +export type BmcKeySetProvisioningState = string; + +// @public +export type BootstrapProtocol = string; + +// @public +export interface CertificateInfo { + readonly hash?: string; + readonly value?: string; +} + +// @public +export interface CloudServicesNetwork extends TrackedResource { + additionalEgressEndpoints?: EgressEndpoint[]; + readonly associatedResourceIds?: string[]; + readonly clusterId?: string; + readonly detailedStatus?: CloudServicesNetworkDetailedStatus; + readonly detailedStatusMessage?: string; + enableDefaultEgressEndpoints?: CloudServicesNetworkEnableDefaultEgressEndpoints; + readonly enabledEgressEndpoints?: EgressEndpoint[]; + readonly etag?: string; + extendedLocation: ExtendedLocation; + readonly hybridAksClustersAssociatedIds?: string[]; + readonly interfaceName?: string; + readonly provisioningState?: CloudServicesNetworkProvisioningState; + storageOptions?: CloudServicesNetworkStorageOptions; + readonly storageStatus?: CloudServicesNetworkStorageStatus; + readonly virtualMachinesAssociatedIds?: string[]; +} + +// @public +export type CloudServicesNetworkDetailedStatus = string; + +// @public +export type CloudServicesNetworkEnableDefaultEgressEndpoints = string; + +// @public +export interface CloudServicesNetworkPatchParameters { + additionalEgressEndpoints?: EgressEndpoint[]; + enableDefaultEgressEndpoints?: CloudServicesNetworkEnableDefaultEgressEndpoints; + storageOptions?: CloudServicesNetworkStorageOptionsPatch; + tags?: Record; +} + +// @public +export interface CloudServicesNetworkPatchProperties { + additionalEgressEndpoints?: EgressEndpoint[]; + enableDefaultEgressEndpoints?: CloudServicesNetworkEnableDefaultEgressEndpoints; + storageOptions?: CloudServicesNetworkStorageOptionsPatch; +} + +// @public +export interface CloudServicesNetworkProperties { + additionalEgressEndpoints?: EgressEndpoint[]; + readonly associatedResourceIds?: string[]; + readonly clusterId?: string; + readonly detailedStatus?: CloudServicesNetworkDetailedStatus; + readonly detailedStatusMessage?: string; + enableDefaultEgressEndpoints?: CloudServicesNetworkEnableDefaultEgressEndpoints; + readonly enabledEgressEndpoints?: EgressEndpoint[]; + readonly hybridAksClustersAssociatedIds?: string[]; + readonly interfaceName?: string; + readonly provisioningState?: CloudServicesNetworkProvisioningState; + storageOptions?: CloudServicesNetworkStorageOptions; + readonly storageStatus?: CloudServicesNetworkStorageStatus; + readonly virtualMachinesAssociatedIds?: string[]; +} + +// @public +export type CloudServicesNetworkProvisioningState = string; + +// @public +export type CloudServicesNetworkStorageMode = string; + +// @public +export interface CloudServicesNetworkStorageOptions { + mode?: CloudServicesNetworkStorageMode; + sizeMiB?: number; + storageApplianceId?: string; +} + +// @public +export interface CloudServicesNetworkStorageOptionsPatch { + mode?: CloudServicesNetworkStorageMode; + sizeMiB?: number; + storageApplianceId?: string; +} + +// @public +export interface CloudServicesNetworkStorageStatus { + readonly mode?: CloudServicesNetworkStorageMode; + readonly sizeMiB?: number; + readonly status?: CloudServicesNetworkStorageStatusStatus; + readonly statusMessage?: string; + readonly volumeId?: string; +} + +// @public +export type CloudServicesNetworkStorageStatusStatus = string; + +// @public +export interface Cluster extends TrackedResource { + readonly actionStates?: ActionState[]; + aggregatorOrSingleRackDefinition: RackDefinition; + analyticsOutputSettings?: AnalyticsOutputSettings; + analyticsWorkspaceId?: string; + readonly availableUpgradeVersions?: ClusterAvailableUpgradeVersion[]; + readonly clusterCapacity?: ClusterCapacity; + readonly clusterConnectionStatus?: ClusterConnectionStatus; + readonly clusterExtendedLocation?: ExtendedLocation; + clusterLocation?: string; + readonly clusterManagerConnectionStatus?: ClusterManagerConnectionStatus; + readonly clusterManagerId?: string; + clusterServicePrincipal?: ServicePrincipalInformation; + clusterType: ClusterType; + clusterVersion: string; + commandOutputSettings?: CommandOutputSettings; + computeDeploymentThreshold?: ValidationThreshold; + computeRackDefinitions?: RackDefinition[]; + readonly detailedStatus?: ClusterDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + extendedLocation: ExtendedLocation; + readonly hybridAksExtendedLocation?: ExtendedLocation; + identity?: ManagedServiceIdentity; + kind?: DeploymentType; + readonly lastSuccessfulVersionUpdateTime?: Date; + readonly managedCredentials?: string[]; + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + readonly manualActionCount?: number; + networkFabricId: string; + readonly provisioningState?: ClusterProvisioningState; + runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; + secretArchive?: ClusterSecretArchive; + secretArchiveSettings?: SecretArchiveSettings; + readonly supportExpiryDate?: string; + updateStrategy?: ClusterUpdateStrategy; + vulnerabilityScanningSettings?: VulnerabilityScanningSettings; + readonly workloadResourceIds?: string[]; +} + +// @public +export interface ClusterAvailableUpgradeVersion { + readonly controlImpact?: ControlImpact; + readonly expectedDuration?: string; + readonly impactDescription?: string; + readonly supportExpiryDate?: string; + readonly targetClusterVersion?: string; + readonly workloadImpact?: WorkloadImpact; +} + +// @public +export interface ClusterAvailableVersion { + readonly supportExpiryDate?: string; + readonly targetClusterVersion?: string; +} + +// @public +export interface ClusterCapacity { + availableApplianceStorageGB?: number; + availableCoreCount?: number; + availableHostStorageGB?: number; + availableMemoryGB?: number; + totalApplianceStorageGB?: number; + totalCoreCount?: number; + totalHostStorageGB?: number; + totalMemoryGB?: number; +} + +// @public +export type ClusterConnectionStatus = string; + +// @public +export type ClusterContinueUpdateVersionMachineGroupTargetingMode = string; + +// @public +export interface ClusterContinueUpdateVersionParameters { + machineGroupTargetingMode?: ClusterContinueUpdateVersionMachineGroupTargetingMode; + safeguardMode?: ClusterContinueUpdateVersionSafeguardMode; +} + +// @public +export type ClusterContinueUpdateVersionSafeguardMode = string; + +// @public +export interface ClusterDeployParameters { + skipValidationsForMachines?: string[]; +} + +// @public +export type ClusterDetailedStatus = string; + +// @public +export type ClusterInspectAdditionalAction = string; + +// @public +export interface ClusterInspectParameters { + additionalActions?: ClusterInspectAdditionalAction[]; + filterDevices?: FilterDevices; +} + +// @public +export interface ClusterManager extends TrackedResource { + analyticsWorkspaceId?: string; + availabilityZones?: string[]; + readonly clusterVersions?: ClusterAvailableVersion[]; + readonly detailedStatus?: ClusterManagerDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + fabricControllerId: string; + identity?: ManagedServiceIdentity; + kind?: DeploymentType; + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + readonly managerExtendedLocation?: ExtendedLocation; + readonly provisioningState?: ClusterManagerProvisioningState; + readonly relayConfiguration?: ClusterManagerRelayConfiguration; + vmSize?: string; +} + +// @public +export type ClusterManagerConnectionStatus = string; + +// @public +export type ClusterManagerDetailedStatus = string; + +// @public +export interface ClusterManagerPatchParameters { + identity?: ManagedServiceIdentity; + tags?: Record; +} + +// @public +export interface ClusterManagerProperties { + analyticsWorkspaceId?: string; + availabilityZones?: string[]; + readonly clusterVersions?: ClusterAvailableVersion[]; + readonly detailedStatus?: ClusterManagerDetailedStatus; + readonly detailedStatusMessage?: string; + fabricControllerId: string; + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + readonly managerExtendedLocation?: ExtendedLocation; + readonly provisioningState?: ClusterManagerProvisioningState; + readonly relayConfiguration?: ClusterManagerRelayConfiguration; + vmSize?: string; +} + +// @public +export type ClusterManagerProvisioningState = string; + +// @public +export interface ClusterManagerRelayConfiguration { + relayNamespaceId?: string; +} + +// @public +export interface ClusterManagerUpdateRelayPrivateEndpointConnectionParameters { + connectionState: RelayPrivateEndpointConnectionState; + description?: string; + privateEndpointResourceId: string; +} + +// @public +export interface ClusterMetricsConfiguration extends TrackedResource { + collectionInterval: number; + readonly detailedStatus?: ClusterMetricsConfigurationDetailedStatus; + readonly detailedStatusMessage?: string; + readonly disabledMetrics?: string[]; + enabledMetrics?: string[]; + readonly etag?: string; + extendedLocation: ExtendedLocation; + readonly provisioningState?: ClusterMetricsConfigurationProvisioningState; +} + +// @public +export type ClusterMetricsConfigurationDetailedStatus = string; + +// @public +export interface ClusterMetricsConfigurationPatchParameters { + collectionInterval?: number; + enabledMetrics?: string[]; + tags?: Record; +} + +// @public +export interface ClusterMetricsConfigurationPatchProperties { + collectionInterval?: number; + enabledMetrics?: string[]; +} + +// @public +export interface ClusterMetricsConfigurationProperties { + collectionInterval: number; + readonly detailedStatus?: ClusterMetricsConfigurationDetailedStatus; + readonly detailedStatusMessage?: string; + readonly disabledMetrics?: string[]; + enabledMetrics?: string[]; + readonly provisioningState?: ClusterMetricsConfigurationProvisioningState; +} + +// @public +export type ClusterMetricsConfigurationProvisioningState = string; + +// @public +export interface ClusterPatchParameters { + aggregatorOrSingleRackDefinition?: RackDefinition; + analyticsOutputSettings?: AnalyticsOutputSettings; + clusterLocation?: string; + clusterServicePrincipal?: ServicePrincipalInformation; + commandOutputSettings?: CommandOutputSettings; + computeDeploymentThreshold?: ValidationThreshold; + computeRackDefinitions?: RackDefinition[]; + identity?: ManagedServiceIdentity; + runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; + secretArchive?: ClusterSecretArchive; + secretArchiveSettings?: SecretArchiveSettings; + tags?: Record; + updateStrategy?: ClusterUpdateStrategy; + vulnerabilityScanningSettings?: VulnerabilityScanningSettingsPatch; +} + +// @public +export interface ClusterPatchProperties { + aggregatorOrSingleRackDefinition?: RackDefinition; + analyticsOutputSettings?: AnalyticsOutputSettings; + clusterLocation?: string; + clusterServicePrincipal?: ServicePrincipalInformation; + commandOutputSettings?: CommandOutputSettings; + computeDeploymentThreshold?: ValidationThreshold; + computeRackDefinitions?: RackDefinition[]; + runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; + secretArchive?: ClusterSecretArchive; + secretArchiveSettings?: SecretArchiveSettings; + updateStrategy?: ClusterUpdateStrategy; + vulnerabilityScanningSettings?: VulnerabilityScanningSettingsPatch; +} + +// @public +export interface ClusterProperties { + readonly actionStates?: ActionState[]; + aggregatorOrSingleRackDefinition: RackDefinition; + analyticsOutputSettings?: AnalyticsOutputSettings; + analyticsWorkspaceId?: string; + readonly availableUpgradeVersions?: ClusterAvailableUpgradeVersion[]; + readonly clusterCapacity?: ClusterCapacity; + readonly clusterConnectionStatus?: ClusterConnectionStatus; + readonly clusterExtendedLocation?: ExtendedLocation; + clusterLocation?: string; + readonly clusterManagerConnectionStatus?: ClusterManagerConnectionStatus; + readonly clusterManagerId?: string; + clusterServicePrincipal?: ServicePrincipalInformation; + clusterType: ClusterType; + clusterVersion: string; + commandOutputSettings?: CommandOutputSettings; + computeDeploymentThreshold?: ValidationThreshold; + computeRackDefinitions?: RackDefinition[]; + readonly detailedStatus?: ClusterDetailedStatus; + readonly detailedStatusMessage?: string; + readonly hybridAksExtendedLocation?: ExtendedLocation; + readonly lastSuccessfulVersionUpdateTime?: Date; + readonly managedCredentials?: string[]; + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + readonly manualActionCount?: number; + networkFabricId: string; + readonly provisioningState?: ClusterProvisioningState; + runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; + secretArchive?: ClusterSecretArchive; + secretArchiveSettings?: SecretArchiveSettings; + readonly supportExpiryDate?: string; + updateStrategy?: ClusterUpdateStrategy; + vulnerabilityScanningSettings?: VulnerabilityScanningSettings; + readonly workloadResourceIds?: string[]; +} + +// @public +export type ClusterProvisioningState = string; + +// @public +export interface ClusterRotateCredentialParameters { + credentials: string[]; +} + +// @public +export interface ClusterScanRuntimeParameters { + scanActivity?: ClusterScanRuntimeParametersScanActivity; +} + +// @public +export type ClusterScanRuntimeParametersScanActivity = string; + +// @public +export interface ClusterSecretArchive { + keyVaultId: string; + useKeyVault?: ClusterSecretArchiveEnabled; +} + +// @public +export type ClusterSecretArchiveEnabled = string; + +// @public +export type ClusterType = string; + +// @public +export interface ClusterUpdateStrategy { + maxUnavailable?: number; + strategyType: ClusterUpdateStrategyType; + thresholdType: ValidationThresholdType; + thresholdValue: number; + waitTimeMinutes?: number; +} + +// @public +export type ClusterUpdateStrategyType = string; + +// @public +export interface ClusterUpdateVersionParameters { + safeguardMode?: ClusterUpdateVersionSafeguardMode; + targetClusterVersion: string; +} + +// @public +export type ClusterUpdateVersionSafeguardMode = string; + +// @public +export interface CommandOutputOverride { + associatedIdentity?: IdentitySelector; + commandOutputType?: CommandOutputType; + containerUrl?: string; +} + +// @public +export interface CommandOutputSettings { + associatedIdentity?: IdentitySelector; + containerUrl?: string; + overrides?: CommandOutputOverride[]; +} + +// @public +export type CommandOutputType = string; + +// @public +interface Console_2 extends TrackedResource { + readonly detailedStatus?: ConsoleDetailedStatus; + readonly detailedStatusMessage?: string; + enabled: ConsoleEnabled; + readonly etag?: string; + expiration?: Date; + extendedLocation: ExtendedLocation; + readonly privateLinkServiceId?: string; + readonly provisioningState?: ConsoleProvisioningState; + sshPublicKey: SshPublicKey; + readonly virtualMachineAccessId?: string; +} +export { Console_2 as Console } + +// @public +export type ConsoleDetailedStatus = string; + +// @public +export type ConsoleEnabled = string; + +// @public +export interface ConsolePatchParameters { + enabled?: ConsoleEnabled; + expiration?: Date; + sshPublicKey?: SshPublicKey; + tags?: Record; +} + +// @public +export interface ConsolePatchProperties { + enabled?: ConsoleEnabled; + expiration?: Date; + sshPublicKey?: SshPublicKey; +} + +// @public +export interface ConsoleProperties { + readonly detailedStatus?: ConsoleDetailedStatus; + readonly detailedStatusMessage?: string; + enabled: ConsoleEnabled; + expiration?: Date; + readonly privateLinkServiceId?: string; + readonly provisioningState?: ConsoleProvisioningState; + sshPublicKey: SshPublicKey; + readonly virtualMachineAccessId?: string; +} + +// @public +export type ConsoleProvisioningState = string; + +// @public +export type ControlImpact = string; + +// @public +export interface ControlPlaneNodeConfiguration { + administratorConfiguration?: AdministratorConfiguration; + availabilityZones?: string[]; + count: number; + vmSkuName: string; +} + +// @public +export interface ControlPlaneNodePatchConfiguration { + administratorConfiguration?: AdministratorConfigurationPatch; + count?: number; +} + +// @public +export type CreatedByType = string; + +// @public +export type DefaultGateway = string; + +// @public +export type DeploymentType = string; + +// @public +export type DeviceConnectionType = string; + +// @public +export type DiskType = string; + +// @public +export interface EgressEndpoint { + category: string; + endpoints: EndpointDependency[]; +} + +// @public +export interface EndpointDependency { + domainName: string; + port?: number; +} + +// @public +export interface ErrorAdditionalInfo { + readonly info?: any; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +export interface ExtendedLocation { + name: string; + type: ExtendedLocationType; +} + +// @public +export type ExtendedLocationType = string; + +// @public +export type FabricPeeringEnabled = string; + +// @public +export type FeatureDetailedStatus = string; + +// @public +export interface FeatureStatus { + readonly detailedStatus?: FeatureDetailedStatus; + readonly detailedStatusMessage?: string; + readonly name?: string; + readonly version?: string; +} + +// @public +export interface FilterDevices { + bareMetalMachineNames?: string[]; + rackNames?: string[]; +} + +// @public +export interface HardwareInventory { + readonly additionalHostInformation?: string; + readonly interfaces?: HardwareInventoryNetworkInterface[]; + readonly nics?: Nic[]; +} + +// @public +export interface HardwareInventoryNetworkInterface { + readonly linkStatus?: string; + readonly macAddress?: string; + readonly name?: string; + readonly networkInterfaceId?: string; +} + +// @public +export interface HardwareValidationStatus { + readonly lastValidationTime?: Date; + readonly result?: BareMetalMachineHardwareValidationResult; +} + +// @public +export type HugepagesSize = string; + +// @public +export type HybridAksIpamEnabled = string; + +// @public +export type HybridAksPluginType = string; + +// @public +export interface IdentitySelector { + identityType?: ManagedServiceIdentitySelectorType; + userAssignedIdentityResourceId?: string; +} + +// @public +export interface ImageRepositoryCredentials { + password: string; + registryUrl: string; + username: string; +} + +// @public +export interface InitialAgentPoolConfiguration { + administratorConfiguration?: AdministratorConfiguration; + agentOptions?: AgentOptions; + attachedNetworkConfiguration?: AttachedNetworkConfiguration; + availabilityZones?: string[]; + count: number; + labels?: KubernetesLabel[]; + mode: AgentPoolMode; + name: string; + taints?: KubernetesLabel[]; + upgradeSettings?: AgentPoolUpgradeSettings; + vmSkuName: string; +} + +// @public +export interface IpAddressPool { + addresses: string[]; + autoAssign?: BfdEnabled; + name: string; + onlyUseHostIps?: BfdEnabled; +} + +// @public +export type IpAllocationType = string; + +// @public +export interface KeySetUser { + azureUserName: string; + description?: string; + sshPublicKey: SshPublicKey; + userPrincipalName?: string; +} + +// @public +export interface KeySetUserStatus { + readonly azureUserName?: string; + readonly status?: BareMetalMachineKeySetUserSetupStatus; + readonly statusMessage?: string; +} + +// @public +export enum KnownAccessBridgeAllowedName { + Bastion = "Bastion", + PrivateVault = "PrivateVault", + StorageDashboard = "StorageDashboard" +} + +// @public +export enum KnownAccessBridgeDetailedStatus { + Degraded = "Degraded", + Failed = "Failed", + Running = "Running" +} + +// @public +export enum KnownAccessBridgeProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownActionStateStatus { + Completed = "Completed", + Failed = "Failed", + InProgress = "InProgress" +} + +// @public +export enum KnownActionType { + Internal = "Internal" +} + +// @public +export enum KnownAdvertiseToFabric { + False = "False", + True = "True" +} + +// @public +export enum KnownAgentPoolDetailedStatus { + Available = "Available", + Error = "Error", + Provisioning = "Provisioning" +} + +// @public +export enum KnownAgentPoolMode { + NotApplicable = "NotApplicable", + System = "System", + User = "User" +} + +// @public +export enum KnownAgentPoolProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownAvailabilityLifecycle { + GenerallyAvailable = "GenerallyAvailable", + Preview = "Preview" +} + +// @public +export enum KnownBareMetalMachineCordonStatus { + Cordoned = "Cordoned", + Uncordoned = "Uncordoned" +} + +// @public +export enum KnownBareMetalMachineDetailedStatus { + Available = "Available", + Deprovisioning = "Deprovisioning", + Error = "Error", + Preparing = "Preparing", + Provisioned = "Provisioned", + Provisioning = "Provisioning" +} + +// @public +export enum KnownBareMetalMachineEvacuate { + False = "False", + True = "True" +} + +// @public +export enum KnownBareMetalMachineHardwareValidationResult { + Fail = "Fail", + Pass = "Pass" +} + +// @public +export enum KnownBareMetalMachineKeySetDetailedStatus { + AllActive = "AllActive", + AllInvalid = "AllInvalid", + SomeInvalid = "SomeInvalid", + Validating = "Validating" +} + +// @public +export enum KnownBareMetalMachineKeySetPrivilegeLevel { + Other = "Other", + Standard = "Standard", + Superuser = "Superuser" +} + +// @public +export enum KnownBareMetalMachineKeySetProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownBareMetalMachineKeySetUserSetupStatus { + Active = "Active", + Invalid = "Invalid" +} + +// @public +export enum KnownBareMetalMachineMetricsConfigurationStatusLogLevel { + Default = "Default", + Nexus = "Nexus" +} + +// @public +export enum KnownBareMetalMachineMetricsConfigurationStatusMetricsLevel { + Default = "Default", + Nexus = "Nexus" +} + +// @public +export enum KnownBareMetalMachinePowerState { + Off = "Off", + On = "On" +} + +// @public +export enum KnownBareMetalMachineProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownBareMetalMachineReadyState { + False = "False", + True = "True" +} + +// @public +export enum KnownBareMetalMachineReimageSafeguardMode { + All = "All", + None = "None" +} + +// @public +export enum KnownBareMetalMachineReplaceSafeguardMode { + All = "All", + None = "None" +} + +// @public +export enum KnownBareMetalMachineReplaceStoragePolicy { + DiscardAll = "DiscardAll", + Preserve = "Preserve" +} + +// @public +export enum KnownBareMetalMachineSkipShutdown { + False = "False", + True = "True" +} + +// @public +export enum KnownBfdEnabled { + False = "False", + True = "True" +} + +// @public +export enum KnownBgpMultiHop { + False = "False", + True = "True" +} + +// @public +export enum KnownBmcKeySetDetailedStatus { + AllActive = "AllActive", + AllInvalid = "AllInvalid", + SomeInvalid = "SomeInvalid", + Validating = "Validating" +} + +// @public +export enum KnownBmcKeySetPrivilegeLevel { + Administrator = "Administrator", + ReadOnly = "ReadOnly" +} + +// @public +export enum KnownBmcKeySetProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownBootstrapProtocol { + PXE = "PXE" +} + +// @public +export enum KnownCloudServicesNetworkDetailedStatus { + Available = "Available", + Error = "Error", + Provisioning = "Provisioning" +} + +// @public +export enum KnownCloudServicesNetworkEnableDefaultEgressEndpoints { + False = "False", + True = "True" +} + +// @public +export enum KnownCloudServicesNetworkProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownCloudServicesNetworkStorageMode { + None = "None", + Standard = "Standard" +} + +// @public +export enum KnownCloudServicesNetworkStorageStatusStatus { + Available = "Available", + ExpandingVolume = "ExpandingVolume", + ExpansionFailed = "ExpansionFailed", + Initializing = "Initializing", + None = "None", + Repairing = "Repairing" +} + +// @public +export enum KnownClusterConnectionStatus { + Connected = "Connected", + Disconnected = "Disconnected", + Timeout = "Timeout", + Undefined = "Undefined" +} + +// @public +export enum KnownClusterContinueUpdateVersionMachineGroupTargetingMode { + AlphaByRack = "AlphaByRack" +} + +// @public +export enum KnownClusterContinueUpdateVersionSafeguardMode { + All = "All", + None = "None" +} + +// @public +export enum KnownClusterDetailedStatus { + Degraded = "Degraded", + Deleting = "Deleting", + Deploying = "Deploying", + Disconnected = "Disconnected", + Failed = "Failed", + PendingDeployment = "PendingDeployment", + Running = "Running", + UpdatePaused = "UpdatePaused", + Updating = "Updating" +} + +// @public +export enum KnownClusterInspectAdditionalAction { + ResetHardware = "ResetHardware" +} + +// @public +export enum KnownClusterManagerConnectionStatus { + Connected = "Connected", + Unreachable = "Unreachable" +} + +// @public +export enum KnownClusterManagerDetailedStatus { + Available = "Available", + Error = "Error", + Provisioning = "Provisioning", + ProvisioningFailed = "ProvisioningFailed", + UpdateFailed = "UpdateFailed", + Updating = "Updating" +} + +// @public +export enum KnownClusterManagerProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownClusterMetricsConfigurationDetailedStatus { + Applied = "Applied", + Error = "Error", + Processing = "Processing" +} + +// @public +export enum KnownClusterMetricsConfigurationProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownClusterProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating", + Validating = "Validating" +} + +// @public +export enum KnownClusterScanRuntimeParametersScanActivity { + Scan = "Scan", + Skip = "Skip" +} + +// @public +export enum KnownClusterSecretArchiveEnabled { + False = "False", + True = "True" +} + +// @public +export enum KnownClusterType { + MultiRack = "MultiRack", + SingleRack = "SingleRack" +} + +// @public +export enum KnownClusterUpdateStrategyType { + PauseAfterRack = "PauseAfterRack", + Rack = "Rack" +} + +// @public +export enum KnownClusterUpdateVersionSafeguardMode { + All = "All", + None = "None" +} + +// @public +export enum KnownCommandOutputType { + BareMetalMachineRunCommand = "BareMetalMachineRunCommand", + BareMetalMachineRunDataExtracts = "BareMetalMachineRunDataExtracts", + BareMetalMachineRunDataExtractsRestricted = "BareMetalMachineRunDataExtractsRestricted", + BareMetalMachineRunReadCommands = "BareMetalMachineRunReadCommands", + ClusterSupportAdministrativeActions = "ClusterSupportAdministrativeActions", + StorageRunReadCommands = "StorageRunReadCommands" +} + +// @public +export enum KnownConsoleDetailedStatus { + Error = "Error", + Ready = "Ready" +} + +// @public +export enum KnownConsoleEnabled { + False = "False", + True = "True" +} + +// @public +export enum KnownConsoleProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownControlImpact { + False = "False", + True = "True" +} + +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + +// @public +export enum KnownDefaultGateway { + False = "False", + True = "True" +} + +// @public +export enum KnownDeploymentType { + AzureLocal = "AzureLocal", + Nexus = "Nexus" +} + +// @public +export enum KnownDeviceConnectionType { + PCI = "PCI" +} + +// @public +export enum KnownDiskType { + HDD = "HDD", + SSD = "SSD" +} + +// @public +export enum KnownExtendedLocationType { + CustomLocation = "CustomLocation", + EdgeZone = "EdgeZone" +} + +// @public +export enum KnownFabricPeeringEnabled { + False = "False", + True = "True" +} + +// @public +export enum KnownFeatureDetailedStatus { + Failed = "Failed", + Running = "Running", + Unknown = "Unknown" +} + +// @public +export enum KnownHugepagesSize { + OneG = "1G", + TwoM = "2M" +} + +// @public +export enum KnownHybridAksIpamEnabled { + False = "False", + True = "True" +} + +// @public +export enum KnownHybridAksPluginType { + Dpdk = "DPDK", + OSDevice = "OSDevice", + Sriov = "SRIOV" +} + +// @public +export enum KnownIpAllocationType { + DualStack = "DualStack", + IPV4 = "IPV4", + IPV6 = "IPV6" +} + +// @public +export enum KnownKubernetesClusterDetailedStatus { + Available = "Available", + Error = "Error", + Provisioning = "Provisioning" +} + +// @public +export enum KnownKubernetesClusterFeatureAvailabilityLifecycle { + GenerallyAvailable = "GenerallyAvailable", + Preview = "Preview" +} + +// @public +export enum KnownKubernetesClusterFeatureDetailedStatus { + Error = "Error", + Installed = "Installed", + Provisioning = "Provisioning" +} + +// @public +export enum KnownKubernetesClusterFeatureProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownKubernetesClusterFeatureRequired { + False = "False", + True = "True" +} + +// @public +export enum KnownKubernetesClusterNodeDetailedStatus { + Available = "Available", + Error = "Error", + Provisioning = "Provisioning", + Running = "Running", + Scheduling = "Scheduling", + Stopped = "Stopped", + Terminating = "Terminating", + Unknown = "Unknown" +} + +// @public +export enum KnownKubernetesClusterProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Created = "Created", + Deleting = "Deleting", + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownKubernetesNodePowerState { + Off = "Off", + On = "On", + Unknown = "Unknown" +} + +// @public +export enum KnownKubernetesNodeRole { + ControlPlane = "ControlPlane", + Worker = "Worker" +} + +// @public +export enum KnownKubernetesPluginType { + Dpdk = "DPDK", + Ipvlan = "IPVLAN", + Macvlan = "MACVLAN", + OSDevice = "OSDevice", + Sriov = "SRIOV" +} + +// @public +export enum KnownKubernetesVersionProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownL2NetworkDetailedStatus { + Available = "Available", + Error = "Error", + Provisioning = "Provisioning" +} + +// @public +export enum KnownL2NetworkProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownL3NetworkConfigurationIpamEnabled { + False = "False", + True = "True" +} + +// @public +export enum KnownL3NetworkDetailedStatus { + Available = "Available", + Error = "Error", + Provisioning = "Provisioning" +} + +// @public +export enum KnownL3NetworkProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownMachineSkuDiskConnectionType { + Pcie = "PCIE", + Raid = "RAID", + SAS = "SAS", + Sata = "SATA" +} + +// @public +export enum KnownManagedServiceIdentitySelectorType { + SystemAssignedIdentity = "SystemAssignedIdentity", + UserAssignedIdentity = "UserAssignedIdentity" +} + +// @public +export enum KnownManagedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned", + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", + UserAssigned = "UserAssigned" +} + +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + +// @public +export enum KnownOsDiskCreateOption { + Ephemeral = "Ephemeral", + Persistent = "Persistent" +} + +// @public +export enum KnownOsDiskDeleteOption { + Delete = "Delete" +} + +// @public +export enum KnownRackDetailedStatus { + Available = "Available", + Error = "Error", + Provisioning = "Provisioning" +} + +// @public +export enum KnownRackProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownRackSkuProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownRackSkuType { + Aggregator = "Aggregator", + Compute = "Compute", + Single = "Single" +} + +// @public +export enum KnownRelayPrivateEndpointConnectionState { + Approved = "Approved", + Rejected = "Rejected" +} + +// @public +export enum KnownRelayType { + Platform = "Platform", + Public = "Public" +} + +// @public +export enum KnownRemoteVendorManagementFeature { + Supported = "Supported", + Unsupported = "Unsupported" +} + +// @public +export enum KnownRemoteVendorManagementStatus { + Disabled = "Disabled", + Enabled = "Enabled", + Unsupported = "Unsupported" +} + +// @public +export enum KnownRuntimeProtectionAgentHealthStatus { + Healthy = "Healthy", + Unhealthy = "Unhealthy" +} + +// @public +export enum KnownRuntimeProtectionAgentLicenseStatus { + Licensed = "Licensed", + Unlicensed = "Unlicensed" +} + +// @public +export enum KnownRuntimeProtectionDefinitionUpdateMode { + Automatic = "Automatic", + None = "None" +} + +// @public +export enum KnownRuntimeProtectionEnforcementLevel { + Audit = "Audit", + Disabled = "Disabled", + OnDemand = "OnDemand", + Passive = "Passive", + RealTime = "RealTime" +} + +// @public +export enum KnownSecurityRuleDirection { + Inbound = "Inbound", + Outbound = "Outbound" +} + +// @public +export enum KnownSkipShutdown { + False = "False", + True = "True" +} + +// @public +export enum KnownStepStateStatus { + Completed = "Completed", + Failed = "Failed", + InProgress = "InProgress", + NotStarted = "NotStarted" +} + +// @public +export enum KnownStorageApplianceDetailedStatus { + Available = "Available", + Degraded = "Degraded", + Error = "Error", + Provisioning = "Provisioning" +} + +// @public +export enum KnownStorageApplianceMetricsConfigurationStatusLogLevel { + Default = "Default", + Nexus = "Nexus" +} + +// @public +export enum KnownStorageApplianceMetricsConfigurationStatusMetricsLevel { + Default = "Default", + Nexus = "Nexus" +} + +// @public +export enum KnownStorageApplianceProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownTransportProtocol { + TCP = "TCP", + UDP = "UDP" +} + +// @public +export enum KnownTrunkedNetworkDetailedStatus { + Available = "Available", + Error = "Error", + Provisioning = "Provisioning" +} + +// @public +export enum KnownTrunkedNetworkProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownValidationThresholdGrouping { + PerCluster = "PerCluster", + PerRack = "PerRack" +} + +// @public +export enum KnownValidationThresholdType { + CountSuccess = "CountSuccess", + PercentSuccess = "PercentSuccess" +} + +// @public +export enum KnownVersions { + V20250901 = "2025-09-01", + V20260101Preview = "2026-01-01-preview", + V20260501Preview = "2026-05-01-preview" +} + +// @public +export enum KnownVirtualMachineBootMethod { + Bios = "BIOS", + Uefi = "UEFI" +} + +// @public +export enum KnownVirtualMachineDetailedStatus { + Available = "Available", + Error = "Error", + Provisioning = "Provisioning", + Running = "Running", + Scheduling = "Scheduling", + Stopped = "Stopped", + Terminating = "Terminating", + Unknown = "Unknown" +} + +// @public +export enum KnownVirtualMachineDeviceModelType { + T1 = "T1", + T2 = "T2", + T3 = "T3" +} + +// @public +export enum KnownVirtualMachineIPAllocationMethod { + Disabled = "Disabled", + Dynamic = "Dynamic", + Static = "Static" +} + +// @public +export enum KnownVirtualMachineIsolateEmulatorThread { + False = "False", + True = "True" +} + +// @public +export enum KnownVirtualMachinePlacementHintPodAffinityScope { + Machine = "Machine", + Rack = "Rack" +} + +// @public +export enum KnownVirtualMachinePlacementHintType { + Affinity = "Affinity", + AntiAffinity = "AntiAffinity" +} + +// @public +export enum KnownVirtualMachinePowerState { + Off = "Off", + On = "On", + Unknown = "Unknown" +} + +// @public +export enum KnownVirtualMachineProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownVirtualMachineSchedulingExecution { + Hard = "Hard", + Soft = "Soft" +} + +// @public +export enum KnownVirtualMachineVirtioInterfaceType { + Modern = "Modern", + Transitional = "Transitional" +} + +// @public +export enum KnownVolumeDetailedStatus { + Active = "Active", + Error = "Error", + Provisioning = "Provisioning" +} + +// @public +export enum KnownVolumeProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownVulnerabilityScanningSettingsContainerScan { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownWorkloadImpact { + False = "False", + True = "True" +} + +// @public +export interface KubernetesCluster extends TrackedResource { + aadConfiguration?: AadConfiguration; + administratorConfiguration?: AdministratorConfiguration; + readonly attachedNetworkIds?: string[]; + readonly availableUpgrades?: AvailableUpgrade[]; + readonly clusterId?: string; + readonly connectedClusterId?: string; + readonly controlPlaneKubernetesVersion?: string; + controlPlaneNodeConfiguration: ControlPlaneNodeConfiguration; + readonly detailedStatus?: KubernetesClusterDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + extendedLocation: ExtendedLocation; + readonly featureStatuses?: FeatureStatus[]; + initialAgentPoolConfigurations: InitialAgentPoolConfiguration[]; + kubernetesVersion: string; + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + networkConfiguration: NetworkConfiguration; + readonly nodes?: KubernetesClusterNode[]; + readonly provisioningState?: KubernetesClusterProvisioningState; +} + +// @public +export type KubernetesClusterDetailedStatus = string; + +// @public +export interface KubernetesClusterFeature extends TrackedResource { + readonly availabilityLifecycle?: KubernetesClusterFeatureAvailabilityLifecycle; + readonly detailedStatus?: KubernetesClusterFeatureDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + options?: StringKeyValuePair[]; + readonly provisioningState?: KubernetesClusterFeatureProvisioningState; + readonly required?: KubernetesClusterFeatureRequired; + readonly version?: string; +} + +// @public +export type KubernetesClusterFeatureAvailabilityLifecycle = string; + +// @public +export type KubernetesClusterFeatureDetailedStatus = string; + +// @public +export interface KubernetesClusterFeaturePatchParameters { + options?: StringKeyValuePair[]; + tags?: Record; +} + +// @public +export interface KubernetesClusterFeaturePatchProperties { + options?: StringKeyValuePair[]; +} + +// @public +export interface KubernetesClusterFeatureProperties { + readonly availabilityLifecycle?: KubernetesClusterFeatureAvailabilityLifecycle; + readonly detailedStatus?: KubernetesClusterFeatureDetailedStatus; + readonly detailedStatusMessage?: string; + options?: StringKeyValuePair[]; + readonly provisioningState?: KubernetesClusterFeatureProvisioningState; + readonly required?: KubernetesClusterFeatureRequired; + readonly version?: string; +} + +// @public +export type KubernetesClusterFeatureProvisioningState = string; + +// @public +export type KubernetesClusterFeatureRequired = string; + +// @public +export interface KubernetesClusterNode { + readonly agentPoolId?: string; + readonly availabilityZone?: string; + readonly bareMetalMachineId?: string; + readonly cpuCores?: number; + readonly detailedStatus?: KubernetesClusterNodeDetailedStatus; + readonly detailedStatusMessage?: string; + readonly diskSizeGB?: number; + readonly image?: string; + readonly kubernetesVersion?: string; + readonly labels?: KubernetesLabel[]; + readonly memorySizeGB?: number; + readonly mode?: AgentPoolMode; + readonly name?: string; + readonly networkAttachments?: NetworkAttachment[]; + readonly powerState?: KubernetesNodePowerState; + readonly role?: KubernetesNodeRole; + readonly taints?: KubernetesLabel[]; + readonly vmSkuName?: string; +} + +// @public +export type KubernetesClusterNodeDetailedStatus = string; + +// @public +export interface KubernetesClusterPatchParameters { + administratorConfiguration?: AdministratorConfigurationPatch; + controlPlaneNodeConfiguration?: ControlPlaneNodePatchConfiguration; + kubernetesVersion?: string; + tags?: Record; +} + +// @public +export interface KubernetesClusterPatchProperties { + administratorConfiguration?: AdministratorConfigurationPatch; + controlPlaneNodeConfiguration?: ControlPlaneNodePatchConfiguration; + kubernetesVersion?: string; +} + +// @public +export interface KubernetesClusterProperties { + aadConfiguration?: AadConfiguration; + administratorConfiguration?: AdministratorConfiguration; + readonly attachedNetworkIds?: string[]; + readonly availableUpgrades?: AvailableUpgrade[]; + readonly clusterId?: string; + readonly connectedClusterId?: string; + readonly controlPlaneKubernetesVersion?: string; + controlPlaneNodeConfiguration: ControlPlaneNodeConfiguration; + readonly detailedStatus?: KubernetesClusterDetailedStatus; + readonly detailedStatusMessage?: string; + readonly featureStatuses?: FeatureStatus[]; + initialAgentPoolConfigurations: InitialAgentPoolConfiguration[]; + kubernetesVersion: string; + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + networkConfiguration: NetworkConfiguration; + readonly nodes?: KubernetesClusterNode[]; + readonly provisioningState?: KubernetesClusterProvisioningState; +} + +// @public +export type KubernetesClusterProvisioningState = string; + +// @public +export interface KubernetesClusterRestartNodeParameters { + nodeName: string; +} + +// @public +export interface KubernetesLabel { + key: string; + value: string; +} + +// @public +export type KubernetesNodePowerState = string; + +// @public +export type KubernetesNodeRole = string; + +// @public +export type KubernetesPluginType = string; + +// @public +export interface KubernetesVersion extends TrackedResource { + readonly etag?: string; + extendedLocation: ExtendedLocation; + readonly provisioningState?: KubernetesVersionProvisioningState; + readonly values?: KubernetesVersionValue[]; +} + +// @public +export interface KubernetesVersionPatchParameters { + tags?: Record; +} + +// @public +export interface KubernetesVersionProperties { + readonly provisioningState?: KubernetesVersionProvisioningState; + readonly values?: KubernetesVersionValue[]; +} + +// @public +export type KubernetesVersionProvisioningState = string; + +// @public +export interface KubernetesVersionValue { + readonly description?: string; + readonly version?: string; +} + +// @public +export interface L2Network extends TrackedResource { + readonly associatedResourceIds?: string[]; + readonly clusterId?: string; + readonly detailedStatus?: L2NetworkDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + extendedLocation: ExtendedLocation; + readonly hybridAksClustersAssociatedIds?: string[]; + hybridAksPluginType?: HybridAksPluginType; + interfaceName?: string; + l2IsolationDomainId: string; + readonly provisioningState?: L2NetworkProvisioningState; + readonly virtualMachinesAssociatedIds?: string[]; +} + +// @public +export interface L2NetworkAttachmentConfiguration { + networkId: string; + pluginType?: KubernetesPluginType; +} + +// @public +export type L2NetworkDetailedStatus = string; + +// @public +export interface L2NetworkPatchParameters { + tags?: Record; +} + +// @public +export interface L2NetworkProperties { + readonly associatedResourceIds?: string[]; + readonly clusterId?: string; + readonly detailedStatus?: L2NetworkDetailedStatus; + readonly detailedStatusMessage?: string; + readonly hybridAksClustersAssociatedIds?: string[]; + hybridAksPluginType?: HybridAksPluginType; + interfaceName?: string; + l2IsolationDomainId: string; + readonly provisioningState?: L2NetworkProvisioningState; + readonly virtualMachinesAssociatedIds?: string[]; +} + +// @public +export type L2NetworkProvisioningState = string; + +// @public +export interface L2ServiceLoadBalancerConfiguration { + ipAddressPools?: IpAddressPool[]; +} + +// @public +export interface L3Network extends TrackedResource { + readonly associatedResourceIds?: string[]; + readonly clusterId?: string; + readonly detailedStatus?: L3NetworkDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + extendedLocation: ExtendedLocation; + readonly hybridAksClustersAssociatedIds?: string[]; + hybridAksIpamEnabled?: HybridAksIpamEnabled; + hybridAksPluginType?: HybridAksPluginType; + interfaceName?: string; + ipAllocationType?: IpAllocationType; + ipv4ConnectedPrefix?: string; + ipv6ConnectedPrefix?: string; + l3IsolationDomainId: string; + readonly provisioningState?: L3NetworkProvisioningState; + readonly virtualMachinesAssociatedIds?: string[]; + vlan: number; +} + +// @public +export interface L3NetworkAttachmentConfiguration { + ipamEnabled?: L3NetworkConfigurationIpamEnabled; + networkId: string; + pluginType?: KubernetesPluginType; +} + +// @public +export type L3NetworkConfigurationIpamEnabled = string; + +// @public +export type L3NetworkDetailedStatus = string; + +// @public +export interface L3NetworkPatchParameters { + tags?: Record; +} + +// @public +export interface L3NetworkProperties { + readonly associatedResourceIds?: string[]; + readonly clusterId?: string; + readonly detailedStatus?: L3NetworkDetailedStatus; + readonly detailedStatusMessage?: string; + readonly hybridAksClustersAssociatedIds?: string[]; + hybridAksIpamEnabled?: HybridAksIpamEnabled; + hybridAksPluginType?: HybridAksPluginType; + interfaceName?: string; + ipAllocationType?: IpAllocationType; + ipv4ConnectedPrefix?: string; + ipv6ConnectedPrefix?: string; + l3IsolationDomainId: string; + readonly provisioningState?: L3NetworkProvisioningState; + readonly virtualMachinesAssociatedIds?: string[]; + vlan: number; +} + +// @public +export type L3NetworkProvisioningState = string; + +// @public +export interface LldpNeighbor { + readonly portDescription?: string; + readonly portName?: string; + readonly systemDescription?: string; + readonly systemName?: string; +} + +// @public +export interface MachineDisk { + readonly capacityGB?: number; + readonly connection?: MachineSkuDiskConnectionType; + readonly type?: DiskType; +} + +// @public +export type MachineSkuDiskConnectionType = string; + +// @public +export interface MachineSkuProperties { + readonly bootstrapProtocol?: BootstrapProtocol; + readonly cpuCores?: number; + readonly cpuSockets?: number; + readonly disks?: MachineDisk[]; + readonly generation?: string; + readonly hardwareVersion?: string; + readonly memoryCapacityGB?: number; + readonly model?: string; + readonly networkInterfaces?: NetworkInterface[]; + readonly totalThreads?: number; + readonly vendor?: string; +} + +// @public +export interface MachineSkuSlot { + readonly bootstrapProtocol?: BootstrapProtocol; + readonly cpuCores?: number; + readonly cpuSockets?: number; + readonly disks?: MachineDisk[]; + readonly generation?: string; + readonly hardwareVersion?: string; + readonly memoryCapacityGB?: number; + readonly model?: string; + readonly networkInterfaces?: NetworkInterface[]; + readonly rackSlot?: number; + readonly totalThreads?: number; + readonly vendor?: string; +} + +// @public +export interface ManagedResourceGroupConfiguration { + location?: string; + name?: string; +} + +// @public +export interface ManagedServiceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: ManagedServiceIdentityType; + userAssignedIdentities?: Record; +} + +// @public +export type ManagedServiceIdentitySelectorType = string; + +// @public +export type ManagedServiceIdentityType = string; + +// @public +export interface NetworkAttachment { + attachedNetworkId: string; + defaultGateway?: DefaultGateway; + ipAllocationMethod: VirtualMachineIPAllocationMethod; + ipv4Address?: string; + ipv6Address?: string; + readonly macAddress?: string; + networkAttachmentName?: string; +} + +// @public +export interface NetworkConfiguration { + attachedNetworkConfiguration?: AttachedNetworkConfiguration; + bgpServiceLoadBalancerConfiguration?: BgpServiceLoadBalancerConfiguration; + cloudServicesNetworkId: string; + cniNetworkId: string; + dnsServiceIp?: string; + l2ServiceLoadBalancerConfiguration?: L2ServiceLoadBalancerConfiguration; + podCidrs?: string[]; + serviceCidrs?: string[]; +} + +// @public +export interface NetworkInterface { + readonly address?: string; + readonly deviceConnectionType?: DeviceConnectionType; + readonly model?: string; + readonly physicalSlot?: number; + readonly portCount?: number; + readonly portSpeed?: number; + readonly vendor?: string; +} + +// @public +export interface Nic { + readonly lldpNeighbor?: LldpNeighbor; + readonly macAddress?: string; + readonly name?: string; +} + +// @public +export interface NodePoolAdministratorConfigurationPatch { + sshPublicKeys?: SshPublicKey[]; +} + +// @public +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OperationStatusResult { + readonly endTime?: Date; + readonly error?: ErrorDetail; + readonly exitCode?: string; + readonly id?: string; + readonly name?: string; + readonly operations?: OperationStatusResult[]; + readonly outputHead?: string; + readonly percentComplete?: number; + readonly resourceId?: string; + readonly resultRef?: string; + readonly resultUrl?: string; + readonly startTime?: Date; + status: string; +} + +// @public +export interface OperationStatusResultProperties { + readonly exitCode?: string; + readonly outputHead?: string; + readonly resultRef?: string; + readonly resultUrl?: string; +} + +// @public +export type Origin = string; + +// @public +export interface OsDisk { + createOption?: OsDiskCreateOption; + deleteOption?: OsDiskDeleteOption; + diskSizeGB: number; +} + +// @public +export type OsDiskCreateOption = string; + +// @public +export type OsDiskDeleteOption = string; + +// @public +export interface ProxyResource extends Resource { +} + +// @public +export interface Rack extends TrackedResource { + availabilityZone: string; + readonly clusterId?: string; + readonly detailedStatus?: RackDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + extendedLocation: ExtendedLocation; + readonly provisioningState?: RackProvisioningState; + rackLocation: string; + rackSerialNumber: string; + rackSkuId: string; +} + +// @public +export interface RackDefinition { + availabilityZone?: string; + bareMetalMachineConfigurationData?: BareMetalMachineConfigurationData[]; + networkRackId: string; + rackLocation?: string; + rackSerialNumber: string; + rackSkuId: string; + storageApplianceConfigurationData?: StorageApplianceConfigurationData[]; +} + +// @public +export type RackDetailedStatus = string; + +// @public +export interface RackPatchParameters { + rackLocation?: string; + rackSerialNumber?: string; + tags?: Record; +} + +// @public +export interface RackProperties { + availabilityZone: string; + readonly clusterId?: string; + readonly detailedStatus?: RackDetailedStatus; + readonly detailedStatusMessage?: string; + readonly provisioningState?: RackProvisioningState; + rackLocation: string; + rackSerialNumber: string; + rackSkuId: string; +} + +// @public +export type RackProvisioningState = string; + +// @public +export interface RackSku extends ProxyResource { + readonly computeMachines?: MachineSkuSlot[]; + readonly controllerMachines?: MachineSkuSlot[]; + readonly deploymentType?: DeploymentType; + readonly description?: string; + readonly maxClusterSlots?: number; + readonly provisioningState?: RackSkuProvisioningState; + readonly rackType?: RackSkuType; + readonly storageAppliances?: StorageApplianceSkuSlot[]; + readonly supportedRackSkuIds?: string[]; +} + +// @public +export interface RackSkuProperties { + readonly computeMachines?: MachineSkuSlot[]; + readonly controllerMachines?: MachineSkuSlot[]; + readonly deploymentType?: DeploymentType; + readonly description?: string; + readonly maxClusterSlots?: number; + readonly provisioningState?: RackSkuProvisioningState; + readonly rackType?: RackSkuType; + readonly storageAppliances?: StorageApplianceSkuSlot[]; + readonly supportedRackSkuIds?: string[]; +} + +// @public +export type RackSkuProvisioningState = string; + +// @public +export type RackSkuType = string; + +// @public +export interface RacksPatchProperties { + rackLocation?: string; + rackSerialNumber?: string; +} + +// @public +export type RelayPrivateEndpointConnectionState = string; + +// @public +export type RelayType = string; + +// @public +export type RemoteVendorManagementFeature = string; + +// @public +export type RemoteVendorManagementStatus = string; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export type RuntimeProtectionAgentHealthStatus = string; + +// @public +export type RuntimeProtectionAgentLicenseStatus = string; + +// @public +export interface RuntimeProtectionConfiguration { + definitionUpdateMode?: RuntimeProtectionDefinitionUpdateMode; + enforcementLevel?: RuntimeProtectionEnforcementLevel; +} + +// @public +export type RuntimeProtectionDefinitionUpdateMode = string; + +// @public +export type RuntimeProtectionEnforcementLevel = string; + +// @public +export interface RuntimeProtectionStatus { + readonly agentHealthStatus?: RuntimeProtectionAgentHealthStatus; + readonly agentHealthStatusIssues?: string[]; + readonly agentLicenseStatus?: RuntimeProtectionAgentLicenseStatus; + readonly definitionsLastUpdated?: Date; + readonly definitionsVersion?: string; + readonly definitionUpdateMode?: RuntimeProtectionDefinitionUpdateMode; + readonly enforcementLevel?: RuntimeProtectionEnforcementLevel; + readonly scanCompletedTime?: Date; + readonly scanScheduledTime?: Date; + readonly scanStartedTime?: Date; +} + +// @public +export interface SecretArchiveReference { + readonly keyVaultId?: string; + readonly keyVaultUri?: string; + readonly secretName?: string; + readonly secretVersion?: string; +} + +// @public +export interface SecretArchiveSettings { + associatedIdentity?: IdentitySelector; + vaultUri?: string; +} + +// @public +export interface SecretRotationStatus { + readonly expirePeriodDays?: number; + readonly lastRotationTime?: Date; + readonly rotationPeriodDays?: number; + readonly secretArchiveReference?: SecretArchiveReference; + readonly secretType?: string; +} + +// @public +export type SecurityRuleDirection = string; + +// @public +export interface ServiceLoadBalancerBgpPeer { + bfdEnabled?: BfdEnabled; + bgpMultiHop?: BgpMultiHop; + holdTime?: string; + keepAliveTime?: string; + myAsn?: number; + name: string; + password?: string; + peerAddress: string; + peerAsn: number; + peerPort?: number; +} + +// @public +export interface ServicePrincipalInformation { + applicationId: string; + password: string; + principalId: string; + tenantId: string; +} + +// @public +export type SkipShutdown = string; + +// @public +export interface SshPublicKey { + keyData: string; +} + +// @public +export interface StepState { + readonly endTime?: string; + readonly message?: string; + readonly startTime?: string; + readonly status?: StepStateStatus; + readonly stepName?: string; +} + +// @public +export type StepStateStatus = string; + +// @public +export interface StorageAppliance extends TrackedResource { + administratorCredentials: AdministrativeCredentials; + readonly caCertificate?: CertificateInfo; + readonly capacity?: number; + readonly capacityUsed?: number; + readonly clusterId?: string; + readonly detailedStatus?: StorageApplianceDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + readonly expansionShelves?: StorageApplianceExpansionShelf[]; + extendedLocation: ExtendedLocation; + readonly managementIpv4Address?: string; + readonly manufacturer?: string; + readonly model?: string; + readonly monitoringConfigurationStatus?: StorageApplianceMonitoringConfigurationStatus; + readonly provisioningState?: StorageApplianceProvisioningState; + rackId: string; + rackSlot: number; + readonly remoteVendorManagementFeature?: RemoteVendorManagementFeature; + readonly remoteVendorManagementStatus?: RemoteVendorManagementStatus; + readonly secretRotationStatus?: SecretRotationStatus[]; + serialNumber: string; + storageApplianceSkuId: string; + readonly version?: string; +} + +// @public +export interface StorageApplianceCommandSpecification { + arguments?: string[]; + command: string; +} + +// @public +export interface StorageApplianceConfigurationData { + adminCredentials: AdministrativeCredentials; + rackSlot: number; + serialNumber: string; + storageApplianceName?: string; +} + +// @public +export type StorageApplianceDetailedStatus = string; + +// @public +export interface StorageApplianceEnableRemoteVendorManagementParameters { + supportEndpoints?: string[]; +} + +// @public +export interface StorageApplianceExpansionShelf { + model?: string; + version?: string; +} + +// @public +export type StorageApplianceMetricsConfigurationStatusLogLevel = string; + +// @public +export type StorageApplianceMetricsConfigurationStatusMetricsLevel = string; + +// @public +export interface StorageApplianceMonitoringConfigurationStatus { + logLevel?: StorageApplianceMetricsConfigurationStatusLogLevel; + metricsLevel?: StorageApplianceMetricsConfigurationStatusMetricsLevel; +} + +// @public +export interface StorageAppliancePatchParameters { + serialNumber?: string; + tags?: Record; +} + +// @public +export interface StorageAppliancePatchProperties { + serialNumber?: string; +} + +// @public +export interface StorageApplianceProperties { + administratorCredentials: AdministrativeCredentials; + readonly caCertificate?: CertificateInfo; + readonly capacity?: number; + readonly capacityUsed?: number; + readonly clusterId?: string; + readonly detailedStatus?: StorageApplianceDetailedStatus; + readonly detailedStatusMessage?: string; + readonly expansionShelves?: StorageApplianceExpansionShelf[]; + readonly managementIpv4Address?: string; + readonly manufacturer?: string; + readonly model?: string; + readonly monitoringConfigurationStatus?: StorageApplianceMonitoringConfigurationStatus; + readonly provisioningState?: StorageApplianceProvisioningState; + rackId: string; + rackSlot: number; + readonly remoteVendorManagementFeature?: RemoteVendorManagementFeature; + readonly remoteVendorManagementStatus?: RemoteVendorManagementStatus; + readonly secretRotationStatus?: SecretRotationStatus[]; + serialNumber: string; + storageApplianceSkuId: string; + readonly version?: string; +} + +// @public +export type StorageApplianceProvisioningState = string; + +// @public +export interface StorageApplianceRunReadCommandsParameters { + commands: StorageApplianceCommandSpecification[]; + limitTimeSeconds: number; +} + +// @public +export interface StorageApplianceSkuProperties { + readonly capacityGB?: number; + readonly model?: string; +} + +// @public +export interface StorageApplianceSkuSlot { + readonly capacityGB?: number; + readonly model?: string; + readonly rackSlot?: number; +} + +// @public +export interface StorageProfile { + osDisk: OsDisk; + volumeAttachments?: string[]; +} + +// @public +export interface StringKeyValuePair { + key: string; + value: string; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: Record; +} + +// @public +export type TransportProtocol = string; + +// @public +export interface TrunkedNetwork extends TrackedResource { + readonly associatedResourceIds?: string[]; + readonly clusterId?: string; + readonly detailedStatus?: TrunkedNetworkDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + extendedLocation: ExtendedLocation; + readonly hybridAksClustersAssociatedIds?: string[]; + hybridAksPluginType?: HybridAksPluginType; + interfaceName?: string; + isolationDomainIds: string[]; + readonly provisioningState?: TrunkedNetworkProvisioningState; + readonly virtualMachinesAssociatedIds?: string[]; + vlans: number[]; +} + +// @public +export interface TrunkedNetworkAttachmentConfiguration { + networkId: string; + pluginType?: KubernetesPluginType; +} + +// @public +export type TrunkedNetworkDetailedStatus = string; + +// @public +export interface TrunkedNetworkPatchParameters { + tags?: Record; +} + +// @public +export interface TrunkedNetworkProperties { + readonly associatedResourceIds?: string[]; + readonly clusterId?: string; + readonly detailedStatus?: TrunkedNetworkDetailedStatus; + readonly detailedStatusMessage?: string; + readonly hybridAksClustersAssociatedIds?: string[]; + hybridAksPluginType?: HybridAksPluginType; + interfaceName?: string; + isolationDomainIds: string[]; + readonly provisioningState?: TrunkedNetworkProvisioningState; + readonly virtualMachinesAssociatedIds?: string[]; + vlans: number[]; +} + +// @public +export type TrunkedNetworkProvisioningState = string; + +// @public +export interface UserAssignedIdentity { + readonly clientId?: string; + readonly principalId?: string; +} + +// @public +export interface ValidationThreshold { + grouping: ValidationThresholdGrouping; + type: ValidationThresholdType; + value: number; +} + +// @public +export type ValidationThresholdGrouping = string; + +// @public +export type ValidationThresholdType = string; + +// @public +export interface VirtualMachine extends TrackedResource { + adminUsername: string; + readonly availabilityZone?: string; + readonly bareMetalMachineId?: string; + bootMethod?: VirtualMachineBootMethod; + cloudServicesNetworkAttachment: NetworkAttachment; + readonly clusterId?: string; + consoleExtendedLocation?: ExtendedLocation; + cpuCores: number; + readonly detailedStatus?: VirtualMachineDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + extendedLocation: ExtendedLocation; + identity?: ManagedServiceIdentity; + isolateEmulatorThread?: VirtualMachineIsolateEmulatorThread; + memorySizeGB: number; + networkAttachments?: NetworkAttachment[]; + networkData?: string; + networkDataContent?: string; + placementHints?: VirtualMachinePlacementHint[]; + readonly powerState?: VirtualMachinePowerState; + readonly provisioningState?: VirtualMachineProvisioningState; + sshPublicKeys?: SshPublicKey[]; + storageProfile: StorageProfile; + userData?: string; + userDataContent?: string; + virtioInterface?: VirtualMachineVirtioInterfaceType; + vmDeviceModel?: VirtualMachineDeviceModelType; + vmImage: string; + vmImageRepositoryCredentials?: ImageRepositoryCredentials; + readonly volumes?: string[]; +} + +// @public +export interface VirtualMachineAssignRelayParameters { + machineId: string; + relayType?: RelayType; +} + +// @public +export type VirtualMachineBootMethod = string; + +// @public +export type VirtualMachineDetailedStatus = string; + +// @public +export type VirtualMachineDeviceModelType = string; + +// @public +export type VirtualMachineIPAllocationMethod = string; + +// @public +export type VirtualMachineIsolateEmulatorThread = string; + +// @public +export interface VirtualMachinePatchParameters { + identity?: ManagedServiceIdentity; + tags?: Record; + vmImageRepositoryCredentials?: ImageRepositoryCredentials; +} + +// @public +export interface VirtualMachinePatchProperties { + vmImageRepositoryCredentials?: ImageRepositoryCredentials; +} + +// @public +export interface VirtualMachinePlacementHint { + hintType: VirtualMachinePlacementHintType; + resourceId: string; + schedulingExecution: VirtualMachineSchedulingExecution; + scope: VirtualMachinePlacementHintPodAffinityScope; +} + +// @public +export type VirtualMachinePlacementHintPodAffinityScope = string; + +// @public +export type VirtualMachinePlacementHintType = string; + +// @public +export interface VirtualMachinePowerOffParameters { + skipShutdown?: SkipShutdown; +} + +// @public +export type VirtualMachinePowerState = string; + +// @public +export interface VirtualMachineProperties { + adminUsername: string; + readonly availabilityZone?: string; + readonly bareMetalMachineId?: string; + bootMethod?: VirtualMachineBootMethod; + cloudServicesNetworkAttachment: NetworkAttachment; + readonly clusterId?: string; + consoleExtendedLocation?: ExtendedLocation; + cpuCores: number; + readonly detailedStatus?: VirtualMachineDetailedStatus; + readonly detailedStatusMessage?: string; + isolateEmulatorThread?: VirtualMachineIsolateEmulatorThread; + memorySizeGB: number; + networkAttachments?: NetworkAttachment[]; + networkData?: string; + networkDataContent?: string; + placementHints?: VirtualMachinePlacementHint[]; + readonly powerState?: VirtualMachinePowerState; + readonly provisioningState?: VirtualMachineProvisioningState; + sshPublicKeys?: SshPublicKey[]; + storageProfile: StorageProfile; + userData?: string; + userDataContent?: string; + virtioInterface?: VirtualMachineVirtioInterfaceType; + vmDeviceModel?: VirtualMachineDeviceModelType; + vmImage: string; + vmImageRepositoryCredentials?: ImageRepositoryCredentials; + readonly volumes?: string[]; +} + +// @public +export type VirtualMachineProvisioningState = string; + +// @public +export type VirtualMachineSchedulingExecution = string; + +// @public +export type VirtualMachineVirtioInterfaceType = string; + +// @public +export interface Volume extends TrackedResource { + readonly allocatedSizeMiB?: number; + readonly assignedStorageApplianceId?: string; + readonly attachedTo?: string[]; + readonly detailedStatus?: VolumeDetailedStatus; + readonly detailedStatusMessage?: string; + readonly etag?: string; + extendedLocation: ExtendedLocation; + readonly provisioningState?: VolumeProvisioningState; + readonly serialNumber?: string; + sizeMiB: number; + storageApplianceId?: string; +} + +// @public +export type VolumeDetailedStatus = string; + +// @public +export interface VolumePatchParameters { + tags?: Record; +} + +// @public +export interface VolumeProperties { + readonly allocatedSizeMiB?: number; + readonly assignedStorageApplianceId?: string; + readonly attachedTo?: string[]; + readonly detailedStatus?: VolumeDetailedStatus; + readonly detailedStatusMessage?: string; + readonly provisioningState?: VolumeProvisioningState; + readonly serialNumber?: string; + sizeMiB: number; + storageApplianceId?: string; +} + +// @public +export type VolumeProvisioningState = string; + +// @public +export interface VulnerabilityScanningSettings { + containerScan?: VulnerabilityScanningSettingsContainerScan; +} + +// @public +export type VulnerabilityScanningSettingsContainerScan = string; + +// @public +export interface VulnerabilityScanningSettingsPatch { + containerScan?: VulnerabilityScanningSettingsContainerScan; +} + +// @public +export type WorkloadImpact = string; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-node.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-node.api.md index 353f3a433a38..da36ce8f784e 100644 --- a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-node.api.md +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud-node.api.md @@ -4,17 +4,144 @@ ```ts -import type * as coreAuth from '@azure/core-auth'; -import * as coreClient from '@azure/core-client'; -import type { OperationState } from '@azure/core-lro'; -import type { PagedAsyncIterableIterator } from '@azure/core-paging'; -import type { SimplePollerLike } from '@azure/core-lro'; +import { AbortSignalLike } from '@azure/abort-controller'; +import { CancelOnProgress } from '@azure/core-lro'; +import { ClientOptions } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PathUncheckedResponse } from '@azure-rest/core-client'; +import { Pipeline } from '@azure/core-rest-pipeline'; +import { PollerLike } from '@azure/core-lro'; +import { TokenCredential } from '@azure/core-auth'; // @public export interface AadConfiguration { adminGroupObjectIds: string[]; } +// @public +export interface AccessBridge extends TrackedResource { + readonly detailedStatus?: AccessBridgeDetailedStatus; + readonly detailedStatusMessage?: string; + readonly endpoints?: AccessBridgeEndpoint[]; + readonly etag?: string; + extendedLocation: ExtendedLocation; + ipv4ConnectedPrefix?: string; + ipv6ConnectedPrefix?: string; + networkId: string; + readonly protocol?: TransportProtocol; + readonly provisioningState?: AccessBridgeProvisioningState; + securityRules?: AccessBridgeSecurityRule[]; +} + +// @public +export type AccessBridgeAllowedName = string; + +// @public +export type AccessBridgeDetailedStatus = string; + +// @public +export interface AccessBridgeEndpoint { + readonly fqdn?: string; + readonly ipv4Address?: string; + readonly ipv6Address?: string; + readonly name?: string; +} + +// @public +export interface AccessBridgePatchParameters { + properties?: AccessBridgePatchProperties; + tags?: Record; +} + +// @public +export interface AccessBridgePatchProperties { + securityRules?: AccessBridgeSecurityRule[]; +} + +// @public +export interface AccessBridgeProperties { + readonly detailedStatus?: AccessBridgeDetailedStatus; + readonly detailedStatusMessage?: string; + readonly endpoints?: AccessBridgeEndpoint[]; + ipv4ConnectedPrefix?: string; + ipv6ConnectedPrefix?: string; + networkId: string; + readonly protocol?: TransportProtocol; + readonly provisioningState?: AccessBridgeProvisioningState; + securityRules?: AccessBridgeSecurityRule[]; +} + +// @public +export type AccessBridgeProvisioningState = string; + +// @public +export interface AccessBridgesCreateOrUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + +// @public +export interface AccessBridgesDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + +// @public +export interface AccessBridgeSecurityRule { + description?: string; + direction: SecurityRuleDirection; + ipv4Addresses?: string[]; + ipv6Addresses?: string[]; + port: string; +} + +// @public +export interface AccessBridgesGetOptionalParams extends OperationOptions { +} + +// @public +export interface AccessBridgesListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface AccessBridgesListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} + +// @public +export interface AccessBridgesOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, accessBridgeName: AccessBridgeAllowedName, accessBridge: AccessBridge, options?: AccessBridgesCreateOrUpdateOptionalParams) => Promise, AccessBridge>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, accessBridgeName: AccessBridgeAllowedName, accessBridge: AccessBridge, options?: AccessBridgesCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, accessBridgeName: AccessBridgeAllowedName, options?: AccessBridgesDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, accessBridgeName: AccessBridgeAllowedName, options?: AccessBridgesDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, accessBridgeName: AccessBridgeAllowedName, options?: AccessBridgesUpdateOptionalParams) => Promise, AccessBridge>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, accessBridgeName: AccessBridgeAllowedName, options?: AccessBridgesUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, accessBridgeName: AccessBridgeAllowedName, accessBridge: AccessBridge, options?: AccessBridgesCreateOrUpdateOptionalParams) => PollerLike, AccessBridge>; + delete: (resourceGroupName: string, accessBridgeName: AccessBridgeAllowedName, options?: AccessBridgesDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, accessBridgeName: AccessBridgeAllowedName, options?: AccessBridgesGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: AccessBridgesListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: AccessBridgesListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, accessBridgeName: AccessBridgeAllowedName, options?: AccessBridgesUpdateOptionalParams) => PollerLike, AccessBridge>; +} + +// @public +export interface AccessBridgesUpdateOptionalParams extends OperationOptions { + accessBridgeUpdateParameters?: AccessBridgePatchParameters; + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; +} + // @public export interface ActionState { readonly actionType?: string; @@ -68,6 +195,7 @@ export interface AgentPool extends TrackedResource { readonly detailedStatus?: AgentPoolDetailedStatus; readonly detailedStatusMessage?: string; readonly etag?: string; + // (undocumented) extendedLocation?: ExtendedLocation; readonly kubernetesVersion?: string; labels?: KubernetesLabel[]; @@ -78,29 +206,9 @@ export interface AgentPool extends TrackedResource { vmSkuName: string; } -// @public -export interface AgentPoolConfiguration { - administratorConfiguration?: AdministratorConfiguration; - agentOptions?: AgentOptions; - attachedNetworkConfiguration?: AttachedNetworkConfiguration; - availabilityZones?: string[]; - count: number; - labels?: KubernetesLabel[]; - mode: AgentPoolMode; - taints?: KubernetesLabel[]; - upgradeSettings?: AgentPoolUpgradeSettings; - vmSkuName: string; -} - // @public export type AgentPoolDetailedStatus = string; -// @public -export interface AgentPoolList { - nextLink?: string; - value?: AgentPool[]; -} - // @public export type AgentPoolMode = string; @@ -108,100 +216,91 @@ export type AgentPoolMode = string; export interface AgentPoolPatchParameters { administratorConfiguration?: NodePoolAdministratorConfigurationPatch; count?: number; - tags?: { - [propertyName: string]: string; - }; + tags?: Record; upgradeSettings?: AgentPoolUpgradeSettings; } // @public -export type AgentPoolProvisioningState = string; +export interface AgentPoolPatchProperties { + administratorConfiguration?: NodePoolAdministratorConfigurationPatch; + count?: number; + upgradeSettings?: AgentPoolUpgradeSettings; +} // @public -export interface AgentPools { - beginCreateOrUpdate(resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, agentPoolParameters: AgentPool, options?: AgentPoolsCreateOrUpdateOptionalParams): Promise, AgentPoolsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, agentPoolParameters: AgentPool, options?: AgentPoolsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsDeleteOptionalParams): Promise, AgentPoolsDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsUpdateOptionalParams): Promise, AgentPoolsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsUpdateOptionalParams): Promise; - get(resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsGetOptionalParams): Promise; - listByKubernetesCluster(resourceGroupName: string, kubernetesClusterName: string, options?: AgentPoolsListByKubernetesClusterOptionalParams): PagedAsyncIterableIterator; +export interface AgentPoolProperties { + administratorConfiguration?: AdministratorConfiguration; + agentOptions?: AgentOptions; + attachedNetworkConfiguration?: AttachedNetworkConfiguration; + availabilityZones?: string[]; + count: number; + readonly detailedStatus?: AgentPoolDetailedStatus; + readonly detailedStatusMessage?: string; + readonly kubernetesVersion?: string; + labels?: KubernetesLabel[]; + mode: AgentPoolMode; + readonly provisioningState?: AgentPoolProvisioningState; + taints?: KubernetesLabel[]; + upgradeSettings?: AgentPoolUpgradeSettings; + vmSkuName: string; } // @public -export interface AgentPoolsCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} +export type AgentPoolProvisioningState = string; // @public -export interface AgentPoolsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface AgentPoolsCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type AgentPoolsCreateOrUpdateResponse = AgentPool; - -// @public -export interface AgentPoolsDeleteHeaders { - location?: string; -} - -// @public -export interface AgentPoolsDeleteOptionalParams extends coreClient.OperationOptions { +export interface AgentPoolsDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type AgentPoolsDeleteResponse = OperationStatusResult; - -// @public -export interface AgentPoolsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AgentPoolsGetResponse = AgentPool; - -// @public -export interface AgentPoolsListByKubernetesClusterNextOptionalParams extends coreClient.OperationOptions { +export interface AgentPoolsGetOptionalParams extends OperationOptions { } // @public -export type AgentPoolsListByKubernetesClusterNextResponse = AgentPoolList; - -// @public -export interface AgentPoolsListByKubernetesClusterOptionalParams extends coreClient.OperationOptions { +export interface AgentPoolsListByKubernetesClusterOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type AgentPoolsListByKubernetesClusterResponse = AgentPoolList; - -// @public -export interface AgentPoolsUpdateHeaders { - azureAsyncOperation?: string; - location?: string; +export interface AgentPoolsOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, agentPoolParameters: AgentPool, options?: AgentPoolsCreateOrUpdateOptionalParams) => Promise, AgentPool>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, agentPoolParameters: AgentPool, options?: AgentPoolsCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsUpdateOptionalParams) => Promise, AgentPool>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, agentPoolParameters: AgentPool, options?: AgentPoolsCreateOrUpdateOptionalParams) => PollerLike, AgentPool>; + delete: (resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsGetOptionalParams) => Promise; + listByKubernetesCluster: (resourceGroupName: string, kubernetesClusterName: string, options?: AgentPoolsListByKubernetesClusterOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, kubernetesClusterName: string, agentPoolName: string, options?: AgentPoolsUpdateOptionalParams) => PollerLike, AgentPool>; } // @public -export interface AgentPoolsUpdateOptionalParams extends coreClient.OperationOptions { +export interface AgentPoolsUpdateOptionalParams extends OperationOptions { agentPoolUpdateParameters?: AgentPoolPatchParameters; ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } -// @public -export type AgentPoolsUpdateResponse = AgentPool; - // @public export interface AgentPoolUpgradeSettings { drainTimeout?: number; @@ -231,12 +330,24 @@ export interface AvailableUpgrade { readonly version?: string; } +// @public +export enum AzureClouds { + AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD", + AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD", + AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT" +} + +// @public +export type AzureSupportedClouds = `${AzureClouds}`; + // @public export interface BareMetalMachine extends TrackedResource { readonly actionStates?: ActionState[]; readonly associatedResourceIds?: string[]; bmcConnectionString: string; bmcCredentials: AdministrativeCredentials; + readonly bmcIpv4Address?: string; + readonly bmcIpv6Address?: string; bmcMacAddress: string; bootMacAddress: string; readonly caCertificate?: CertificateInfo; @@ -256,6 +367,7 @@ export interface BareMetalMachine extends TrackedResource { machineName: string; readonly machineRoles?: string[]; machineSkuId: string; + readonly monitoringConfigurationStatus?: BareMetalMachineMonitoringConfigurationStatus; readonly oamIpv4Address?: string; readonly oamIpv6Address?: string; readonly osImage?: string; @@ -328,18 +440,17 @@ export interface BareMetalMachineKeySet extends TrackedResource { export type BareMetalMachineKeySetDetailedStatus = string; // @public -export interface BareMetalMachineKeySetList { - nextLink?: string; - value?: BareMetalMachineKeySet[]; +export interface BareMetalMachineKeySetPatchParameters { + expiration?: Date; + jumpHostsAllowed?: string[]; + tags?: Record; + userList?: KeySetUser[]; } // @public -export interface BareMetalMachineKeySetPatchParameters { +export interface BareMetalMachineKeySetPatchProperties { expiration?: Date; jumpHostsAllowed?: string[]; - tags?: { - [propertyName: string]: string; - }; userList?: KeySetUser[]; } @@ -347,108 +458,101 @@ export interface BareMetalMachineKeySetPatchParameters { export type BareMetalMachineKeySetPrivilegeLevel = string; // @public -export type BareMetalMachineKeySetProvisioningState = string; - -// @public -export interface BareMetalMachineKeySets { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, bareMetalMachineKeySetParameters: BareMetalMachineKeySet, options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams): Promise, BareMetalMachineKeySetsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, bareMetalMachineKeySetParameters: BareMetalMachineKeySet, options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsDeleteOptionalParams): Promise, BareMetalMachineKeySetsDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsUpdateOptionalParams): Promise, BareMetalMachineKeySetsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsUpdateOptionalParams): Promise; - get(resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsGetOptionalParams): Promise; - listByCluster(resourceGroupName: string, clusterName: string, options?: BareMetalMachineKeySetsListByClusterOptionalParams): PagedAsyncIterableIterator; +export interface BareMetalMachineKeySetProperties { + azureGroupId: string; + readonly detailedStatus?: BareMetalMachineKeySetDetailedStatus; + readonly detailedStatusMessage?: string; + expiration: Date; + jumpHostsAllowed: string[]; + readonly lastValidation?: Date; + osGroupName?: string; + privilegeLevel: BareMetalMachineKeySetPrivilegeLevel; + privilegeLevelName?: string; + readonly provisioningState?: BareMetalMachineKeySetProvisioningState; + userList: KeySetUser[]; + readonly userListStatus?: KeySetUserStatus[]; } // @public -export interface BareMetalMachineKeySetsCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} +export type BareMetalMachineKeySetProvisioningState = string; // @public -export interface BareMetalMachineKeySetsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface BareMetalMachineKeySetsCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type BareMetalMachineKeySetsCreateOrUpdateResponse = BareMetalMachineKeySet; - -// @public -export interface BareMetalMachineKeySetsDeleteHeaders { - location?: string; -} - -// @public -export interface BareMetalMachineKeySetsDeleteOptionalParams extends coreClient.OperationOptions { +export interface BareMetalMachineKeySetsDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type BareMetalMachineKeySetsDeleteResponse = OperationStatusResult; - -// @public -export interface BareMetalMachineKeySetsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BareMetalMachineKeySetsGetResponse = BareMetalMachineKeySet; - -// @public -export interface BareMetalMachineKeySetsListByClusterNextOptionalParams extends coreClient.OperationOptions { +export interface BareMetalMachineKeySetsGetOptionalParams extends OperationOptions { } // @public -export type BareMetalMachineKeySetsListByClusterNextResponse = BareMetalMachineKeySetList; - -// @public -export interface BareMetalMachineKeySetsListByClusterOptionalParams extends coreClient.OperationOptions { +export interface BareMetalMachineKeySetsListByClusterOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type BareMetalMachineKeySetsListByClusterResponse = BareMetalMachineKeySetList; - -// @public -export interface BareMetalMachineKeySetsUpdateHeaders { - azureAsyncOperation?: string; - location?: string; +export interface BareMetalMachineKeySetsOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, bareMetalMachineKeySetParameters: BareMetalMachineKeySet, options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams) => Promise, BareMetalMachineKeySet>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, bareMetalMachineKeySetParameters: BareMetalMachineKeySet, options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsUpdateOptionalParams) => Promise, BareMetalMachineKeySet>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, bareMetalMachineKeySetParameters: BareMetalMachineKeySet, options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams) => PollerLike, BareMetalMachineKeySet>; + delete: (resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsGetOptionalParams) => Promise; + listByCluster: (resourceGroupName: string, clusterName: string, options?: BareMetalMachineKeySetsListByClusterOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, clusterName: string, bareMetalMachineKeySetName: string, options?: BareMetalMachineKeySetsUpdateOptionalParams) => PollerLike, BareMetalMachineKeySet>; } // @public -export interface BareMetalMachineKeySetsUpdateOptionalParams extends coreClient.OperationOptions { +export interface BareMetalMachineKeySetsUpdateOptionalParams extends OperationOptions { bareMetalMachineKeySetUpdateParameters?: BareMetalMachineKeySetPatchParameters; ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type BareMetalMachineKeySetsUpdateResponse = BareMetalMachineKeySet; +export type BareMetalMachineKeySetUserSetupStatus = string; + +// @public +export type BareMetalMachineMetricsConfigurationStatusLogLevel = string; // @public -export type BareMetalMachineKeySetUserSetupStatus = string; +export type BareMetalMachineMetricsConfigurationStatusMetricsLevel = string; // @public -export interface BareMetalMachineList { - nextLink?: string; - value?: BareMetalMachine[]; +export interface BareMetalMachineMonitoringConfigurationStatus { + logLevel?: BareMetalMachineMetricsConfigurationStatusLogLevel; + metricsLevel?: BareMetalMachineMetricsConfigurationStatusMetricsLevel; } // @public export interface BareMetalMachinePatchParameters { machineDetails?: string; - tags?: { - [propertyName: string]: string; - }; + tags?: Record; +} + +// @public +export interface BareMetalMachinePatchProperties { + machineDetails?: string; } // @public @@ -459,12 +563,61 @@ export interface BareMetalMachinePowerOffParameters { // @public export type BareMetalMachinePowerState = string; +// @public +export interface BareMetalMachineProperties { + readonly actionStates?: ActionState[]; + readonly associatedResourceIds?: string[]; + bmcConnectionString: string; + bmcCredentials: AdministrativeCredentials; + readonly bmcIpv4Address?: string; + readonly bmcIpv6Address?: string; + bmcMacAddress: string; + bootMacAddress: string; + readonly caCertificate?: CertificateInfo; + readonly clusterId?: string; + readonly cordonStatus?: BareMetalMachineCordonStatus; + readonly detailedStatus?: BareMetalMachineDetailedStatus; + readonly detailedStatusMessage?: string; + readonly hardwareInventory?: HardwareInventory; + readonly hardwareValidationStatus?: HardwareValidationStatus; + readonly hybridAksClustersAssociatedIds?: string[]; + readonly kubernetesNodeName?: string; + readonly kubernetesVersion?: string; + machineClusterVersion?: string; + machineDetails: string; + machineName: string; + readonly machineRoles?: string[]; + machineSkuId: string; + readonly monitoringConfigurationStatus?: BareMetalMachineMonitoringConfigurationStatus; + readonly oamIpv4Address?: string; + readonly oamIpv6Address?: string; + readonly osImage?: string; + readonly powerState?: BareMetalMachinePowerState; + readonly provisioningState?: BareMetalMachineProvisioningState; + rackId: string; + rackSlot: number; + readonly readyState?: BareMetalMachineReadyState; + readonly runtimeProtectionStatus?: RuntimeProtectionStatus; + readonly secretRotationStatus?: SecretRotationStatus[]; + serialNumber: string; + readonly serviceTag?: string; + readonly virtualMachinesAssociatedIds?: string[]; +} + // @public export type BareMetalMachineProvisioningState = string; // @public export type BareMetalMachineReadyState = string; +// @public +export interface BareMetalMachineReimageParameters { + safeguardMode?: BareMetalMachineReimageSafeguardMode; +} + +// @public +export type BareMetalMachineReimageSafeguardMode = string; + // @public export interface BareMetalMachineReplaceParameters { bmcCredentials?: AdministrativeCredentials; @@ -502,289 +655,182 @@ export interface BareMetalMachineRunReadCommandsParameters { } // @public -export interface BareMetalMachines { - beginCordon(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesCordonOptionalParams): Promise, BareMetalMachinesCordonResponse>>; - beginCordonAndWait(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesCordonOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineParameters: BareMetalMachine, options?: BareMetalMachinesCreateOrUpdateOptionalParams): Promise, BareMetalMachinesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineParameters: BareMetalMachine, options?: BareMetalMachinesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesDeleteOptionalParams): Promise, BareMetalMachinesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesDeleteOptionalParams): Promise; - beginPowerOff(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesPowerOffOptionalParams): Promise, BareMetalMachinesPowerOffResponse>>; - beginPowerOffAndWait(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesPowerOffOptionalParams): Promise; - beginReimage(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesReimageOptionalParams): Promise, BareMetalMachinesReimageResponse>>; - beginReimageAndWait(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesReimageOptionalParams): Promise; - beginReplace(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesReplaceOptionalParams): Promise, BareMetalMachinesReplaceResponse>>; - beginReplaceAndWait(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesReplaceOptionalParams): Promise; - beginRestart(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesRestartOptionalParams): Promise, BareMetalMachinesRestartResponse>>; - beginRestartAndWait(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesRestartOptionalParams): Promise; - beginRunCommand(resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, options?: BareMetalMachinesRunCommandOptionalParams): Promise, BareMetalMachinesRunCommandResponse>>; - beginRunCommandAndWait(resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, options?: BareMetalMachinesRunCommandOptionalParams): Promise; - beginRunDataExtracts(resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, options?: BareMetalMachinesRunDataExtractsOptionalParams): Promise, BareMetalMachinesRunDataExtractsResponse>>; - beginRunDataExtractsAndWait(resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, options?: BareMetalMachinesRunDataExtractsOptionalParams): Promise; - beginRunDataExtractsRestricted(resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams): Promise, BareMetalMachinesRunDataExtractsRestrictedResponse>>; - beginRunDataExtractsRestrictedAndWait(resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams): Promise; - beginRunReadCommands(resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, options?: BareMetalMachinesRunReadCommandsOptionalParams): Promise, BareMetalMachinesRunReadCommandsResponse>>; - beginRunReadCommandsAndWait(resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, options?: BareMetalMachinesRunReadCommandsOptionalParams): Promise; - beginStart(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesStartOptionalParams): Promise, BareMetalMachinesStartResponse>>; - beginStartAndWait(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesStartOptionalParams): Promise; - beginUncordon(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesUncordonOptionalParams): Promise, BareMetalMachinesUncordonResponse>>; - beginUncordonAndWait(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesUncordonOptionalParams): Promise; - beginUpdate(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesUpdateOptionalParams): Promise, BareMetalMachinesUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesUpdateOptionalParams): Promise; - get(resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: BareMetalMachinesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: BareMetalMachinesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface BareMetalMachinesCordonHeaders { - location?: string; -} - -// @public -export interface BareMetalMachinesCordonOptionalParams extends coreClient.OperationOptions { +export interface BareMetalMachinesCordonOptionalParams extends OperationOptions { bareMetalMachineCordonParameters?: BareMetalMachineCordonParameters; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type BareMetalMachinesCordonResponse = OperationStatusResult; - -// @public -export interface BareMetalMachinesCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} - -// @public -export interface BareMetalMachinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface BareMetalMachinesCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type BareMetalMachinesCreateOrUpdateResponse = BareMetalMachine; - -// @public -export interface BareMetalMachinesDeleteHeaders { - location?: string; -} - -// @public -export interface BareMetalMachinesDeleteOptionalParams extends coreClient.OperationOptions { +export interface BareMetalMachinesDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type BareMetalMachinesDeleteResponse = OperationStatusResult; - -// @public -export interface BareMetalMachinesGetOptionalParams extends coreClient.OperationOptions { +export interface BareMetalMachinesGetOptionalParams extends OperationOptions { } -// @public -export type BareMetalMachinesGetResponse = BareMetalMachine; - // @public export type BareMetalMachineSkipShutdown = string; // @public -export interface BareMetalMachinesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface BareMetalMachinesListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; } // @public -export type BareMetalMachinesListByResourceGroupNextResponse = BareMetalMachineList; - -// @public -export interface BareMetalMachinesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface BareMetalMachinesListBySubscriptionOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type BareMetalMachinesListByResourceGroupResponse = BareMetalMachineList; +export interface BareMetalMachinesOperations { + // @deprecated (undocumented) + beginCordon: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesCordonOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginCordonAndWait: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesCordonOptionalParams) => Promise; + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineParameters: BareMetalMachine, options?: BareMetalMachinesCreateOrUpdateOptionalParams) => Promise, BareMetalMachine>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineParameters: BareMetalMachine, options?: BareMetalMachinesCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginPowerOff: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesPowerOffOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginPowerOffAndWait: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesPowerOffOptionalParams) => Promise; + // @deprecated (undocumented) + beginReimage: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesReimageOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginReimageAndWait: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesReimageOptionalParams) => Promise; + // @deprecated (undocumented) + beginReplace: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesReplaceOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginReplaceAndWait: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesReplaceOptionalParams) => Promise; + // @deprecated (undocumented) + beginRestart: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesRestartOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginRestartAndWait: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesRestartOptionalParams) => Promise; + // @deprecated (undocumented) + beginRunCommand: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, options?: BareMetalMachinesRunCommandOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginRunCommandAndWait: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, options?: BareMetalMachinesRunCommandOptionalParams) => Promise; + // @deprecated (undocumented) + beginRunDataExtracts: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, options?: BareMetalMachinesRunDataExtractsOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginRunDataExtractsAndWait: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, options?: BareMetalMachinesRunDataExtractsOptionalParams) => Promise; + // @deprecated (undocumented) + beginRunDataExtractsRestricted: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginRunDataExtractsRestrictedAndWait: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams) => Promise; + // @deprecated (undocumented) + beginRunReadCommands: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, options?: BareMetalMachinesRunReadCommandsOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginRunReadCommandsAndWait: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, options?: BareMetalMachinesRunReadCommandsOptionalParams) => Promise; + // @deprecated (undocumented) + beginStart: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesStartOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginStartAndWait: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesStartOptionalParams) => Promise; + // @deprecated (undocumented) + beginUncordon: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesUncordonOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginUncordonAndWait: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesUncordonOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesUpdateOptionalParams) => Promise, BareMetalMachine>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesUpdateOptionalParams) => Promise; + cordon: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesCordonOptionalParams) => PollerLike, OperationStatusResult>; + createOrUpdate: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineParameters: BareMetalMachine, options?: BareMetalMachinesCreateOrUpdateOptionalParams) => PollerLike, BareMetalMachine>; + delete: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: BareMetalMachinesListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: BareMetalMachinesListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + powerOff: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesPowerOffOptionalParams) => PollerLike, OperationStatusResult>; + reimage: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesReimageOptionalParams) => PollerLike, OperationStatusResult>; + replace: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesReplaceOptionalParams) => PollerLike, OperationStatusResult>; + restart: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesRestartOptionalParams) => PollerLike, OperationStatusResult>; + runCommand: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, options?: BareMetalMachinesRunCommandOptionalParams) => PollerLike, OperationStatusResult>; + runDataExtracts: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, options?: BareMetalMachinesRunDataExtractsOptionalParams) => PollerLike, OperationStatusResult>; + runDataExtractsRestricted: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams) => PollerLike, OperationStatusResult>; + runReadCommands: (resourceGroupName: string, bareMetalMachineName: string, bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, options?: BareMetalMachinesRunReadCommandsOptionalParams) => PollerLike, OperationStatusResult>; + start: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesStartOptionalParams) => PollerLike, OperationStatusResult>; + uncordon: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesUncordonOptionalParams) => PollerLike, OperationStatusResult>; + update: (resourceGroupName: string, bareMetalMachineName: string, options?: BareMetalMachinesUpdateOptionalParams) => PollerLike, BareMetalMachine>; +} + +// @public +export interface BareMetalMachinesPowerOffOptionalParams extends OperationOptions { + bareMetalMachinePowerOffParameters?: BareMetalMachinePowerOffParameters; + updateIntervalInMs?: number; +} // @public -export interface BareMetalMachinesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export interface BareMetalMachinesReimageOptionalParams extends OperationOptions { + body?: BareMetalMachineReimageParameters; + updateIntervalInMs?: number; } // @public -export type BareMetalMachinesListBySubscriptionNextResponse = BareMetalMachineList; +export interface BareMetalMachinesReplaceOptionalParams extends OperationOptions { + bareMetalMachineReplaceParameters?: BareMetalMachineReplaceParameters; + updateIntervalInMs?: number; +} // @public -export interface BareMetalMachinesListBySubscriptionOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; +export interface BareMetalMachinesRestartOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export type BareMetalMachinesListBySubscriptionResponse = BareMetalMachineList; +export interface BareMetalMachinesRunCommandOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} // @public -export interface BareMetalMachinesPowerOffHeaders { - location?: string; -} - -// @public -export interface BareMetalMachinesPowerOffOptionalParams extends coreClient.OperationOptions { - bareMetalMachinePowerOffParameters?: BareMetalMachinePowerOffParameters; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type BareMetalMachinesPowerOffResponse = OperationStatusResult; - -// @public -export interface BareMetalMachinesReimageHeaders { - location?: string; -} - -// @public -export interface BareMetalMachinesReimageOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type BareMetalMachinesReimageResponse = OperationStatusResult; - -// @public -export interface BareMetalMachinesReplaceHeaders { - location?: string; -} - -// @public -export interface BareMetalMachinesReplaceOptionalParams extends coreClient.OperationOptions { - bareMetalMachineReplaceParameters?: BareMetalMachineReplaceParameters; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type BareMetalMachinesReplaceResponse = OperationStatusResult; - -// @public -export interface BareMetalMachinesRestartHeaders { - location?: string; -} - -// @public -export interface BareMetalMachinesRestartOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type BareMetalMachinesRestartResponse = OperationStatusResult; - -// @public -export interface BareMetalMachinesRunCommandHeaders { - location?: string; -} - -// @public -export interface BareMetalMachinesRunCommandOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type BareMetalMachinesRunCommandResponse = OperationStatusResult; - -// @public -export interface BareMetalMachinesRunDataExtractsHeaders { - location?: string; -} - -// @public -export interface BareMetalMachinesRunDataExtractsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface BareMetalMachinesRunDataExtractsOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type BareMetalMachinesRunDataExtractsResponse = OperationStatusResult; - -// @public -export interface BareMetalMachinesRunDataExtractsRestrictedHeaders { - location?: string; -} - -// @public -export interface BareMetalMachinesRunDataExtractsRestrictedOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface BareMetalMachinesRunDataExtractsRestrictedOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type BareMetalMachinesRunDataExtractsRestrictedResponse = OperationStatusResult; - -// @public -export interface BareMetalMachinesRunReadCommandsHeaders { - location?: string; -} - -// @public -export interface BareMetalMachinesRunReadCommandsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface BareMetalMachinesRunReadCommandsOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type BareMetalMachinesRunReadCommandsResponse = OperationStatusResult; - -// @public -export interface BareMetalMachinesStartHeaders { - location?: string; -} - -// @public -export interface BareMetalMachinesStartOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface BareMetalMachinesStartOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type BareMetalMachinesStartResponse = OperationStatusResult; - -// @public -export interface BareMetalMachinesUncordonHeaders { - location?: string; -} - -// @public -export interface BareMetalMachinesUncordonOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface BareMetalMachinesUncordonOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type BareMetalMachinesUncordonResponse = OperationStatusResult; - -// @public -export interface BareMetalMachinesUpdateHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface BareMetalMachinesUpdateOptionalParams extends coreClient.OperationOptions { +export interface BareMetalMachinesUpdateOptionalParams extends OperationOptions { bareMetalMachineUpdateParameters?: BareMetalMachinePatchParameters; ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } -// @public -export type BareMetalMachinesUpdateResponse = BareMetalMachine; - // @public export type BfdEnabled = string; @@ -826,17 +872,15 @@ export interface BmcKeySet extends TrackedResource { export type BmcKeySetDetailedStatus = string; // @public -export interface BmcKeySetList { - nextLink?: string; - value?: BmcKeySet[]; +export interface BmcKeySetPatchParameters { + expiration?: Date; + tags?: Record; + userList?: KeySetUser[]; } // @public -export interface BmcKeySetPatchParameters { +export interface BmcKeySetPatchProperties { expiration?: Date; - tags?: { - [propertyName: string]: string; - }; userList?: KeySetUser[]; } @@ -844,93 +888,74 @@ export interface BmcKeySetPatchParameters { export type BmcKeySetPrivilegeLevel = string; // @public -export type BmcKeySetProvisioningState = string; - -// @public -export interface BmcKeySets { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, bmcKeySetName: string, bmcKeySetParameters: BmcKeySet, options?: BmcKeySetsCreateOrUpdateOptionalParams): Promise, BmcKeySetsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, bmcKeySetName: string, bmcKeySetParameters: BmcKeySet, options?: BmcKeySetsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsDeleteOptionalParams): Promise, BmcKeySetsDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsUpdateOptionalParams): Promise, BmcKeySetsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsUpdateOptionalParams): Promise; - get(resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsGetOptionalParams): Promise; - listByCluster(resourceGroupName: string, clusterName: string, options?: BmcKeySetsListByClusterOptionalParams): PagedAsyncIterableIterator; +export interface BmcKeySetProperties { + azureGroupId: string; + readonly detailedStatus?: BmcKeySetDetailedStatus; + readonly detailedStatusMessage?: string; + expiration: Date; + readonly lastValidation?: Date; + privilegeLevel: BmcKeySetPrivilegeLevel; + readonly provisioningState?: BmcKeySetProvisioningState; + userList: KeySetUser[]; + readonly userListStatus?: KeySetUserStatus[]; } // @public -export interface BmcKeySetsCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} +export type BmcKeySetProvisioningState = string; // @public -export interface BmcKeySetsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface BmcKeySetsCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type BmcKeySetsCreateOrUpdateResponse = BmcKeySet; - -// @public -export interface BmcKeySetsDeleteHeaders { - location?: string; -} - -// @public -export interface BmcKeySetsDeleteOptionalParams extends coreClient.OperationOptions { +export interface BmcKeySetsDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type BmcKeySetsDeleteResponse = OperationStatusResult; - -// @public -export interface BmcKeySetsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BmcKeySetsGetResponse = BmcKeySet; - -// @public -export interface BmcKeySetsListByClusterNextOptionalParams extends coreClient.OperationOptions { +export interface BmcKeySetsGetOptionalParams extends OperationOptions { } // @public -export type BmcKeySetsListByClusterNextResponse = BmcKeySetList; - -// @public -export interface BmcKeySetsListByClusterOptionalParams extends coreClient.OperationOptions { +export interface BmcKeySetsListByClusterOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type BmcKeySetsListByClusterResponse = BmcKeySetList; - -// @public -export interface BmcKeySetsUpdateHeaders { - azureAsyncOperation?: string; - location?: string; +export interface BmcKeySetsOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, clusterName: string, bmcKeySetName: string, bmcKeySetParameters: BmcKeySet, options?: BmcKeySetsCreateOrUpdateOptionalParams) => Promise, BmcKeySet>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, clusterName: string, bmcKeySetName: string, bmcKeySetParameters: BmcKeySet, options?: BmcKeySetsCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsUpdateOptionalParams) => Promise, BmcKeySet>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, clusterName: string, bmcKeySetName: string, bmcKeySetParameters: BmcKeySet, options?: BmcKeySetsCreateOrUpdateOptionalParams) => PollerLike, BmcKeySet>; + delete: (resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsGetOptionalParams) => Promise; + listByCluster: (resourceGroupName: string, clusterName: string, options?: BmcKeySetsListByClusterOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, clusterName: string, bmcKeySetName: string, options?: BmcKeySetsUpdateOptionalParams) => PollerLike, BmcKeySet>; } // @public -export interface BmcKeySetsUpdateOptionalParams extends coreClient.OperationOptions { +export interface BmcKeySetsUpdateOptionalParams extends OperationOptions { bmcKeySetUpdateParameters?: BmcKeySetPatchParameters; ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } -// @public -export type BmcKeySetsUpdateResponse = BmcKeySet; - // @public export type BootstrapProtocol = string; @@ -965,108 +990,92 @@ export type CloudServicesNetworkDetailedStatus = string; // @public export type CloudServicesNetworkEnableDefaultEgressEndpoints = string; -// @public -export interface CloudServicesNetworkList { - nextLink?: string; - value?: CloudServicesNetwork[]; -} - // @public export interface CloudServicesNetworkPatchParameters { additionalEgressEndpoints?: EgressEndpoint[]; enableDefaultEgressEndpoints?: CloudServicesNetworkEnableDefaultEgressEndpoints; storageOptions?: CloudServicesNetworkStorageOptionsPatch; - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public -export type CloudServicesNetworkProvisioningState = string; +export interface CloudServicesNetworkPatchProperties { + additionalEgressEndpoints?: EgressEndpoint[]; + enableDefaultEgressEndpoints?: CloudServicesNetworkEnableDefaultEgressEndpoints; + storageOptions?: CloudServicesNetworkStorageOptionsPatch; +} // @public -export interface CloudServicesNetworks { - beginCreateOrUpdate(resourceGroupName: string, cloudServicesNetworkName: string, cloudServicesNetworkParameters: CloudServicesNetwork, options?: CloudServicesNetworksCreateOrUpdateOptionalParams): Promise, CloudServicesNetworksCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, cloudServicesNetworkName: string, cloudServicesNetworkParameters: CloudServicesNetwork, options?: CloudServicesNetworksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksDeleteOptionalParams): Promise, CloudServicesNetworksDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksUpdateOptionalParams): Promise, CloudServicesNetworksUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksUpdateOptionalParams): Promise; - get(resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: CloudServicesNetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: CloudServicesNetworksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +export interface CloudServicesNetworkProperties { + additionalEgressEndpoints?: EgressEndpoint[]; + readonly associatedResourceIds?: string[]; + readonly clusterId?: string; + readonly detailedStatus?: CloudServicesNetworkDetailedStatus; + readonly detailedStatusMessage?: string; + enableDefaultEgressEndpoints?: CloudServicesNetworkEnableDefaultEgressEndpoints; + readonly enabledEgressEndpoints?: EgressEndpoint[]; + readonly hybridAksClustersAssociatedIds?: string[]; + readonly interfaceName?: string; + readonly provisioningState?: CloudServicesNetworkProvisioningState; + storageOptions?: CloudServicesNetworkStorageOptions; + readonly storageStatus?: CloudServicesNetworkStorageStatus; + readonly virtualMachinesAssociatedIds?: string[]; } // @public -export interface CloudServicesNetworksCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} +export type CloudServicesNetworkProvisioningState = string; // @public -export interface CloudServicesNetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface CloudServicesNetworksCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type CloudServicesNetworksCreateOrUpdateResponse = CloudServicesNetwork; - -// @public -export interface CloudServicesNetworksDeleteHeaders { - location?: string; -} - -// @public -export interface CloudServicesNetworksDeleteOptionalParams extends coreClient.OperationOptions { +export interface CloudServicesNetworksDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type CloudServicesNetworksDeleteResponse = OperationStatusResult; - -// @public -export interface CloudServicesNetworksGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CloudServicesNetworksGetResponse = CloudServicesNetwork; - -// @public -export interface CloudServicesNetworksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface CloudServicesNetworksGetOptionalParams extends OperationOptions { } // @public -export type CloudServicesNetworksListByResourceGroupNextResponse = CloudServicesNetworkList; - -// @public -export interface CloudServicesNetworksListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface CloudServicesNetworksListByResourceGroupOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type CloudServicesNetworksListByResourceGroupResponse = CloudServicesNetworkList; - -// @public -export interface CloudServicesNetworksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CloudServicesNetworksListBySubscriptionNextResponse = CloudServicesNetworkList; - -// @public -export interface CloudServicesNetworksListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface CloudServicesNetworksListBySubscriptionOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type CloudServicesNetworksListBySubscriptionResponse = CloudServicesNetworkList; +export interface CloudServicesNetworksOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, cloudServicesNetworkName: string, cloudServicesNetworkParameters: CloudServicesNetwork, options?: CloudServicesNetworksCreateOrUpdateOptionalParams) => Promise, CloudServicesNetwork>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, cloudServicesNetworkName: string, cloudServicesNetworkParameters: CloudServicesNetwork, options?: CloudServicesNetworksCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksUpdateOptionalParams) => Promise, CloudServicesNetwork>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, cloudServicesNetworkName: string, cloudServicesNetworkParameters: CloudServicesNetwork, options?: CloudServicesNetworksCreateOrUpdateOptionalParams) => PollerLike, CloudServicesNetwork>; + delete: (resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: CloudServicesNetworksListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: CloudServicesNetworksListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, cloudServicesNetworkName: string, options?: CloudServicesNetworksUpdateOptionalParams) => PollerLike, CloudServicesNetwork>; +} // @public export type CloudServicesNetworkStorageMode = string; @@ -1098,23 +1107,13 @@ export interface CloudServicesNetworkStorageStatus { export type CloudServicesNetworkStorageStatusStatus = string; // @public -export interface CloudServicesNetworksUpdateHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface CloudServicesNetworksUpdateOptionalParams extends coreClient.OperationOptions { +export interface CloudServicesNetworksUpdateOptionalParams extends OperationOptions { cloudServicesNetworkUpdateParameters?: CloudServicesNetworkPatchParameters; ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } -// @public -export type CloudServicesNetworksUpdateResponse = CloudServicesNetwork; - // @public export interface Cluster extends TrackedResource { readonly actionStates?: ActionState[]; @@ -1140,6 +1139,9 @@ export interface Cluster extends TrackedResource { extendedLocation: ExtendedLocation; readonly hybridAksExtendedLocation?: ExtendedLocation; identity?: ManagedServiceIdentity; + kind?: DeploymentType; + readonly lastSuccessfulVersionUpdateTime?: Date; + readonly managedCredentials?: string[]; managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; readonly manualActionCount?: number; networkFabricId: string; @@ -1190,8 +1192,12 @@ export type ClusterContinueUpdateVersionMachineGroupTargetingMode = string; // @public export interface ClusterContinueUpdateVersionParameters { machineGroupTargetingMode?: ClusterContinueUpdateVersionMachineGroupTargetingMode; + safeguardMode?: ClusterContinueUpdateVersionSafeguardMode; } +// @public +export type ClusterContinueUpdateVersionSafeguardMode = string; + // @public export interface ClusterDeployParameters { skipValidationsForMachines?: string[]; @@ -1201,9 +1207,12 @@ export interface ClusterDeployParameters { export type ClusterDetailedStatus = string; // @public -export interface ClusterList { - nextLink?: string; - value?: Cluster[]; +export type ClusterInspectAdditionalAction = string; + +// @public +export interface ClusterInspectParameters { + additionalActions?: ClusterInspectAdditionalAction[]; + filterDevices?: FilterDevices; } // @public @@ -1216,9 +1225,11 @@ export interface ClusterManager extends TrackedResource { readonly etag?: string; fabricControllerId: string; identity?: ManagedServiceIdentity; + kind?: DeploymentType; managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; readonly managerExtendedLocation?: ExtendedLocation; readonly provisioningState?: ClusterManagerProvisioningState; + readonly relayConfiguration?: ClusterManagerRelayConfiguration; vmSize?: string; } @@ -1228,115 +1239,107 @@ export type ClusterManagerConnectionStatus = string; // @public export type ClusterManagerDetailedStatus = string; -// @public -export interface ClusterManagerList { - nextLink?: string; - value?: ClusterManager[]; -} - // @public export interface ClusterManagerPatchParameters { identity?: ManagedServiceIdentity; - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public -export type ClusterManagerProvisioningState = string; +export interface ClusterManagerProperties { + analyticsWorkspaceId?: string; + availabilityZones?: string[]; + readonly clusterVersions?: ClusterAvailableVersion[]; + readonly detailedStatus?: ClusterManagerDetailedStatus; + readonly detailedStatusMessage?: string; + fabricControllerId: string; + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + readonly managerExtendedLocation?: ExtendedLocation; + readonly provisioningState?: ClusterManagerProvisioningState; + readonly relayConfiguration?: ClusterManagerRelayConfiguration; + vmSize?: string; +} // @public -export interface ClusterManagers { - beginCreateOrUpdate(resourceGroupName: string, clusterManagerName: string, clusterManagerParameters: ClusterManager, options?: ClusterManagersCreateOrUpdateOptionalParams): Promise, ClusterManagersCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, clusterManagerName: string, clusterManagerParameters: ClusterManager, options?: ClusterManagersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersDeleteOptionalParams): Promise, ClusterManagersDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersDeleteOptionalParams): Promise; - get(resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: ClusterManagersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: ClusterManagersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersUpdateOptionalParams): Promise; -} +export type ClusterManagerProvisioningState = string; // @public -export interface ClusterManagersCreateOrUpdateHeaders { - azureAsyncOperation?: string; +export interface ClusterManagerRelayConfiguration { + relayNamespaceId?: string; } // @public -export interface ClusterManagersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface ClusterManagersCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type ClusterManagersCreateOrUpdateResponse = ClusterManager; - -// @public -export interface ClusterManagersDeleteHeaders { - location?: string; -} - -// @public -export interface ClusterManagersDeleteOptionalParams extends coreClient.OperationOptions { +export interface ClusterManagersDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type ClusterManagersDeleteResponse = OperationStatusResult; - -// @public -export interface ClusterManagersGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClusterManagersGetResponse = ClusterManager; - -// @public -export interface ClusterManagersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface ClusterManagersGetOptionalParams extends OperationOptions { } // @public -export type ClusterManagersListByResourceGroupNextResponse = ClusterManagerList; - -// @public -export interface ClusterManagersListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface ClusterManagersListByResourceGroupOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type ClusterManagersListByResourceGroupResponse = ClusterManagerList; - -// @public -export interface ClusterManagersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClusterManagersListBySubscriptionNextResponse = ClusterManagerList; - -// @public -export interface ClusterManagersListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface ClusterManagersListBySubscriptionOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type ClusterManagersListBySubscriptionResponse = ClusterManagerList; +export interface ClusterManagersOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, clusterManagerName: string, clusterManagerParameters: ClusterManager, options?: ClusterManagersCreateOrUpdateOptionalParams) => Promise, ClusterManager>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, clusterManagerName: string, clusterManagerParameters: ClusterManager, options?: ClusterManagersCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdateRelayPrivateEndpointConnection: (resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginUpdateRelayPrivateEndpointConnectionAndWait: (resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, clusterManagerName: string, clusterManagerParameters: ClusterManager, options?: ClusterManagersCreateOrUpdateOptionalParams) => PollerLike, ClusterManager>; + delete: (resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: ClusterManagersListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: ClusterManagersListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersUpdateOptionalParams) => Promise; + updateRelayPrivateEndpointConnection: (resourceGroupName: string, clusterManagerName: string, options?: ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams) => PollerLike, OperationStatusResult>; +} // @public -export interface ClusterManagersUpdateOptionalParams extends coreClient.OperationOptions { +export interface ClusterManagersUpdateOptionalParams extends OperationOptions { clusterManagerUpdateParameters?: ClusterManagerPatchParameters; ifMatch?: string; ifNoneMatch?: string; } // @public -export type ClusterManagersUpdateResponse = ClusterManager; +export interface ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams extends OperationOptions { + clusterManagerUpdateRelayPrivateEndpointConnectionParameters?: ClusterManagerUpdateRelayPrivateEndpointConnectionParameters; + updateIntervalInMs?: number; +} + +// @public +export interface ClusterManagerUpdateRelayPrivateEndpointConnectionParameters { + connectionState: RelayPrivateEndpointConnectionState; + description?: string; + privateEndpointResourceId: string; +} // @public export interface ClusterMetricsConfiguration extends TrackedResource { @@ -1354,18 +1357,26 @@ export interface ClusterMetricsConfiguration extends TrackedResource { export type ClusterMetricsConfigurationDetailedStatus = string; // @public -export interface ClusterMetricsConfigurationList { - nextLink?: string; - value?: ClusterMetricsConfiguration[]; +export interface ClusterMetricsConfigurationPatchParameters { + collectionInterval?: number; + enabledMetrics?: string[]; + tags?: Record; } // @public -export interface ClusterMetricsConfigurationPatchParameters { +export interface ClusterMetricsConfigurationPatchProperties { collectionInterval?: number; enabledMetrics?: string[]; - tags?: { - [propertyName: string]: string; - }; +} + +// @public +export interface ClusterMetricsConfigurationProperties { + collectionInterval: number; + readonly detailedStatus?: ClusterMetricsConfigurationDetailedStatus; + readonly detailedStatusMessage?: string; + readonly disabledMetrics?: string[]; + enabledMetrics?: string[]; + readonly provisioningState?: ClusterMetricsConfigurationProvisioningState; } // @public @@ -1384,106 +1395,105 @@ export interface ClusterPatchParameters { runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; secretArchive?: ClusterSecretArchive; secretArchiveSettings?: SecretArchiveSettings; - tags?: { - [propertyName: string]: string; - }; + tags?: Record; updateStrategy?: ClusterUpdateStrategy; vulnerabilityScanningSettings?: VulnerabilityScanningSettingsPatch; } // @public -export type ClusterProvisioningState = string; - -// @public -export interface Clusters { - beginContinueUpdateVersion(resourceGroupName: string, clusterName: string, clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, options?: ClustersContinueUpdateVersionOptionalParams): Promise, ClustersContinueUpdateVersionResponse>>; - beginContinueUpdateVersionAndWait(resourceGroupName: string, clusterName: string, clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, options?: ClustersContinueUpdateVersionOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, clusterParameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams): Promise, ClustersCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, clusterParameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, ClustersDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise; - beginDeploy(resourceGroupName: string, clusterName: string, options?: ClustersDeployOptionalParams): Promise, ClustersDeployResponse>>; - beginDeployAndWait(resourceGroupName: string, clusterName: string, options?: ClustersDeployOptionalParams): Promise; - beginScanRuntime(resourceGroupName: string, clusterName: string, options?: ClustersScanRuntimeOptionalParams): Promise, ClustersScanRuntimeResponse>>; - beginScanRuntimeAndWait(resourceGroupName: string, clusterName: string, options?: ClustersScanRuntimeOptionalParams): Promise; - beginUpdate(resourceGroupName: string, clusterName: string, options?: ClustersUpdateOptionalParams): Promise, ClustersUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, clusterName: string, options?: ClustersUpdateOptionalParams): Promise; - beginUpdateVersion(resourceGroupName: string, clusterName: string, clusterUpdateVersionParameters: ClusterUpdateVersionParameters, options?: ClustersUpdateVersionOptionalParams): Promise, ClustersUpdateVersionResponse>>; - beginUpdateVersionAndWait(resourceGroupName: string, clusterName: string, clusterUpdateVersionParameters: ClusterUpdateVersionParameters, options?: ClustersUpdateVersionOptionalParams): Promise; - get(resourceGroupName: string, clusterName: string, options?: ClustersGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: ClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: ClustersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +export interface ClusterPatchProperties { + aggregatorOrSingleRackDefinition?: RackDefinition; + analyticsOutputSettings?: AnalyticsOutputSettings; + clusterLocation?: string; + clusterServicePrincipal?: ServicePrincipalInformation; + commandOutputSettings?: CommandOutputSettings; + computeDeploymentThreshold?: ValidationThreshold; + computeRackDefinitions?: RackDefinition[]; + runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; + secretArchive?: ClusterSecretArchive; + secretArchiveSettings?: SecretArchiveSettings; + updateStrategy?: ClusterUpdateStrategy; + vulnerabilityScanningSettings?: VulnerabilityScanningSettingsPatch; } // @public -export interface ClusterScanRuntimeParameters { - scanActivity?: ClusterScanRuntimeParametersScanActivity; +export interface ClusterProperties { + readonly actionStates?: ActionState[]; + aggregatorOrSingleRackDefinition: RackDefinition; + analyticsOutputSettings?: AnalyticsOutputSettings; + analyticsWorkspaceId?: string; + readonly availableUpgradeVersions?: ClusterAvailableUpgradeVersion[]; + readonly clusterCapacity?: ClusterCapacity; + readonly clusterConnectionStatus?: ClusterConnectionStatus; + readonly clusterExtendedLocation?: ExtendedLocation; + clusterLocation?: string; + readonly clusterManagerConnectionStatus?: ClusterManagerConnectionStatus; + readonly clusterManagerId?: string; + clusterServicePrincipal?: ServicePrincipalInformation; + clusterType: ClusterType; + clusterVersion: string; + commandOutputSettings?: CommandOutputSettings; + computeDeploymentThreshold?: ValidationThreshold; + computeRackDefinitions?: RackDefinition[]; + readonly detailedStatus?: ClusterDetailedStatus; + readonly detailedStatusMessage?: string; + readonly hybridAksExtendedLocation?: ExtendedLocation; + readonly lastSuccessfulVersionUpdateTime?: Date; + readonly managedCredentials?: string[]; + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + readonly manualActionCount?: number; + networkFabricId: string; + readonly provisioningState?: ClusterProvisioningState; + runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; + secretArchive?: ClusterSecretArchive; + secretArchiveSettings?: SecretArchiveSettings; + readonly supportExpiryDate?: string; + updateStrategy?: ClusterUpdateStrategy; + vulnerabilityScanningSettings?: VulnerabilityScanningSettings; + readonly workloadResourceIds?: string[]; } // @public -export type ClusterScanRuntimeParametersScanActivity = string; +export type ClusterProvisioningState = string; // @public -export interface ClustersContinueUpdateVersionHeaders { - location?: string; +export interface ClusterRotateCredentialParameters { + credentials: string[]; } // @public -export interface ClustersContinueUpdateVersionOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface ClusterScanRuntimeParameters { + scanActivity?: ClusterScanRuntimeParametersScanActivity; } // @public -export type ClustersContinueUpdateVersionResponse = OperationStatusResult; +export type ClusterScanRuntimeParametersScanActivity = string; // @public -export interface ClustersCreateOrUpdateHeaders { - azureAsyncOperation?: string; +export interface ClustersContinueUpdateVersionOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface ClustersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface ClustersCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type ClustersCreateOrUpdateResponse = Cluster; - -// @public -export interface ClustersDeleteHeaders { - location?: string; -} - -// @public -export interface ClustersDeleteOptionalParams extends coreClient.OperationOptions { +export interface ClustersDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type ClustersDeleteResponse = OperationStatusResult; - -// @public -export interface ClustersDeployHeaders { - location?: string; -} - -// @public -export interface ClustersDeployOptionalParams extends coreClient.OperationOptions { +export interface ClustersDeployOptionalParams extends OperationOptions { clusterDeployParameters?: ClusterDeployParameters; - resumeFrom?: string; updateIntervalInMs?: number; } -// @public -export type ClustersDeployResponse = OperationStatusResult; - // @public export interface ClusterSecretArchive { keyVaultId: string; @@ -1494,91 +1504,103 @@ export interface ClusterSecretArchive { export type ClusterSecretArchiveEnabled = string; // @public -export interface ClustersGetOptionalParams extends coreClient.OperationOptions { +export interface ClustersGetOptionalParams extends OperationOptions { } // @public -export type ClustersGetResponse = Cluster; - -// @public -export interface ClustersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface ClustersInspectOptionalParams extends OperationOptions { + clusterInspectParameters?: ClusterInspectParameters; + updateIntervalInMs?: number; } // @public -export type ClustersListByResourceGroupNextResponse = ClusterList; - -// @public -export interface ClustersListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface ClustersListByResourceGroupOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type ClustersListByResourceGroupResponse = ClusterList; - -// @public -export interface ClustersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClustersListBySubscriptionNextResponse = ClusterList; - -// @public -export interface ClustersListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface ClustersListBySubscriptionOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type ClustersListBySubscriptionResponse = ClusterList; - -// @public -export interface ClustersScanRuntimeHeaders { - location?: string; +export interface ClustersOperations { + // @deprecated (undocumented) + beginContinueUpdateVersion: (resourceGroupName: string, clusterName: string, clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, options?: ClustersContinueUpdateVersionOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginContinueUpdateVersionAndWait: (resourceGroupName: string, clusterName: string, clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, options?: ClustersContinueUpdateVersionOptionalParams) => Promise; + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, clusterName: string, clusterParameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams) => Promise, Cluster>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, clusterName: string, clusterParameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginDeploy: (resourceGroupName: string, clusterName: string, options?: ClustersDeployOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeployAndWait: (resourceGroupName: string, clusterName: string, options?: ClustersDeployOptionalParams) => Promise; + // @deprecated (undocumented) + beginInspect: (resourceGroupName: string, clusterName: string, options?: ClustersInspectOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginInspectAndWait: (resourceGroupName: string, clusterName: string, options?: ClustersInspectOptionalParams) => Promise; + // @deprecated (undocumented) + beginRotateCredential: (resourceGroupName: string, clusterName: string, body: ClusterRotateCredentialParameters, options?: ClustersRotateCredentialOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginRotateCredentialAndWait: (resourceGroupName: string, clusterName: string, body: ClusterRotateCredentialParameters, options?: ClustersRotateCredentialOptionalParams) => Promise; + // @deprecated (undocumented) + beginScanRuntime: (resourceGroupName: string, clusterName: string, options?: ClustersScanRuntimeOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginScanRuntimeAndWait: (resourceGroupName: string, clusterName: string, options?: ClustersScanRuntimeOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, clusterName: string, options?: ClustersUpdateOptionalParams) => Promise, Cluster>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, clusterName: string, options?: ClustersUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdateVersion: (resourceGroupName: string, clusterName: string, clusterUpdateVersionParameters: ClusterUpdateVersionParameters, options?: ClustersUpdateVersionOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginUpdateVersionAndWait: (resourceGroupName: string, clusterName: string, clusterUpdateVersionParameters: ClusterUpdateVersionParameters, options?: ClustersUpdateVersionOptionalParams) => Promise; + continueUpdateVersion: (resourceGroupName: string, clusterName: string, clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, options?: ClustersContinueUpdateVersionOptionalParams) => PollerLike, OperationStatusResult>; + createOrUpdate: (resourceGroupName: string, clusterName: string, clusterParameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams) => PollerLike, Cluster>; + delete: (resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams) => PollerLike, OperationStatusResult>; + deploy: (resourceGroupName: string, clusterName: string, options?: ClustersDeployOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, clusterName: string, options?: ClustersGetOptionalParams) => Promise; + inspect: (resourceGroupName: string, clusterName: string, options?: ClustersInspectOptionalParams) => PollerLike, OperationStatusResult>; + listByResourceGroup: (resourceGroupName: string, options?: ClustersListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: ClustersListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + rotateCredential: (resourceGroupName: string, clusterName: string, body: ClusterRotateCredentialParameters, options?: ClustersRotateCredentialOptionalParams) => PollerLike, OperationStatusResult>; + scanRuntime: (resourceGroupName: string, clusterName: string, options?: ClustersScanRuntimeOptionalParams) => PollerLike, OperationStatusResult>; + update: (resourceGroupName: string, clusterName: string, options?: ClustersUpdateOptionalParams) => PollerLike, Cluster>; + updateVersion: (resourceGroupName: string, clusterName: string, clusterUpdateVersionParameters: ClusterUpdateVersionParameters, options?: ClustersUpdateVersionOptionalParams) => PollerLike, OperationStatusResult>; +} + +// @public +export interface ClustersRotateCredentialOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface ClustersScanRuntimeOptionalParams extends coreClient.OperationOptions { +export interface ClustersScanRuntimeOptionalParams extends OperationOptions { clusterScanRuntimeParameters?: ClusterScanRuntimeParameters; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type ClustersScanRuntimeResponse = OperationStatusResult; - -// @public -export interface ClustersUpdateHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface ClustersUpdateOptionalParams extends coreClient.OperationOptions { +export interface ClustersUpdateOptionalParams extends OperationOptions { clusterUpdateParameters?: ClusterPatchParameters; ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type ClustersUpdateResponse = Cluster; - -// @public -export interface ClustersUpdateVersionHeaders { - location?: string; -} - -// @public -export interface ClustersUpdateVersionOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ClustersUpdateVersionOptionalParams extends OperationOptions { updateIntervalInMs?: number; } -// @public -export type ClustersUpdateVersionResponse = OperationStatusResult; - // @public export type ClusterType = string; @@ -1596,9 +1618,13 @@ export type ClusterUpdateStrategyType = string; // @public export interface ClusterUpdateVersionParameters { + safeguardMode?: ClusterUpdateVersionSafeguardMode; targetClusterVersion: string; } +// @public +export type ClusterUpdateVersionSafeguardMode = string; + // @public export interface CommandOutputOverride { associatedIdentity?: IdentitySelector; @@ -1637,109 +1663,93 @@ export type ConsoleDetailedStatus = string; // @public export type ConsoleEnabled = string; -// @public -export interface ConsoleList { - nextLink?: string; - value?: Console_2[]; -} - // @public export interface ConsolePatchParameters { enabled?: ConsoleEnabled; expiration?: Date; sshPublicKey?: SshPublicKey; - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public -export type ConsoleProvisioningState = string; +export interface ConsolePatchProperties { + enabled?: ConsoleEnabled; + expiration?: Date; + sshPublicKey?: SshPublicKey; +} // @public -export interface Consoles { - beginCreateOrUpdate(resourceGroupName: string, virtualMachineName: string, consoleName: string, consoleParameters: Console_2, options?: ConsolesCreateOrUpdateOptionalParams): Promise, ConsolesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualMachineName: string, consoleName: string, consoleParameters: Console_2, options?: ConsolesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesDeleteOptionalParams): Promise, ConsolesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesUpdateOptionalParams): Promise, ConsolesUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesUpdateOptionalParams): Promise; - get(resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesGetOptionalParams): Promise; - listByVirtualMachine(resourceGroupName: string, virtualMachineName: string, options?: ConsolesListByVirtualMachineOptionalParams): PagedAsyncIterableIterator; +export interface ConsoleProperties { + readonly detailedStatus?: ConsoleDetailedStatus; + readonly detailedStatusMessage?: string; + enabled: ConsoleEnabled; + expiration?: Date; + readonly privateLinkServiceId?: string; + readonly provisioningState?: ConsoleProvisioningState; + sshPublicKey: SshPublicKey; + readonly virtualMachineAccessId?: string; } // @public -export interface ConsolesCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} +export type ConsoleProvisioningState = string; // @public -export interface ConsolesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface ConsolesCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type ConsolesCreateOrUpdateResponse = Console_2; - -// @public -export interface ConsolesDeleteHeaders { - location?: string; -} - -// @public -export interface ConsolesDeleteOptionalParams extends coreClient.OperationOptions { +export interface ConsolesDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type ConsolesDeleteResponse = OperationStatusResult; - -// @public -export interface ConsolesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ConsolesGetResponse = Console_2; - -// @public -export interface ConsolesListByVirtualMachineNextOptionalParams extends coreClient.OperationOptions { +export interface ConsolesGetOptionalParams extends OperationOptions { } // @public -export type ConsolesListByVirtualMachineNextResponse = ConsoleList; - -// @public -export interface ConsolesListByVirtualMachineOptionalParams extends coreClient.OperationOptions { +export interface ConsolesListByVirtualMachineOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type ConsolesListByVirtualMachineResponse = ConsoleList; - -// @public -export interface ConsolesUpdateHeaders { - azureAsyncOperation?: string; - location?: string; +export interface ConsolesOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, virtualMachineName: string, consoleName: string, consoleParameters: Console_2, options?: ConsolesCreateOrUpdateOptionalParams) => Promise, Console_2>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, virtualMachineName: string, consoleName: string, consoleParameters: Console_2, options?: ConsolesCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesUpdateOptionalParams) => Promise, Console_2>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, virtualMachineName: string, consoleName: string, consoleParameters: Console_2, options?: ConsolesCreateOrUpdateOptionalParams) => PollerLike, Console_2>; + delete: (resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesGetOptionalParams) => Promise; + listByVirtualMachine: (resourceGroupName: string, virtualMachineName: string, options?: ConsolesListByVirtualMachineOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, virtualMachineName: string, consoleName: string, options?: ConsolesUpdateOptionalParams) => PollerLike, Console_2>; } // @public -export interface ConsolesUpdateOptionalParams extends coreClient.OperationOptions { +export interface ConsolesUpdateOptionalParams extends OperationOptions { consoleUpdateParameters?: ConsolePatchParameters; ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type ConsolesUpdateResponse = Console_2; +export type ContinuablePage = TPage & { + continuationToken?: string; +}; // @public export type ControlImpact = string; @@ -1764,6 +1774,9 @@ export type CreatedByType = string; // @public export type DefaultGateway = string; +// @public +export type DeploymentType = string; + // @public export type DeviceConnectionType = string; @@ -1784,7 +1797,7 @@ export interface EndpointDependency { // @public export interface ErrorAdditionalInfo { - readonly info?: Record; + readonly info?: any; readonly type?: string; } @@ -1805,9 +1818,12 @@ export interface ErrorResponse { // @public export interface ExtendedLocation { name: string; - type: string; + type: ExtendedLocationType; } +// @public +export type ExtendedLocationType = string; + // @public export type FabricPeeringEnabled = string; @@ -1823,7 +1839,10 @@ export interface FeatureStatus { } // @public -export function getContinuationToken(page: unknown): string | undefined; +export interface FilterDevices { + bareMetalMachineNames?: string[]; + rackNames?: string[]; +} // @public export interface HardwareInventory { @@ -1909,6 +1928,29 @@ export interface KeySetUserStatus { readonly statusMessage?: string; } +// @public +export enum KnownAccessBridgeAllowedName { + Bastion = "Bastion", + PrivateVault = "PrivateVault", + StorageDashboard = "StorageDashboard" +} + +// @public +export enum KnownAccessBridgeDetailedStatus { + Degraded = "Degraded", + Failed = "Failed", + Running = "Running" +} + +// @public +export enum KnownAccessBridgeProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + // @public export enum KnownActionStateStatus { Completed = "Completed", @@ -2016,6 +2058,18 @@ export enum KnownBareMetalMachineKeySetUserSetupStatus { Invalid = "Invalid" } +// @public +export enum KnownBareMetalMachineMetricsConfigurationStatusLogLevel { + Default = "Default", + Nexus = "Nexus" +} + +// @public +export enum KnownBareMetalMachineMetricsConfigurationStatusMetricsLevel { + Default = "Default", + Nexus = "Nexus" +} + // @public export enum KnownBareMetalMachinePowerState { Off = "Off", @@ -2037,6 +2091,12 @@ export enum KnownBareMetalMachineReadyState { True = "True" } +// @public +export enum KnownBareMetalMachineReimageSafeguardMode { + All = "All", + None = "None" +} + // @public export enum KnownBareMetalMachineReplaceSafeguardMode { All = "All", @@ -2127,7 +2187,10 @@ export enum KnownCloudServicesNetworkStorageMode { export enum KnownCloudServicesNetworkStorageStatusStatus { Available = "Available", ExpandingVolume = "ExpandingVolume", - ExpansionFailed = "ExpansionFailed" + ExpansionFailed = "ExpansionFailed", + Initializing = "Initializing", + None = "None", + Repairing = "Repairing" } // @public @@ -2143,6 +2206,12 @@ export enum KnownClusterContinueUpdateVersionMachineGroupTargetingMode { AlphaByRack = "AlphaByRack" } +// @public +export enum KnownClusterContinueUpdateVersionSafeguardMode { + All = "All", + None = "None" +} + // @public export enum KnownClusterDetailedStatus { Degraded = "Degraded", @@ -2156,6 +2225,11 @@ export enum KnownClusterDetailedStatus { Updating = "Updating" } +// @public +export enum KnownClusterInspectAdditionalAction { + ResetHardware = "ResetHardware" +} + // @public export enum KnownClusterManagerConnectionStatus { Connected = "Connected", @@ -2232,12 +2306,19 @@ export enum KnownClusterUpdateStrategyType { Rack = "Rack" } +// @public +export enum KnownClusterUpdateVersionSafeguardMode { + All = "All", + None = "None" +} + // @public export enum KnownCommandOutputType { BareMetalMachineRunCommand = "BareMetalMachineRunCommand", BareMetalMachineRunDataExtracts = "BareMetalMachineRunDataExtracts", BareMetalMachineRunDataExtractsRestricted = "BareMetalMachineRunDataExtractsRestricted", BareMetalMachineRunReadCommands = "BareMetalMachineRunReadCommands", + ClusterSupportAdministrativeActions = "ClusterSupportAdministrativeActions", StorageRunReadCommands = "StorageRunReadCommands" } @@ -2282,6 +2363,12 @@ export enum KnownDefaultGateway { True = "True" } +// @public +export enum KnownDeploymentType { + AzureLocal = "AzureLocal", + Nexus = "Nexus" +} + // @public export enum KnownDeviceConnectionType { PCI = "PCI" @@ -2293,6 +2380,12 @@ export enum KnownDiskType { SSD = "SSD" } +// @public +export enum KnownExtendedLocationType { + CustomLocation = "CustomLocation", + EdgeZone = "EdgeZone" +} + // @public export enum KnownFabricPeeringEnabled { False = "False", @@ -2414,6 +2507,14 @@ export enum KnownKubernetesPluginType { Sriov = "SRIOV" } +// @public +export enum KnownKubernetesVersionProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" +} + // @public export enum KnownL2NetworkDetailedStatus { Available = "Available", @@ -2522,6 +2623,12 @@ export enum KnownRackSkuType { Single = "Single" } +// @public +export enum KnownRelayPrivateEndpointConnectionState { + Approved = "Approved", + Rejected = "Rejected" +} + // @public export enum KnownRelayType { Platform = "Platform", @@ -2541,6 +2648,24 @@ export enum KnownRemoteVendorManagementStatus { Unsupported = "Unsupported" } +// @public +export enum KnownRuntimeProtectionAgentHealthStatus { + Healthy = "Healthy", + Unhealthy = "Unhealthy" +} + +// @public +export enum KnownRuntimeProtectionAgentLicenseStatus { + Licensed = "Licensed", + Unlicensed = "Unlicensed" +} + +// @public +export enum KnownRuntimeProtectionDefinitionUpdateMode { + Automatic = "Automatic", + None = "None" +} + // @public export enum KnownRuntimeProtectionEnforcementLevel { Audit = "Audit", @@ -2550,6 +2675,12 @@ export enum KnownRuntimeProtectionEnforcementLevel { RealTime = "RealTime" } +// @public +export enum KnownSecurityRuleDirection { + Inbound = "Inbound", + Outbound = "Outbound" +} + // @public export enum KnownSkipShutdown { False = "False", @@ -2572,6 +2703,18 @@ export enum KnownStorageApplianceDetailedStatus { Provisioning = "Provisioning" } +// @public +export enum KnownStorageApplianceMetricsConfigurationStatusLogLevel { + Default = "Default", + Nexus = "Nexus" +} + +// @public +export enum KnownStorageApplianceMetricsConfigurationStatusMetricsLevel { + Default = "Default", + Nexus = "Nexus" +} + // @public export enum KnownStorageApplianceProvisioningState { Accepted = "Accepted", @@ -2581,6 +2724,12 @@ export enum KnownStorageApplianceProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownTransportProtocol { + TCP = "TCP", + UDP = "UDP" +} + // @public export enum KnownTrunkedNetworkDetailedStatus { Available = "Available", @@ -2609,6 +2758,13 @@ export enum KnownValidationThresholdType { PercentSuccess = "PercentSuccess" } +// @public +export enum KnownVersions { + V20250901 = "2025-09-01", + V20260101Preview = "2026-01-01-preview", + V20260501Preview = "2026-05-01-preview" +} + // @public export enum KnownVirtualMachineBootMethod { Bios = "BIOS", @@ -2759,117 +2915,87 @@ export type KubernetesClusterFeatureAvailabilityLifecycle = string; // @public export type KubernetesClusterFeatureDetailedStatus = string; -// @public -export interface KubernetesClusterFeatureList { - nextLink?: string; - value?: KubernetesClusterFeature[]; -} - // @public export interface KubernetesClusterFeaturePatchParameters { options?: StringKeyValuePair[]; - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public -export type KubernetesClusterFeatureProvisioningState = string; +export interface KubernetesClusterFeaturePatchProperties { + options?: StringKeyValuePair[]; +} // @public -export type KubernetesClusterFeatureRequired = string; +export interface KubernetesClusterFeatureProperties { + readonly availabilityLifecycle?: KubernetesClusterFeatureAvailabilityLifecycle; + readonly detailedStatus?: KubernetesClusterFeatureDetailedStatus; + readonly detailedStatusMessage?: string; + options?: StringKeyValuePair[]; + readonly provisioningState?: KubernetesClusterFeatureProvisioningState; + readonly required?: KubernetesClusterFeatureRequired; + readonly version?: string; +} // @public -export interface KubernetesClusterFeatures { - beginCreateOrUpdate(resourceGroupName: string, kubernetesClusterName: string, featureName: string, kubernetesClusterFeatureParameters: KubernetesClusterFeature, options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams): Promise, KubernetesClusterFeaturesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, kubernetesClusterName: string, featureName: string, kubernetesClusterFeatureParameters: KubernetesClusterFeature, options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesDeleteOptionalParams): Promise, KubernetesClusterFeaturesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesUpdateOptionalParams): Promise, KubernetesClusterFeaturesUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesUpdateOptionalParams): Promise; - get(resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesGetOptionalParams): Promise; - listByKubernetesCluster(resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClusterFeaturesListByKubernetesClusterOptionalParams): PagedAsyncIterableIterator; -} +export type KubernetesClusterFeatureProvisioningState = string; // @public -export interface KubernetesClusterFeaturesCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} +export type KubernetesClusterFeatureRequired = string; // @public -export interface KubernetesClusterFeaturesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface KubernetesClusterFeaturesCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type KubernetesClusterFeaturesCreateOrUpdateResponse = KubernetesClusterFeature; - -// @public -export interface KubernetesClusterFeaturesDeleteHeaders { - location?: string; -} - -// @public -export interface KubernetesClusterFeaturesDeleteOptionalParams extends coreClient.OperationOptions { +export interface KubernetesClusterFeaturesDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type KubernetesClusterFeaturesDeleteResponse = OperationStatusResult; - -// @public -export interface KubernetesClusterFeaturesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type KubernetesClusterFeaturesGetResponse = KubernetesClusterFeature; - -// @public -export interface KubernetesClusterFeaturesListByKubernetesClusterNextOptionalParams extends coreClient.OperationOptions { +export interface KubernetesClusterFeaturesGetOptionalParams extends OperationOptions { } // @public -export type KubernetesClusterFeaturesListByKubernetesClusterNextResponse = KubernetesClusterFeatureList; - -// @public -export interface KubernetesClusterFeaturesListByKubernetesClusterOptionalParams extends coreClient.OperationOptions { +export interface KubernetesClusterFeaturesListByKubernetesClusterOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type KubernetesClusterFeaturesListByKubernetesClusterResponse = KubernetesClusterFeatureList; - -// @public -export interface KubernetesClusterFeaturesUpdateHeaders { - azureAsyncOperation?: string; - location?: string; +export interface KubernetesClusterFeaturesOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, kubernetesClusterName: string, featureName: string, kubernetesClusterFeatureParameters: KubernetesClusterFeature, options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams) => Promise, KubernetesClusterFeature>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, kubernetesClusterName: string, featureName: string, kubernetesClusterFeatureParameters: KubernetesClusterFeature, options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesUpdateOptionalParams) => Promise, KubernetesClusterFeature>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, kubernetesClusterName: string, featureName: string, kubernetesClusterFeatureParameters: KubernetesClusterFeature, options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams) => PollerLike, KubernetesClusterFeature>; + delete: (resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesGetOptionalParams) => Promise; + listByKubernetesCluster: (resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClusterFeaturesListByKubernetesClusterOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, kubernetesClusterName: string, featureName: string, options?: KubernetesClusterFeaturesUpdateOptionalParams) => PollerLike, KubernetesClusterFeature>; } // @public -export interface KubernetesClusterFeaturesUpdateOptionalParams extends coreClient.OperationOptions { +export interface KubernetesClusterFeaturesUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; kubernetesClusterFeatureUpdateParameters?: KubernetesClusterFeaturePatchParameters; - resumeFrom?: string; updateIntervalInMs?: number; } -// @public -export type KubernetesClusterFeaturesUpdateResponse = KubernetesClusterFeature; - -// @public -export interface KubernetesClusterList { - nextLink?: string; - value?: KubernetesCluster[]; -} - // @public export interface KubernetesClusterNode { readonly agentPoolId?: string; @@ -2900,151 +3026,217 @@ export interface KubernetesClusterPatchParameters { administratorConfiguration?: AdministratorConfigurationPatch; controlPlaneNodeConfiguration?: ControlPlaneNodePatchConfiguration; kubernetesVersion?: string; - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public -export type KubernetesClusterProvisioningState = string; - -// @public -export interface KubernetesClusterRestartNodeParameters { - nodeName: string; +export interface KubernetesClusterPatchProperties { + administratorConfiguration?: AdministratorConfigurationPatch; + controlPlaneNodeConfiguration?: ControlPlaneNodePatchConfiguration; + kubernetesVersion?: string; } // @public -export interface KubernetesClusters { - beginCreateOrUpdate(resourceGroupName: string, kubernetesClusterName: string, kubernetesClusterParameters: KubernetesCluster, options?: KubernetesClustersCreateOrUpdateOptionalParams): Promise, KubernetesClustersCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, kubernetesClusterName: string, kubernetesClusterParameters: KubernetesCluster, options?: KubernetesClustersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersDeleteOptionalParams): Promise, KubernetesClustersDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersDeleteOptionalParams): Promise; - beginRestartNode(resourceGroupName: string, kubernetesClusterName: string, kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, options?: KubernetesClustersRestartNodeOptionalParams): Promise, KubernetesClustersRestartNodeResponse>>; - beginRestartNodeAndWait(resourceGroupName: string, kubernetesClusterName: string, kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, options?: KubernetesClustersRestartNodeOptionalParams): Promise; - beginUpdate(resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersUpdateOptionalParams): Promise, KubernetesClustersUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersUpdateOptionalParams): Promise; - get(resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: KubernetesClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: KubernetesClustersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +export interface KubernetesClusterProperties { + aadConfiguration?: AadConfiguration; + administratorConfiguration?: AdministratorConfiguration; + readonly attachedNetworkIds?: string[]; + readonly availableUpgrades?: AvailableUpgrade[]; + readonly clusterId?: string; + readonly connectedClusterId?: string; + readonly controlPlaneKubernetesVersion?: string; + controlPlaneNodeConfiguration: ControlPlaneNodeConfiguration; + readonly detailedStatus?: KubernetesClusterDetailedStatus; + readonly detailedStatusMessage?: string; + readonly featureStatuses?: FeatureStatus[]; + initialAgentPoolConfigurations: InitialAgentPoolConfiguration[]; + kubernetesVersion: string; + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + networkConfiguration: NetworkConfiguration; + readonly nodes?: KubernetesClusterNode[]; + readonly provisioningState?: KubernetesClusterProvisioningState; } // @public -export interface KubernetesClustersCreateOrUpdateHeaders { - azureAsyncOperation?: string; +export type KubernetesClusterProvisioningState = string; + +// @public +export interface KubernetesClusterRestartNodeParameters { + nodeName: string; } // @public -export interface KubernetesClustersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface KubernetesClustersCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type KubernetesClustersCreateOrUpdateResponse = KubernetesCluster; - -// @public -export interface KubernetesClustersDeleteHeaders { - location?: string; -} - -// @public -export interface KubernetesClustersDeleteOptionalParams extends coreClient.OperationOptions { +export interface KubernetesClustersDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type KubernetesClustersDeleteResponse = OperationStatusResult; +export interface KubernetesClustersGetOptionalParams extends OperationOptions { +} // @public -export interface KubernetesClustersGetOptionalParams extends coreClient.OperationOptions { +export interface KubernetesClustersListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; } // @public -export type KubernetesClustersGetResponse = KubernetesCluster; +export interface KubernetesClustersListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} // @public -export interface KubernetesClustersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface KubernetesClustersOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, kubernetesClusterName: string, kubernetesClusterParameters: KubernetesCluster, options?: KubernetesClustersCreateOrUpdateOptionalParams) => Promise, KubernetesCluster>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, kubernetesClusterName: string, kubernetesClusterParameters: KubernetesCluster, options?: KubernetesClustersCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginRestartNode: (resourceGroupName: string, kubernetesClusterName: string, kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, options?: KubernetesClustersRestartNodeOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginRestartNodeAndWait: (resourceGroupName: string, kubernetesClusterName: string, kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, options?: KubernetesClustersRestartNodeOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersUpdateOptionalParams) => Promise, KubernetesCluster>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, kubernetesClusterName: string, kubernetesClusterParameters: KubernetesCluster, options?: KubernetesClustersCreateOrUpdateOptionalParams) => PollerLike, KubernetesCluster>; + delete: (resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: KubernetesClustersListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: KubernetesClustersListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + restartNode: (resourceGroupName: string, kubernetesClusterName: string, kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, options?: KubernetesClustersRestartNodeOptionalParams) => PollerLike, OperationStatusResult>; + update: (resourceGroupName: string, kubernetesClusterName: string, options?: KubernetesClustersUpdateOptionalParams) => PollerLike, KubernetesCluster>; +} + +// @public +export interface KubernetesClustersRestartNodeOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export type KubernetesClustersListByResourceGroupNextResponse = KubernetesClusterList; +export interface KubernetesClustersUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + kubernetesClusterUpdateParameters?: KubernetesClusterPatchParameters; + updateIntervalInMs?: number; +} // @public -export interface KubernetesClustersListByResourceGroupOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; +export interface KubernetesLabel { + key: string; + value: string; } // @public -export type KubernetesClustersListByResourceGroupResponse = KubernetesClusterList; +export type KubernetesNodePowerState = string; // @public -export interface KubernetesClustersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} +export type KubernetesNodeRole = string; // @public -export type KubernetesClustersListBySubscriptionNextResponse = KubernetesClusterList; +export type KubernetesPluginType = string; // @public -export interface KubernetesClustersListBySubscriptionOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - top?: number; +export interface KubernetesVersion extends TrackedResource { + readonly etag?: string; + extendedLocation: ExtendedLocation; + readonly provisioningState?: KubernetesVersionProvisioningState; + readonly values?: KubernetesVersionValue[]; } // @public -export type KubernetesClustersListBySubscriptionResponse = KubernetesClusterList; - -// @public -export interface KubernetesClustersRestartNodeHeaders { - location?: string; +export interface KubernetesVersionPatchParameters { + tags?: Record; } // @public -export interface KubernetesClustersRestartNodeOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface KubernetesVersionProperties { + readonly provisioningState?: KubernetesVersionProvisioningState; + readonly values?: KubernetesVersionValue[]; } // @public -export type KubernetesClustersRestartNodeResponse = OperationStatusResult; +export type KubernetesVersionProvisioningState = string; // @public -export interface KubernetesClustersUpdateHeaders { - azureAsyncOperation?: string; - location?: string; +export interface KubernetesVersionsCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + updateIntervalInMs?: number; } // @public -export interface KubernetesClustersUpdateOptionalParams extends coreClient.OperationOptions { +export interface KubernetesVersionsDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - kubernetesClusterUpdateParameters?: KubernetesClusterPatchParameters; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type KubernetesClustersUpdateResponse = KubernetesCluster; +export interface KubernetesVersionsGetOptionalParams extends OperationOptions { +} // @public -export interface KubernetesLabel { - key: string; - value: string; +export interface KubernetesVersionsListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; } // @public -export type KubernetesNodePowerState = string; +export interface KubernetesVersionsListBySubscriptionOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} // @public -export type KubernetesNodeRole = string; +export interface KubernetesVersionsOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, kubernetesVersionName: string, kubernetesVersionParameters: KubernetesVersion, options?: KubernetesVersionsCreateOrUpdateOptionalParams) => Promise, KubernetesVersion>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, kubernetesVersionName: string, kubernetesVersionParameters: KubernetesVersion, options?: KubernetesVersionsCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, kubernetesVersionName: string, options?: KubernetesVersionsDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, kubernetesVersionName: string, options?: KubernetesVersionsDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, kubernetesVersionName: string, options?: KubernetesVersionsUpdateOptionalParams) => Promise, KubernetesVersion>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, kubernetesVersionName: string, options?: KubernetesVersionsUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, kubernetesVersionName: string, kubernetesVersionParameters: KubernetesVersion, options?: KubernetesVersionsCreateOrUpdateOptionalParams) => PollerLike, KubernetesVersion>; + delete: (resourceGroupName: string, kubernetesVersionName: string, options?: KubernetesVersionsDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, kubernetesVersionName: string, options?: KubernetesVersionsGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: KubernetesVersionsListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: KubernetesVersionsListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, kubernetesVersionName: string, options?: KubernetesVersionsUpdateOptionalParams) => PollerLike, KubernetesVersion>; +} // @public -export type KubernetesPluginType = string; +export interface KubernetesVersionsUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; + kubernetesVersionPatchParameters?: KubernetesVersionPatchParameters; + updateIntervalInMs?: number; +} + +// @public +export interface KubernetesVersionValue { + readonly description?: string; + readonly version?: string; +} // @public export interface L2Network extends TrackedResource { @@ -3071,115 +3263,83 @@ export interface L2NetworkAttachmentConfiguration { // @public export type L2NetworkDetailedStatus = string; -// @public -export interface L2NetworkList { - nextLink?: string; - value?: L2Network[]; -} - // @public export interface L2NetworkPatchParameters { - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public -export type L2NetworkProvisioningState = string; - -// @public -export interface L2Networks { - beginCreateOrUpdate(resourceGroupName: string, l2NetworkName: string, l2NetworkParameters: L2Network, options?: L2NetworksCreateOrUpdateOptionalParams): Promise, L2NetworksCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, l2NetworkName: string, l2NetworkParameters: L2Network, options?: L2NetworksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, l2NetworkName: string, options?: L2NetworksDeleteOptionalParams): Promise, L2NetworksDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, l2NetworkName: string, options?: L2NetworksDeleteOptionalParams): Promise; - get(resourceGroupName: string, l2NetworkName: string, options?: L2NetworksGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: L2NetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: L2NetworksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, l2NetworkName: string, options?: L2NetworksUpdateOptionalParams): Promise; +export interface L2NetworkProperties { + readonly associatedResourceIds?: string[]; + readonly clusterId?: string; + readonly detailedStatus?: L2NetworkDetailedStatus; + readonly detailedStatusMessage?: string; + readonly hybridAksClustersAssociatedIds?: string[]; + hybridAksPluginType?: HybridAksPluginType; + interfaceName?: string; + l2IsolationDomainId: string; + readonly provisioningState?: L2NetworkProvisioningState; + readonly virtualMachinesAssociatedIds?: string[]; } // @public -export interface L2NetworksCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} +export type L2NetworkProvisioningState = string; // @public -export interface L2NetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface L2NetworksCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type L2NetworksCreateOrUpdateResponse = L2Network; - -// @public -export interface L2NetworksDeleteHeaders { - location?: string; -} - -// @public -export interface L2NetworksDeleteOptionalParams extends coreClient.OperationOptions { +export interface L2NetworksDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type L2NetworksDeleteResponse = OperationStatusResult; - -// @public -export interface L2NetworksGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type L2NetworksGetResponse = L2Network; - -// @public -export interface L2NetworksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface L2NetworksGetOptionalParams extends OperationOptions { } // @public -export type L2NetworksListByResourceGroupNextResponse = L2NetworkList; - -// @public -export interface L2NetworksListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface L2NetworksListByResourceGroupOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type L2NetworksListByResourceGroupResponse = L2NetworkList; - -// @public -export interface L2NetworksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type L2NetworksListBySubscriptionNextResponse = L2NetworkList; - -// @public -export interface L2NetworksListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface L2NetworksListBySubscriptionOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type L2NetworksListBySubscriptionResponse = L2NetworkList; +export interface L2NetworksOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, l2NetworkName: string, l2NetworkParameters: L2Network, options?: L2NetworksCreateOrUpdateOptionalParams) => Promise, L2Network>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, l2NetworkName: string, l2NetworkParameters: L2Network, options?: L2NetworksCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, l2NetworkName: string, options?: L2NetworksDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, l2NetworkName: string, options?: L2NetworksDeleteOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, l2NetworkName: string, l2NetworkParameters: L2Network, options?: L2NetworksCreateOrUpdateOptionalParams) => PollerLike, L2Network>; + delete: (resourceGroupName: string, l2NetworkName: string, options?: L2NetworksDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, l2NetworkName: string, options?: L2NetworksGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: L2NetworksListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: L2NetworksListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, l2NetworkName: string, options?: L2NetworksUpdateOptionalParams) => Promise; +} // @public -export interface L2NetworksUpdateOptionalParams extends coreClient.OperationOptions { +export interface L2NetworksUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; l2NetworkUpdateParameters?: L2NetworkPatchParameters; } -// @public -export type L2NetworksUpdateResponse = L2Network; - // @public export interface L2ServiceLoadBalancerConfiguration { ipAddressPools?: IpAddressPool[]; @@ -3219,115 +3379,88 @@ export type L3NetworkConfigurationIpamEnabled = string; // @public export type L3NetworkDetailedStatus = string; -// @public -export interface L3NetworkList { - nextLink?: string; - value?: L3Network[]; -} - // @public export interface L3NetworkPatchParameters { - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public -export type L3NetworkProvisioningState = string; - -// @public -export interface L3Networks { - beginCreateOrUpdate(resourceGroupName: string, l3NetworkName: string, l3NetworkParameters: L3Network, options?: L3NetworksCreateOrUpdateOptionalParams): Promise, L3NetworksCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, l3NetworkName: string, l3NetworkParameters: L3Network, options?: L3NetworksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, l3NetworkName: string, options?: L3NetworksDeleteOptionalParams): Promise, L3NetworksDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, l3NetworkName: string, options?: L3NetworksDeleteOptionalParams): Promise; - get(resourceGroupName: string, l3NetworkName: string, options?: L3NetworksGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: L3NetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: L3NetworksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, l3NetworkName: string, options?: L3NetworksUpdateOptionalParams): Promise; +export interface L3NetworkProperties { + readonly associatedResourceIds?: string[]; + readonly clusterId?: string; + readonly detailedStatus?: L3NetworkDetailedStatus; + readonly detailedStatusMessage?: string; + readonly hybridAksClustersAssociatedIds?: string[]; + hybridAksIpamEnabled?: HybridAksIpamEnabled; + hybridAksPluginType?: HybridAksPluginType; + interfaceName?: string; + ipAllocationType?: IpAllocationType; + ipv4ConnectedPrefix?: string; + ipv6ConnectedPrefix?: string; + l3IsolationDomainId: string; + readonly provisioningState?: L3NetworkProvisioningState; + readonly virtualMachinesAssociatedIds?: string[]; + vlan: number; } // @public -export interface L3NetworksCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} +export type L3NetworkProvisioningState = string; // @public -export interface L3NetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface L3NetworksCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type L3NetworksCreateOrUpdateResponse = L3Network; - -// @public -export interface L3NetworksDeleteHeaders { - location?: string; -} - -// @public -export interface L3NetworksDeleteOptionalParams extends coreClient.OperationOptions { +export interface L3NetworksDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type L3NetworksDeleteResponse = OperationStatusResult; - -// @public -export interface L3NetworksGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type L3NetworksGetResponse = L3Network; - -// @public -export interface L3NetworksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface L3NetworksGetOptionalParams extends OperationOptions { } // @public -export type L3NetworksListByResourceGroupNextResponse = L3NetworkList; - -// @public -export interface L3NetworksListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface L3NetworksListByResourceGroupOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type L3NetworksListByResourceGroupResponse = L3NetworkList; - -// @public -export interface L3NetworksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type L3NetworksListBySubscriptionNextResponse = L3NetworkList; - -// @public -export interface L3NetworksListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface L3NetworksListBySubscriptionOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type L3NetworksListBySubscriptionResponse = L3NetworkList; +export interface L3NetworksOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, l3NetworkName: string, l3NetworkParameters: L3Network, options?: L3NetworksCreateOrUpdateOptionalParams) => Promise, L3Network>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, l3NetworkName: string, l3NetworkParameters: L3Network, options?: L3NetworksCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, l3NetworkName: string, options?: L3NetworksDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, l3NetworkName: string, options?: L3NetworksDeleteOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, l3NetworkName: string, l3NetworkParameters: L3Network, options?: L3NetworksCreateOrUpdateOptionalParams) => PollerLike, L3Network>; + delete: (resourceGroupName: string, l3NetworkName: string, options?: L3NetworksDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, l3NetworkName: string, options?: L3NetworksGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: L3NetworksListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: L3NetworksListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, l3NetworkName: string, options?: L3NetworksUpdateOptionalParams) => Promise; +} // @public -export interface L3NetworksUpdateOptionalParams extends coreClient.OperationOptions { +export interface L3NetworksUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; l3NetworkUpdateParameters?: L3NetworkPatchParameters; } -// @public -export type L3NetworksUpdateResponse = L3Network; - // @public export interface LldpNeighbor { readonly portDescription?: string; @@ -3346,6 +3479,21 @@ export interface MachineDisk { // @public export type MachineSkuDiskConnectionType = string; +// @public +export interface MachineSkuProperties { + readonly bootstrapProtocol?: BootstrapProtocol; + readonly cpuCores?: number; + readonly cpuSockets?: number; + readonly disks?: MachineDisk[]; + readonly generation?: string; + readonly hardwareVersion?: string; + readonly memoryCapacityGB?: number; + readonly model?: string; + readonly networkInterfaces?: NetworkInterface[]; + readonly totalThreads?: number; + readonly vendor?: string; +} + // @public export interface MachineSkuSlot { readonly bootstrapProtocol?: BootstrapProtocol; @@ -3373,9 +3521,7 @@ export interface ManagedServiceIdentity { readonly principalId?: string; readonly tenantId?: string; type: ManagedServiceIdentityType; - userAssignedIdentities?: { - [propertyName: string]: UserAssignedIdentity | null; - }; + userAssignedIdentities?: Record; } // @public @@ -3385,90 +3531,58 @@ export type ManagedServiceIdentitySelectorType = string; export type ManagedServiceIdentityType = string; // @public -export interface MetricsConfigurations { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, metricsConfigurationName: string, metricsConfigurationParameters: ClusterMetricsConfiguration, options?: MetricsConfigurationsCreateOrUpdateOptionalParams): Promise, MetricsConfigurationsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, metricsConfigurationName: string, metricsConfigurationParameters: ClusterMetricsConfiguration, options?: MetricsConfigurationsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsDeleteOptionalParams): Promise, MetricsConfigurationsDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsUpdateOptionalParams): Promise, MetricsConfigurationsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsUpdateOptionalParams): Promise; - get(resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsGetOptionalParams): Promise; - listByCluster(resourceGroupName: string, clusterName: string, options?: MetricsConfigurationsListByClusterOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface MetricsConfigurationsCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} - -// @public -export interface MetricsConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface MetricsConfigurationsCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type MetricsConfigurationsCreateOrUpdateResponse = ClusterMetricsConfiguration; - -// @public -export interface MetricsConfigurationsDeleteHeaders { - location?: string; -} - -// @public -export interface MetricsConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { +export interface MetricsConfigurationsDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type MetricsConfigurationsDeleteResponse = OperationStatusResult; - -// @public -export interface MetricsConfigurationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type MetricsConfigurationsGetResponse = ClusterMetricsConfiguration; - -// @public -export interface MetricsConfigurationsListByClusterNextOptionalParams extends coreClient.OperationOptions { +export interface MetricsConfigurationsGetOptionalParams extends OperationOptions { } // @public -export type MetricsConfigurationsListByClusterNextResponse = ClusterMetricsConfigurationList; - -// @public -export interface MetricsConfigurationsListByClusterOptionalParams extends coreClient.OperationOptions { +export interface MetricsConfigurationsListByClusterOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type MetricsConfigurationsListByClusterResponse = ClusterMetricsConfigurationList; - -// @public -export interface MetricsConfigurationsUpdateHeaders { - azureAsyncOperation?: string; - location?: string; +export interface MetricsConfigurationsOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, clusterName: string, metricsConfigurationName: string, metricsConfigurationParameters: ClusterMetricsConfiguration, options?: MetricsConfigurationsCreateOrUpdateOptionalParams) => Promise, ClusterMetricsConfiguration>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, clusterName: string, metricsConfigurationName: string, metricsConfigurationParameters: ClusterMetricsConfiguration, options?: MetricsConfigurationsCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsUpdateOptionalParams) => Promise, ClusterMetricsConfiguration>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, clusterName: string, metricsConfigurationName: string, metricsConfigurationParameters: ClusterMetricsConfiguration, options?: MetricsConfigurationsCreateOrUpdateOptionalParams) => PollerLike, ClusterMetricsConfiguration>; + delete: (resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsGetOptionalParams) => Promise; + listByCluster: (resourceGroupName: string, clusterName: string, options?: MetricsConfigurationsListByClusterOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, clusterName: string, metricsConfigurationName: string, options?: MetricsConfigurationsUpdateOptionalParams) => PollerLike, ClusterMetricsConfiguration>; } // @public -export interface MetricsConfigurationsUpdateOptionalParams extends coreClient.OperationOptions { +export interface MetricsConfigurationsUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; metricsConfigurationUpdateParameters?: ClusterMetricsConfigurationPatchParameters; - resumeFrom?: string; updateIntervalInMs?: number; } -// @public -export type MetricsConfigurationsUpdateResponse = ClusterMetricsConfiguration; - // @public export interface NetworkAttachment { attachedNetworkId: string; @@ -3481,61 +3595,37 @@ export interface NetworkAttachment { } // @public (undocumented) -export class NetworkCloud extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: NetworkCloudOptionalParams); - // (undocumented) - agentPools: AgentPools; - // (undocumented) - apiVersion: string; - // (undocumented) - bareMetalMachineKeySets: BareMetalMachineKeySets; - // (undocumented) - bareMetalMachines: BareMetalMachines; - // (undocumented) - bmcKeySets: BmcKeySets; - // (undocumented) - cloudServicesNetworks: CloudServicesNetworks; - // (undocumented) - clusterManagers: ClusterManagers; - // (undocumented) - clusters: Clusters; - // (undocumented) - consoles: Consoles; - // (undocumented) - kubernetesClusterFeatures: KubernetesClusterFeatures; - // (undocumented) - kubernetesClusters: KubernetesClusters; - // (undocumented) - l2Networks: L2Networks; - // (undocumented) - l3Networks: L3Networks; - // (undocumented) - metricsConfigurations: MetricsConfigurations; - // (undocumented) - operations: Operations; - // (undocumented) - racks: Racks; - // (undocumented) - rackSkus: RackSkus; - // (undocumented) - storageAppliances: StorageAppliances; - // (undocumented) - subscriptionId: string; - // (undocumented) - trunkedNetworks: TrunkedNetworks; - // (undocumented) - virtualMachines: VirtualMachines; - // (undocumented) - volumes: Volumes; -} - -// @public -export interface NetworkCloudOptionalParams extends coreClient.ServiceClientOptions { - $host?: string; +export class NetworkCloud { + constructor(credential: TokenCredential, subscriptionId: string, options?: NetworkCloudOptionalParams); + readonly accessBridges: AccessBridgesOperations; + readonly agentPools: AgentPoolsOperations; + readonly bareMetalMachineKeySets: BareMetalMachineKeySetsOperations; + readonly bareMetalMachines: BareMetalMachinesOperations; + readonly bmcKeySets: BmcKeySetsOperations; + readonly cloudServicesNetworks: CloudServicesNetworksOperations; + readonly clusterManagers: ClusterManagersOperations; + readonly clusters: ClustersOperations; + readonly consoles: ConsolesOperations; + readonly kubernetesClusterFeatures: KubernetesClusterFeaturesOperations; + readonly kubernetesClusters: KubernetesClustersOperations; + readonly kubernetesVersions: KubernetesVersionsOperations; + readonly l2Networks: L2NetworksOperations; + readonly l3Networks: L3NetworksOperations; + readonly metricsConfigurations: MetricsConfigurationsOperations; + readonly operations: OperationsOperations; + readonly pipeline: Pipeline; + readonly racks: RacksOperations; + readonly rackSkus: RackSkusOperations; + readonly storageAppliances: StorageAppliancesOperations; + readonly trunkedNetworks: TrunkedNetworksOperations; + readonly virtualMachines: VirtualMachinesOperations; + readonly volumes: VolumesOperations; +} + +// @public +export interface NetworkCloudOptionalParams extends ClientOptions { apiVersion?: string; - endpoint?: string; + cloudSetting?: AzureSupportedClouds; } // @public @@ -3591,30 +3681,14 @@ export interface OperationDisplay { } // @public -export interface OperationListResult { - readonly nextLink?: string; - readonly value?: Operation[]; -} - -// @public -export interface Operations { - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +export interface OperationsListOptionalParams extends OperationOptions { } // @public -export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +export interface OperationsOperations { + list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; } -// @public -export type OperationsListNextResponse = OperationListResult; - -// @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type OperationsListResponse = OperationListResult; - // @public export interface OperationStatusResult { readonly endTime?: Date; @@ -3633,7 +3707,15 @@ export interface OperationStatusResult { } // @public -export type Origin = string; +export interface OperationStatusResultProperties { + readonly exitCode?: string; + readonly outputHead?: string; + readonly resultRef?: string; + readonly resultUrl?: string; +} + +// @public +export type Origin = string; // @public export interface OsDisk { @@ -3648,6 +3730,22 @@ export type OsDiskCreateOption = string; // @public export type OsDiskDeleteOption = string; +// @public +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; + next(): Promise>; +} + +// @public +export interface PageSettings { + continuationToken?: string; +} + +// @public +export interface ProxyResource extends Resource { +} + // @public export interface Rack extends TrackedResource { availabilityZone: string; @@ -3676,80 +3774,51 @@ export interface RackDefinition { // @public export type RackDetailedStatus = string; -// @public -export interface RackList { - nextLink?: string; - value?: Rack[]; -} - // @public export interface RackPatchParameters { rackLocation?: string; rackSerialNumber?: string; - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public -export type RackProvisioningState = string; - -// @public -export interface Racks { - beginCreateOrUpdate(resourceGroupName: string, rackName: string, rackParameters: Rack, options?: RacksCreateOrUpdateOptionalParams): Promise, RacksCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, rackName: string, rackParameters: Rack, options?: RacksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, rackName: string, options?: RacksDeleteOptionalParams): Promise, RacksDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, rackName: string, options?: RacksDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, rackName: string, options?: RacksUpdateOptionalParams): Promise, RacksUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, rackName: string, options?: RacksUpdateOptionalParams): Promise; - get(resourceGroupName: string, rackName: string, options?: RacksGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: RacksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: RacksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +export interface RackProperties { + availabilityZone: string; + readonly clusterId?: string; + readonly detailedStatus?: RackDetailedStatus; + readonly detailedStatusMessage?: string; + readonly provisioningState?: RackProvisioningState; + rackLocation: string; + rackSerialNumber: string; + rackSkuId: string; } // @public -export interface RacksCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} +export type RackProvisioningState = string; // @public -export interface RacksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface RacksCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type RacksCreateOrUpdateResponse = Rack; - -// @public -export interface RacksDeleteHeaders { - location?: string; -} - -// @public -export interface RacksDeleteOptionalParams extends coreClient.OperationOptions { +export interface RacksDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type RacksDeleteResponse = OperationStatusResult; - -// @public -export interface RacksGetOptionalParams extends coreClient.OperationOptions { +export interface RacksGetOptionalParams extends OperationOptions { } // @public -export type RacksGetResponse = Rack; - -// @public -export interface RackSku extends Resource { +export interface RackSku extends ProxyResource { readonly computeMachines?: MachineSkuSlot[]; readonly controllerMachines?: MachineSkuSlot[]; + readonly deploymentType?: DeploymentType; readonly description?: string; readonly maxClusterSlots?: number; readonly provisioningState?: RackSkuProvisioningState; @@ -3759,93 +3828,88 @@ export interface RackSku extends Resource { } // @public -export interface RackSkuList { - nextLink?: string; - value?: RackSku[]; +export interface RackSkuProperties { + readonly computeMachines?: MachineSkuSlot[]; + readonly controllerMachines?: MachineSkuSlot[]; + readonly deploymentType?: DeploymentType; + readonly description?: string; + readonly maxClusterSlots?: number; + readonly provisioningState?: RackSkuProvisioningState; + readonly rackType?: RackSkuType; + readonly storageAppliances?: StorageApplianceSkuSlot[]; + readonly supportedRackSkuIds?: string[]; } // @public export type RackSkuProvisioningState = string; // @public -export interface RackSkus { - get(rackSkuName: string, options?: RackSkusGetOptionalParams): Promise; - listBySubscription(options?: RackSkusListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +export interface RackSkusGetOptionalParams extends OperationOptions { } // @public -export interface RackSkusGetOptionalParams extends coreClient.OperationOptions { +export interface RackSkusListBySubscriptionOptionalParams extends OperationOptions { } // @public -export type RackSkusGetResponse = RackSku; - -// @public -export interface RackSkusListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export interface RackSkusOperations { + get: (rackSkuName: string, options?: RackSkusGetOptionalParams) => Promise; + listBySubscription: (options?: RackSkusListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; } -// @public -export type RackSkusListBySubscriptionNextResponse = RackSkuList; - -// @public -export interface RackSkusListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RackSkusListBySubscriptionResponse = RackSkuList; - // @public export type RackSkuType = string; // @public -export interface RacksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RacksListByResourceGroupNextResponse = RackList; - -// @public -export interface RacksListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface RacksListByResourceGroupOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type RacksListByResourceGroupResponse = RackList; - -// @public -export interface RacksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type RacksListBySubscriptionNextResponse = RackList; - -// @public -export interface RacksListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface RacksListBySubscriptionOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type RacksListBySubscriptionResponse = RackList; +export interface RacksOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, rackName: string, rackParameters: Rack, options?: RacksCreateOrUpdateOptionalParams) => Promise, Rack>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, rackName: string, rackParameters: Rack, options?: RacksCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, rackName: string, options?: RacksDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, rackName: string, options?: RacksDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, rackName: string, options?: RacksUpdateOptionalParams) => Promise, Rack>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, rackName: string, options?: RacksUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, rackName: string, rackParameters: Rack, options?: RacksCreateOrUpdateOptionalParams) => PollerLike, Rack>; + delete: (resourceGroupName: string, rackName: string, options?: RacksDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, rackName: string, options?: RacksGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: RacksListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: RacksListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, rackName: string, options?: RacksUpdateOptionalParams) => PollerLike, Rack>; +} // @public -export interface RacksUpdateHeaders { - azureAsyncOperation?: string; - location?: string; +export interface RacksPatchProperties { + rackLocation?: string; + rackSerialNumber?: string; } // @public -export interface RacksUpdateOptionalParams extends coreClient.OperationOptions { +export interface RacksUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; rackUpdateParameters?: RackPatchParameters; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type RacksUpdateResponse = Rack; +export type RelayPrivateEndpointConnectionState = string; // @public export type RelayType = string; @@ -3864,18 +3928,43 @@ export interface Resource { readonly type?: string; } +// @public +export function restorePoller(client: NetworkCloud, serializedState: string, sourceOperation: (...args: any[]) => PollerLike, TResult>, options?: RestorePollerOptions): PollerLike, TResult>; + +// @public (undocumented) +export interface RestorePollerOptions extends OperationOptions { + abortSignal?: AbortSignalLike; + processResponseBody?: (result: TResponse) => Promise; + updateIntervalInMs?: number; +} + +// @public +export type RuntimeProtectionAgentHealthStatus = string; + +// @public +export type RuntimeProtectionAgentLicenseStatus = string; + // @public export interface RuntimeProtectionConfiguration { + definitionUpdateMode?: RuntimeProtectionDefinitionUpdateMode; enforcementLevel?: RuntimeProtectionEnforcementLevel; } +// @public +export type RuntimeProtectionDefinitionUpdateMode = string; + // @public export type RuntimeProtectionEnforcementLevel = string; // @public export interface RuntimeProtectionStatus { + readonly agentHealthStatus?: RuntimeProtectionAgentHealthStatus; + readonly agentHealthStatusIssues?: string[]; + readonly agentLicenseStatus?: RuntimeProtectionAgentLicenseStatus; readonly definitionsLastUpdated?: Date; readonly definitionsVersion?: string; + readonly definitionUpdateMode?: RuntimeProtectionDefinitionUpdateMode; + readonly enforcementLevel?: RuntimeProtectionEnforcementLevel; readonly scanCompletedTime?: Date; readonly scanScheduledTime?: Date; readonly scanStartedTime?: Date; @@ -3904,6 +3993,9 @@ export interface SecretRotationStatus { readonly secretType?: string; } +// @public +export type SecurityRuleDirection = string; + // @public export interface ServiceLoadBalancerBgpPeer { bfdEnabled?: BfdEnabled; @@ -3926,6 +4018,28 @@ export interface ServicePrincipalInformation { tenantId: string; } +// @public +export interface SimplePollerLike, TResult> { + getOperationState(): TState; + getResult(): TResult | undefined; + isDone(): boolean; + // @deprecated + isStopped(): boolean; + onProgress(callback: (state: TState) => void): CancelOnProgress; + poll(options?: { + abortSignal?: AbortSignalLike; + }): Promise; + pollUntilDone(pollOptions?: { + abortSignal?: AbortSignalLike; + }): Promise; + serialize(): Promise; + // @deprecated + stopPolling(): void; + submitted(): Promise; + // @deprecated + toString(): string; +} + // @public export type SkipShutdown = string; @@ -3956,10 +4070,12 @@ export interface StorageAppliance extends TrackedResource { readonly detailedStatus?: StorageApplianceDetailedStatus; readonly detailedStatusMessage?: string; readonly etag?: string; + readonly expansionShelves?: StorageApplianceExpansionShelf[]; extendedLocation: ExtendedLocation; readonly managementIpv4Address?: string; readonly manufacturer?: string; readonly model?: string; + readonly monitoringConfigurationStatus?: StorageApplianceMonitoringConfigurationStatus; readonly provisioningState?: StorageApplianceProvisioningState; rackId: string; rackSlot: number; @@ -3994,114 +4110,102 @@ export interface StorageApplianceEnableRemoteVendorManagementParameters { } // @public -export interface StorageApplianceList { - nextLink?: string; - value?: StorageAppliance[]; +export interface StorageApplianceExpansionShelf { + model?: string; + version?: string; } // @public -export interface StorageAppliancePatchParameters { - serialNumber?: string; - tags?: { - [propertyName: string]: string; - }; -} +export type StorageApplianceMetricsConfigurationStatusLogLevel = string; // @public -export type StorageApplianceProvisioningState = string; +export type StorageApplianceMetricsConfigurationStatusMetricsLevel = string; // @public -export interface StorageApplianceRunReadCommandsParameters { - commands: StorageApplianceCommandSpecification[]; - limitTimeSeconds: number; +export interface StorageApplianceMonitoringConfigurationStatus { + logLevel?: StorageApplianceMetricsConfigurationStatusLogLevel; + metricsLevel?: StorageApplianceMetricsConfigurationStatusMetricsLevel; } // @public -export interface StorageAppliances { - beginCreateOrUpdate(resourceGroupName: string, storageApplianceName: string, storageApplianceParameters: StorageAppliance, options?: StorageAppliancesCreateOrUpdateOptionalParams): Promise, StorageAppliancesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, storageApplianceName: string, storageApplianceParameters: StorageAppliance, options?: StorageAppliancesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesDeleteOptionalParams): Promise, StorageAppliancesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesDeleteOptionalParams): Promise; - beginDisableRemoteVendorManagement(resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams): Promise, StorageAppliancesDisableRemoteVendorManagementResponse>>; - beginDisableRemoteVendorManagementAndWait(resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams): Promise; - beginEnableRemoteVendorManagement(resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams): Promise, StorageAppliancesEnableRemoteVendorManagementResponse>>; - beginEnableRemoteVendorManagementAndWait(resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams): Promise; - beginRunReadCommands(resourceGroupName: string, storageApplianceName: string, storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, options?: StorageAppliancesRunReadCommandsOptionalParams): Promise, StorageAppliancesRunReadCommandsResponse>>; - beginRunReadCommandsAndWait(resourceGroupName: string, storageApplianceName: string, storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, options?: StorageAppliancesRunReadCommandsOptionalParams): Promise; - beginUpdate(resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesUpdateOptionalParams): Promise, StorageAppliancesUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesUpdateOptionalParams): Promise; - get(resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: StorageAppliancesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: StorageAppliancesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +export interface StorageAppliancePatchParameters { + serialNumber?: string; + tags?: Record; } // @public -export interface StorageAppliancesCreateOrUpdateHeaders { - azureAsyncOperation?: string; +export interface StorageAppliancePatchProperties { + serialNumber?: string; } // @public -export interface StorageAppliancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; - ifNoneMatch?: string; - resumeFrom?: string; - updateIntervalInMs?: number; +export interface StorageApplianceProperties { + administratorCredentials: AdministrativeCredentials; + readonly caCertificate?: CertificateInfo; + readonly capacity?: number; + readonly capacityUsed?: number; + readonly clusterId?: string; + readonly detailedStatus?: StorageApplianceDetailedStatus; + readonly detailedStatusMessage?: string; + readonly expansionShelves?: StorageApplianceExpansionShelf[]; + readonly managementIpv4Address?: string; + readonly manufacturer?: string; + readonly model?: string; + readonly monitoringConfigurationStatus?: StorageApplianceMonitoringConfigurationStatus; + readonly provisioningState?: StorageApplianceProvisioningState; + rackId: string; + rackSlot: number; + readonly remoteVendorManagementFeature?: RemoteVendorManagementFeature; + readonly remoteVendorManagementStatus?: RemoteVendorManagementStatus; + readonly secretRotationStatus?: SecretRotationStatus[]; + serialNumber: string; + storageApplianceSkuId: string; + readonly version?: string; } // @public -export type StorageAppliancesCreateOrUpdateResponse = StorageAppliance; +export type StorageApplianceProvisioningState = string; // @public -export interface StorageAppliancesDeleteHeaders { - location?: string; +export interface StorageApplianceRunReadCommandsParameters { + commands: StorageApplianceCommandSpecification[]; + limitTimeSeconds: number; } // @public -export interface StorageAppliancesDeleteOptionalParams extends coreClient.OperationOptions { +export interface StorageAppliancesCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type StorageAppliancesDeleteResponse = OperationStatusResult; - -// @public -export interface StorageAppliancesDisableRemoteVendorManagementHeaders { - location?: string; -} - -// @public -export interface StorageAppliancesDisableRemoteVendorManagementOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface StorageAppliancesDeleteOptionalParams extends OperationOptions { + ifMatch?: string; + ifNoneMatch?: string; updateIntervalInMs?: number; } // @public -export type StorageAppliancesDisableRemoteVendorManagementResponse = OperationStatusResult; - -// @public -export interface StorageAppliancesEnableRemoteVendorManagementHeaders { - location?: string; +export interface StorageAppliancesDisableRemoteVendorManagementOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface StorageAppliancesEnableRemoteVendorManagementOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface StorageAppliancesEnableRemoteVendorManagementOptionalParams extends OperationOptions { storageApplianceEnableRemoteVendorManagementParameters?: StorageApplianceEnableRemoteVendorManagementParameters; updateIntervalInMs?: number; } // @public -export type StorageAppliancesEnableRemoteVendorManagementResponse = OperationStatusResult; - -// @public -export interface StorageAppliancesGetOptionalParams extends coreClient.OperationOptions { +export interface StorageAppliancesGetOptionalParams extends OperationOptions { } // @public -export type StorageAppliancesGetResponse = StorageAppliance; +export interface StorageApplianceSkuProperties { + readonly capacityGB?: number; + readonly model?: string; +} // @public export interface StorageApplianceSkuSlot { @@ -4111,69 +4215,67 @@ export interface StorageApplianceSkuSlot { } // @public -export interface StorageAppliancesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type StorageAppliancesListByResourceGroupNextResponse = StorageApplianceList; - -// @public -export interface StorageAppliancesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface StorageAppliancesListByResourceGroupOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type StorageAppliancesListByResourceGroupResponse = StorageApplianceList; - -// @public -export interface StorageAppliancesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type StorageAppliancesListBySubscriptionNextResponse = StorageApplianceList; - -// @public -export interface StorageAppliancesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface StorageAppliancesListBySubscriptionOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type StorageAppliancesListBySubscriptionResponse = StorageApplianceList; - -// @public -export interface StorageAppliancesRunReadCommandsHeaders { - location?: string; -} - -// @public -export interface StorageAppliancesRunReadCommandsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface StorageAppliancesOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, storageApplianceName: string, storageApplianceParameters: StorageAppliance, options?: StorageAppliancesCreateOrUpdateOptionalParams) => Promise, StorageAppliance>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, storageApplianceName: string, storageApplianceParameters: StorageAppliance, options?: StorageAppliancesCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginDisableRemoteVendorManagement: (resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDisableRemoteVendorManagementAndWait: (resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams) => Promise; + // @deprecated (undocumented) + beginEnableRemoteVendorManagement: (resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginEnableRemoteVendorManagementAndWait: (resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams) => Promise; + // @deprecated (undocumented) + beginRunReadCommands: (resourceGroupName: string, storageApplianceName: string, storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, options?: StorageAppliancesRunReadCommandsOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginRunReadCommandsAndWait: (resourceGroupName: string, storageApplianceName: string, storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, options?: StorageAppliancesRunReadCommandsOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesUpdateOptionalParams) => Promise, StorageAppliance>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, storageApplianceName: string, storageApplianceParameters: StorageAppliance, options?: StorageAppliancesCreateOrUpdateOptionalParams) => PollerLike, StorageAppliance>; + delete: (resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesDeleteOptionalParams) => PollerLike, OperationStatusResult>; + disableRemoteVendorManagement: (resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams) => PollerLike, OperationStatusResult>; + enableRemoteVendorManagement: (resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: StorageAppliancesListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: StorageAppliancesListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + runReadCommands: (resourceGroupName: string, storageApplianceName: string, storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, options?: StorageAppliancesRunReadCommandsOptionalParams) => PollerLike, OperationStatusResult>; + update: (resourceGroupName: string, storageApplianceName: string, options?: StorageAppliancesUpdateOptionalParams) => PollerLike, StorageAppliance>; +} + +// @public +export interface StorageAppliancesRunReadCommandsOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type StorageAppliancesRunReadCommandsResponse = OperationStatusResult; - -// @public -export interface StorageAppliancesUpdateHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface StorageAppliancesUpdateOptionalParams extends coreClient.OperationOptions { +export interface StorageAppliancesUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; storageApplianceUpdateParameters?: StorageAppliancePatchParameters; updateIntervalInMs?: number; } -// @public -export type StorageAppliancesUpdateResponse = StorageAppliance; - // @public export interface StorageProfile { osDisk: OsDisk; @@ -4196,21 +4298,15 @@ export interface SystemData { lastModifiedByType?: CreatedByType; } -// @public -export interface TagsParameter { - tags?: { - [propertyName: string]: string; - }; -} - // @public export interface TrackedResource extends Resource { location: string; - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } +// @public +export type TransportProtocol = string; + // @public export interface TrunkedNetwork extends TrackedResource { readonly associatedResourceIds?: string[]; @@ -4237,115 +4333,84 @@ export interface TrunkedNetworkAttachmentConfiguration { // @public export type TrunkedNetworkDetailedStatus = string; -// @public -export interface TrunkedNetworkList { - nextLink?: string; - value?: TrunkedNetwork[]; -} - // @public export interface TrunkedNetworkPatchParameters { - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public -export type TrunkedNetworkProvisioningState = string; - -// @public -export interface TrunkedNetworks { - beginCreateOrUpdate(resourceGroupName: string, trunkedNetworkName: string, trunkedNetworkParameters: TrunkedNetwork, options?: TrunkedNetworksCreateOrUpdateOptionalParams): Promise, TrunkedNetworksCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, trunkedNetworkName: string, trunkedNetworkParameters: TrunkedNetwork, options?: TrunkedNetworksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, trunkedNetworkName: string, options?: TrunkedNetworksDeleteOptionalParams): Promise, TrunkedNetworksDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, trunkedNetworkName: string, options?: TrunkedNetworksDeleteOptionalParams): Promise; - get(resourceGroupName: string, trunkedNetworkName: string, options?: TrunkedNetworksGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: TrunkedNetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: TrunkedNetworksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, trunkedNetworkName: string, options?: TrunkedNetworksUpdateOptionalParams): Promise; +export interface TrunkedNetworkProperties { + readonly associatedResourceIds?: string[]; + readonly clusterId?: string; + readonly detailedStatus?: TrunkedNetworkDetailedStatus; + readonly detailedStatusMessage?: string; + readonly hybridAksClustersAssociatedIds?: string[]; + hybridAksPluginType?: HybridAksPluginType; + interfaceName?: string; + isolationDomainIds: string[]; + readonly provisioningState?: TrunkedNetworkProvisioningState; + readonly virtualMachinesAssociatedIds?: string[]; + vlans: number[]; } // @public -export interface TrunkedNetworksCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} +export type TrunkedNetworkProvisioningState = string; // @public -export interface TrunkedNetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface TrunkedNetworksCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type TrunkedNetworksCreateOrUpdateResponse = TrunkedNetwork; - -// @public -export interface TrunkedNetworksDeleteHeaders { - location?: string; -} - -// @public -export interface TrunkedNetworksDeleteOptionalParams extends coreClient.OperationOptions { +export interface TrunkedNetworksDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type TrunkedNetworksDeleteResponse = OperationStatusResult; - -// @public -export interface TrunkedNetworksGetOptionalParams extends coreClient.OperationOptions { +export interface TrunkedNetworksGetOptionalParams extends OperationOptions { } // @public -export type TrunkedNetworksGetResponse = TrunkedNetwork; - -// @public -export interface TrunkedNetworksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type TrunkedNetworksListByResourceGroupNextResponse = TrunkedNetworkList; - -// @public -export interface TrunkedNetworksListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface TrunkedNetworksListByResourceGroupOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type TrunkedNetworksListByResourceGroupResponse = TrunkedNetworkList; - -// @public -export interface TrunkedNetworksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type TrunkedNetworksListBySubscriptionNextResponse = TrunkedNetworkList; - -// @public -export interface TrunkedNetworksListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface TrunkedNetworksListBySubscriptionOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type TrunkedNetworksListBySubscriptionResponse = TrunkedNetworkList; +export interface TrunkedNetworksOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, trunkedNetworkName: string, trunkedNetworkParameters: TrunkedNetwork, options?: TrunkedNetworksCreateOrUpdateOptionalParams) => Promise, TrunkedNetwork>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, trunkedNetworkName: string, trunkedNetworkParameters: TrunkedNetwork, options?: TrunkedNetworksCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, trunkedNetworkName: string, options?: TrunkedNetworksDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, trunkedNetworkName: string, options?: TrunkedNetworksDeleteOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, trunkedNetworkName: string, trunkedNetworkParameters: TrunkedNetwork, options?: TrunkedNetworksCreateOrUpdateOptionalParams) => PollerLike, TrunkedNetwork>; + delete: (resourceGroupName: string, trunkedNetworkName: string, options?: TrunkedNetworksDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, trunkedNetworkName: string, options?: TrunkedNetworksGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: TrunkedNetworksListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: TrunkedNetworksListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, trunkedNetworkName: string, options?: TrunkedNetworksUpdateOptionalParams) => Promise; +} // @public -export interface TrunkedNetworksUpdateOptionalParams extends coreClient.OperationOptions { +export interface TrunkedNetworksUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; trunkedNetworkUpdateParameters?: TrunkedNetworkPatchParameters; } -// @public -export type TrunkedNetworksUpdateResponse = TrunkedNetwork; - // @public export interface UserAssignedIdentity { readonly clientId?: string; @@ -4421,17 +4486,14 @@ export type VirtualMachineIPAllocationMethod = string; export type VirtualMachineIsolateEmulatorThread = string; // @public -export interface VirtualMachineList { - nextLink?: string; - value?: VirtualMachine[]; +export interface VirtualMachinePatchParameters { + identity?: ManagedServiceIdentity; + tags?: Record; + vmImageRepositoryCredentials?: ImageRepositoryCredentials; } // @public -export interface VirtualMachinePatchParameters { - identity?: ManagedServiceIdentity; - tags?: { - [propertyName: string]: string; - }; +export interface VirtualMachinePatchProperties { vmImageRepositoryCredentials?: ImageRepositoryCredentials; } @@ -4458,201 +4520,161 @@ export interface VirtualMachinePowerOffParameters { export type VirtualMachinePowerState = string; // @public -export type VirtualMachineProvisioningState = string; +export interface VirtualMachineProperties { + adminUsername: string; + readonly availabilityZone?: string; + readonly bareMetalMachineId?: string; + bootMethod?: VirtualMachineBootMethod; + cloudServicesNetworkAttachment: NetworkAttachment; + readonly clusterId?: string; + consoleExtendedLocation?: ExtendedLocation; + cpuCores: number; + readonly detailedStatus?: VirtualMachineDetailedStatus; + readonly detailedStatusMessage?: string; + isolateEmulatorThread?: VirtualMachineIsolateEmulatorThread; + memorySizeGB: number; + networkAttachments?: NetworkAttachment[]; + networkData?: string; + networkDataContent?: string; + placementHints?: VirtualMachinePlacementHint[]; + readonly powerState?: VirtualMachinePowerState; + readonly provisioningState?: VirtualMachineProvisioningState; + sshPublicKeys?: SshPublicKey[]; + storageProfile: StorageProfile; + userData?: string; + userDataContent?: string; + virtioInterface?: VirtualMachineVirtioInterfaceType; + vmDeviceModel?: VirtualMachineDeviceModelType; + vmImage: string; + vmImageRepositoryCredentials?: ImageRepositoryCredentials; + readonly volumes?: string[]; +} // @public -export interface VirtualMachines { - beginAssignRelay(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesAssignRelayOptionalParams): Promise, VirtualMachinesAssignRelayResponse>>; - beginAssignRelayAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesAssignRelayOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, virtualMachineName: string, virtualMachineParameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams): Promise, VirtualMachinesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, virtualMachineName: string, virtualMachineParameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesDeleteOptionalParams): Promise, VirtualMachinesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesDeleteOptionalParams): Promise; - beginPowerOff(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesPowerOffOptionalParams): Promise, VirtualMachinesPowerOffResponse>>; - beginPowerOffAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesPowerOffOptionalParams): Promise; - beginReimage(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesReimageOptionalParams): Promise, VirtualMachinesReimageResponse>>; - beginReimageAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesReimageOptionalParams): Promise; - beginRestart(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesRestartOptionalParams): Promise, VirtualMachinesRestartResponse>>; - beginRestartAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesRestartOptionalParams): Promise; - beginStart(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStartOptionalParams): Promise, VirtualMachinesStartResponse>>; - beginStartAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStartOptionalParams): Promise; - beginUpdate(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesUpdateOptionalParams): Promise, VirtualMachinesUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesUpdateOptionalParams): Promise; - get(resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: VirtualMachinesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: VirtualMachinesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface VirtualMachinesAssignRelayHeaders { - location?: string; -} +export type VirtualMachineProvisioningState = string; // @public -export interface VirtualMachinesAssignRelayOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface VirtualMachinesAssignRelayOptionalParams extends OperationOptions { updateIntervalInMs?: number; virtualMachineAssignRelayParameters?: VirtualMachineAssignRelayParameters; } -// @public -export type VirtualMachinesAssignRelayResponse = OperationStatusResult; - // @public export type VirtualMachineSchedulingExecution = string; // @public -export interface VirtualMachinesCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} - -// @public -export interface VirtualMachinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachinesCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type VirtualMachinesCreateOrUpdateResponse = VirtualMachine; - -// @public -export interface VirtualMachinesDeleteHeaders { - location?: string; -} - -// @public -export interface VirtualMachinesDeleteOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachinesDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type VirtualMachinesDeleteResponse = OperationStatusResult; - -// @public -export interface VirtualMachinesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualMachinesGetResponse = VirtualMachine; - -// @public -export interface VirtualMachinesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachinesGetOptionalParams extends OperationOptions { } // @public -export type VirtualMachinesListByResourceGroupNextResponse = VirtualMachineList; - -// @public -export interface VirtualMachinesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachinesListByResourceGroupOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type VirtualMachinesListByResourceGroupResponse = VirtualMachineList; - -// @public -export interface VirtualMachinesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VirtualMachinesListBySubscriptionNextResponse = VirtualMachineList; - -// @public -export interface VirtualMachinesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachinesListBySubscriptionOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type VirtualMachinesListBySubscriptionResponse = VirtualMachineList; - -// @public -export interface VirtualMachinesPowerOffHeaders { - location?: string; -} - -// @public -export interface VirtualMachinesPowerOffOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface VirtualMachinesOperations { + assignRelay: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesAssignRelayOptionalParams) => PollerLike, OperationStatusResult>; + // @deprecated (undocumented) + beginAssignRelay: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesAssignRelayOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginAssignRelayAndWait: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesAssignRelayOptionalParams) => Promise; + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, virtualMachineName: string, virtualMachineParameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams) => Promise, VirtualMachine>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, virtualMachineName: string, virtualMachineParameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginPowerOff: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesPowerOffOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginPowerOffAndWait: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesPowerOffOptionalParams) => Promise; + // @deprecated (undocumented) + beginReimage: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesReimageOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginReimageAndWait: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesReimageOptionalParams) => Promise; + // @deprecated (undocumented) + beginRestart: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesRestartOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginRestartAndWait: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesRestartOptionalParams) => Promise; + // @deprecated (undocumented) + beginStart: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStartOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginStartAndWait: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStartOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesUpdateOptionalParams) => Promise, VirtualMachine>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, virtualMachineName: string, virtualMachineParameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams) => PollerLike, VirtualMachine>; + delete: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: VirtualMachinesListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: VirtualMachinesListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + powerOff: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesPowerOffOptionalParams) => PollerLike, OperationStatusResult>; + reimage: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesReimageOptionalParams) => PollerLike, OperationStatusResult>; + restart: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesRestartOptionalParams) => PollerLike, OperationStatusResult>; + start: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesStartOptionalParams) => PollerLike, OperationStatusResult>; + update: (resourceGroupName: string, virtualMachineName: string, options?: VirtualMachinesUpdateOptionalParams) => PollerLike, VirtualMachine>; +} + +// @public +export interface VirtualMachinesPowerOffOptionalParams extends OperationOptions { updateIntervalInMs?: number; virtualMachinePowerOffParameters?: VirtualMachinePowerOffParameters; } // @public -export type VirtualMachinesPowerOffResponse = OperationStatusResult; - -// @public -export interface VirtualMachinesReimageHeaders { - location?: string; -} - -// @public -export interface VirtualMachinesReimageOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface VirtualMachinesReimageOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type VirtualMachinesReimageResponse = OperationStatusResult; - -// @public -export interface VirtualMachinesRestartHeaders { - location?: string; -} - -// @public -export interface VirtualMachinesRestartOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface VirtualMachinesRestartOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type VirtualMachinesRestartResponse = OperationStatusResult; - -// @public -export interface VirtualMachinesStartHeaders { - location?: string; -} - -// @public -export interface VirtualMachinesStartOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface VirtualMachinesStartOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type VirtualMachinesStartResponse = OperationStatusResult; - -// @public -export interface VirtualMachinesUpdateHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface VirtualMachinesUpdateOptionalParams extends coreClient.OperationOptions { +export interface VirtualMachinesUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; virtualMachineUpdateParameters?: VirtualMachinePatchParameters; } -// @public -export type VirtualMachinesUpdateResponse = VirtualMachine; - // @public export type VirtualMachineVirtioInterfaceType = string; // @public export interface Volume extends TrackedResource { readonly allocatedSizeMiB?: number; + readonly assignedStorageApplianceId?: string; readonly attachedTo?: string[]; readonly detailedStatus?: VolumeDetailedStatus; readonly detailedStatusMessage?: string; @@ -4667,115 +4689,82 @@ export interface Volume extends TrackedResource { // @public export type VolumeDetailedStatus = string; -// @public -export interface VolumeList { - nextLink?: string; - value?: Volume[]; -} - // @public export interface VolumePatchParameters { - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public -export type VolumeProvisioningState = string; - -// @public -export interface Volumes { - beginCreateOrUpdate(resourceGroupName: string, volumeName: string, volumeParameters: Volume, options?: VolumesCreateOrUpdateOptionalParams): Promise, VolumesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, volumeName: string, volumeParameters: Volume, options?: VolumesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, volumeName: string, options?: VolumesDeleteOptionalParams): Promise, VolumesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, volumeName: string, options?: VolumesDeleteOptionalParams): Promise; - get(resourceGroupName: string, volumeName: string, options?: VolumesGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: VolumesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: VolumesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, volumeName: string, options?: VolumesUpdateOptionalParams): Promise; +export interface VolumeProperties { + readonly allocatedSizeMiB?: number; + readonly assignedStorageApplianceId?: string; + readonly attachedTo?: string[]; + readonly detailedStatus?: VolumeDetailedStatus; + readonly detailedStatusMessage?: string; + readonly provisioningState?: VolumeProvisioningState; + readonly serialNumber?: string; + sizeMiB: number; + storageApplianceId?: string; } // @public -export interface VolumesCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} +export type VolumeProvisioningState = string; // @public -export interface VolumesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface VolumesCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type VolumesCreateOrUpdateResponse = Volume; - -// @public -export interface VolumesDeleteHeaders { - location?: string; -} - -// @public -export interface VolumesDeleteOptionalParams extends coreClient.OperationOptions { +export interface VolumesDeleteOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type VolumesDeleteResponse = OperationStatusResult; - -// @public -export interface VolumesGetOptionalParams extends coreClient.OperationOptions { +export interface VolumesGetOptionalParams extends OperationOptions { } // @public -export type VolumesGetResponse = Volume; - -// @public -export interface VolumesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VolumesListByResourceGroupNextResponse = VolumeList; - -// @public -export interface VolumesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface VolumesListByResourceGroupOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type VolumesListByResourceGroupResponse = VolumeList; - -// @public -export interface VolumesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VolumesListBySubscriptionNextResponse = VolumeList; - -// @public -export interface VolumesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface VolumesListBySubscriptionOptionalParams extends OperationOptions { skipToken?: string; top?: number; } // @public -export type VolumesListBySubscriptionResponse = VolumeList; +export interface VolumesOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, volumeName: string, volumeParameters: Volume, options?: VolumesCreateOrUpdateOptionalParams) => Promise, Volume>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, volumeName: string, volumeParameters: Volume, options?: VolumesCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, volumeName: string, options?: VolumesDeleteOptionalParams) => Promise, OperationStatusResult>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, volumeName: string, options?: VolumesDeleteOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, volumeName: string, volumeParameters: Volume, options?: VolumesCreateOrUpdateOptionalParams) => PollerLike, Volume>; + delete: (resourceGroupName: string, volumeName: string, options?: VolumesDeleteOptionalParams) => PollerLike, OperationStatusResult>; + get: (resourceGroupName: string, volumeName: string, options?: VolumesGetOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: VolumesListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: VolumesListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, volumeName: string, options?: VolumesUpdateOptionalParams) => Promise; +} // @public -export interface VolumesUpdateOptionalParams extends coreClient.OperationOptions { +export interface VolumesUpdateOptionalParams extends OperationOptions { ifMatch?: string; ifNoneMatch?: string; volumeUpdateParameters?: VolumePatchParameters; } -// @public -export type VolumesUpdateResponse = Volume; - // @public export interface VulnerabilityScanningSettings { containerScan?: VulnerabilityScanningSettingsContainerScan; diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..9ddbfb295035 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesCreateOrUpdateSample.ts @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a new access bridge or update the properties of the existing access bridge. + * + * @summary create a new access bridge or update the properties of the existing access bridge. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_CreateOrUpdate.json + */ +async function createOrUpdateAccessBridge(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.accessBridges.createOrUpdate("resourceGroupName", "Bastion", { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + ipv4ConnectedPrefix: "198.51.100.0/24", + ipv6ConnectedPrefix: "2001:db8::/64", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName/internalNetworks/internalNetworkName", + securityRules: [ + { + description: "Allow management plane egress", + direction: "Outbound", + ipv4Addresses: ["10.10.20.10-10.10.20.20"], + ipv6Addresses: ["2001:db8:abcd:12::1000-2001:db8:abcd:12::1fff"], + port: "24562-24570", + }, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateAccessBridge(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesDeleteSample.ts new file mode 100644 index 000000000000..8b74bad57d3e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesDeleteSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the specified access bridge. + * + * @summary delete the specified access bridge. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Delete.json + */ +async function deleteAccessBridge(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.accessBridges.delete("resourceGroupName", "Bastion"); + console.log(result); +} + +async function main(): Promise { + await deleteAccessBridge(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesGetSample.ts new file mode 100644 index 000000000000..67d5fb4e1d48 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the properties of the provided access bridge. + * + * @summary get the properties of the provided access bridge. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Get.json + */ +async function getAccessBridge(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.accessBridges.get("resourceGroupName", "Bastion"); + console.log(result); +} + +async function main(): Promise { + await getAccessBridge(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesListByResourceGroupSample.ts new file mode 100644 index 000000000000..bd625c046ee1 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesListByResourceGroupSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a list of access bridges in the provided resource group. + * + * @summary get a list of access bridges in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_ListByResourceGroup.json + */ +async function listAccessBridgesForResourceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.accessBridges.listByResourceGroup("resourceGroupName")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listAccessBridgesForResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesListBySubscriptionSample.ts new file mode 100644 index 000000000000..8e927aa5dab7 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesListBySubscriptionSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a list of access bridges in the provided subscription. + * + * @summary get a list of access bridges in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_ListBySubscription.json + */ +async function listAccessBridgesForSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.accessBridges.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listAccessBridgesForSubscription(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesUpdateSample.ts new file mode 100644 index 000000000000..dd15b2066a08 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/accessBridgesUpdateSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update properties of the provided access bridge, or update tags associated with the access bridge. Properties and tag updates can be done independently. + * + * @summary update properties of the provided access bridge, or update tags associated with the access bridge. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Patch.json + */ +async function patchAccessBridge(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.accessBridges.update("resourceGroupName", "Bastion", { + accessBridgeUpdateParameters: { + properties: { + securityRules: [ + { + description: "Allow management plane egress", + direction: "Outbound", + ipv4Addresses: ["10.10.20.10-10.10.20.20"], + ipv6Addresses: ["2001:db8:abcd:12::1000-2001:db8:abcd:12::1fff"], + port: "24562-24570", + }, + ], + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +async function main(): Promise { + await patchAccessBridge(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsCreateOrUpdateSample.ts index 2b2fcabe4a01..8cbe340dd5f5 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsCreateOrUpdateSample.ts @@ -1,81 +1,72 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { AgentPool} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new Kubernetes cluster agent pool or update the properties of the existing one. + * This sample demonstrates how to create a new Kubernetes cluster agent pool or update the properties of the existing one. * - * @summary Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Create.json + * @summary create a new Kubernetes cluster agent pool or update the properties of the existing one. + * x-ms-original-file: 2026-05-01-preview/AgentPools_Create.json */ async function createOrUpdateKubernetesClusterAgentPool(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const agentPoolParameters: AgentPool = { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - labels: [{ key: "kubernetes.label", value: "true" }], - location: "location", - mode: "System", - tags: { key1: "myvalue1", key2: "myvalue2" }, - taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_P46_224_v1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - agentPoolParameters, + const result = await client.agentPools.createOrUpdate( + "resourceGroupName", + "kubernetesClusterName", + "agentPoolName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, + attachedNetworkConfiguration: { + l2Networks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", + pluginType: "DPDK", + }, + ], + l3Networks: [ + { + ipamEnabled: "False", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + pluginType: "SRIOV", + }, + ], + trunkedNetworks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", + pluginType: "MACVLAN", + }, + ], + }, + availabilityZones: ["1", "2", "3"], + count: 3, + labels: [{ key: "kubernetes.label", value: "true" }], + mode: "System", + taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], + upgradeSettings: { maxSurge: "1" }, + vmSkuName: "NC_P46_224_v1", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsDeleteSample.ts index f5911171917b..edc28afd3745 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsDeleteSample.ts @@ -3,28 +3,21 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided Kubernetes cluster agent pool. + * This sample demonstrates how to delete the provided Kubernetes cluster agent pool. * - * @summary Delete the provided Kubernetes cluster agent pool. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Delete.json + * @summary delete the provided Kubernetes cluster agent pool. + * x-ms-original-file: 2026-05-01-preview/AgentPools_Delete.json */ async function deleteKubernetesClusterAgentPool(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, + const result = await client.agentPools.delete( + "resourceGroupName", + "kubernetesClusterName", + "agentPoolName", ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsGetSample.ts index f91e07275a51..ad6f80957e34 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsGetSample.ts @@ -3,28 +3,21 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get properties of the provided Kubernetes cluster agent pool. + * This sample demonstrates how to get properties of the provided Kubernetes cluster agent pool. * - * @summary Get properties of the provided Kubernetes cluster agent pool. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Get.json + * @summary get properties of the provided Kubernetes cluster agent pool. + * x-ms-original-file: 2026-05-01-preview/AgentPools_Get.json */ async function getKubernetesClusterAgentPool(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const result = await client.agentPools.get( - resourceGroupName, - kubernetesClusterName, - agentPoolName, + "resourceGroupName", + "kubernetesClusterName", + "agentPoolName", ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsListByKubernetesClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsListByKubernetesClusterSample.ts index a245e9204481..6ce7cc87ec6d 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsListByKubernetesClusterSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsListByKubernetesClusterSample.ts @@ -3,30 +3,25 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of agent pools for the provided Kubernetes cluster. + * This sample demonstrates how to get a list of agent pools for the provided Kubernetes cluster. * - * @summary Get a list of agent pools for the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_ListByKubernetesCluster.json + * @summary get a list of agent pools for the provided Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/AgentPools_ListByKubernetesCluster.json */ async function listAgentPoolsOfTheKubernetesCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.agentPools.listByKubernetesCluster( - resourceGroupName, - kubernetesClusterName, + "resourceGroupName", + "kubernetesClusterName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsUpdateSample.ts index 57e4d72b2f43..a7ce37d2e10c 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsUpdateSample.ts @@ -1,50 +1,38 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - AgentPoolPatchParameters, - AgentPoolsUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to 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. + * This sample demonstrates how to 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. * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Patch.json + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/AgentPools_Patch.json */ async function patchKubernetesClusterAgentPool(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const agentPoolUpdateParameters: AgentPoolPatchParameters = { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - count: 3, - tags: { key1: "myvalue1", key2: "myvalue2" }, - upgradeSettings: { drainTimeout: 1800, maxSurge: "1", maxUnavailable: "0" }, - }; - const options: AgentPoolsUpdateOptionalParams = { agentPoolUpdateParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - options, + const result = await client.agentPools.update( + "resourceGroupName", + "kubernetesClusterName", + "agentPoolName", + { + agentPoolUpdateParameters: { + administratorConfiguration: { + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + count: 3, + upgradeSettings: { drainTimeout: 1800, maxSurge: "1", maxUnavailable: "0" }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsCreateOrUpdateSample.ts index 1cbd779a3b34..4b006818a149 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsCreateOrUpdateSample.ts @@ -1,70 +1,58 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { BareMetalMachineKeySet} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new bare metal machine key set or update the existing one for the provided cluster. + * This sample demonstrates how to create a new bare metal machine key set or update the existing one for the provided cluster. * - * @summary Create a new bare metal machine key set or update the existing one for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Create.json + * @summary create a new bare metal machine key set or update the existing one for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Create.json */ async function createOrUpdateBareMetalMachineKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const bareMetalMachineKeySetParameters: BareMetalMachineKeySet = { - azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", - expiration: new Date("2022-12-31T23:59:59.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], - location: "location", - osGroupName: "standardAccessGroup", - privilegeLevel: "Other", - privilegeLevelName: "SecurityScanner", - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.bareMetalMachineKeySets.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - bareMetalMachineKeySetParameters, - ); + const result = await client.bareMetalMachineKeySets.createOrUpdate( + "resourceGroupName", + "clusterName", + "bareMetalMachineKeySetName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", + expiration: new Date("2022-12-31T23:59:59.008Z"), + jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], + osGroupName: "standardAccessGroup", + privilegeLevel: "Other", + privilegeLevelName: "SecurityScanner", + userList: [ + { + azureUserName: "userABC", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + { + azureUserName: "userXYZ", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsDeleteSample.ts index 1a9193d9016b..2032c6cfae57 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsDeleteSample.ts @@ -3,28 +3,21 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the bare metal machine key set of the provided cluster. + * This sample demonstrates how to delete the bare metal machine key set of the provided cluster. * - * @summary Delete the bare metal machine key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Delete.json + * @summary delete the bare metal machine key set of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Delete.json */ async function deleteBareMetalMachineKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.beginDeleteAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, + const result = await client.bareMetalMachineKeySets.delete( + "resourceGroupName", + "clusterName", + "bareMetalMachineKeySetName", ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsGetSample.ts index 53a634fdb13c..31e0f70ded05 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsGetSample.ts @@ -3,28 +3,21 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get bare metal machine key set of the provided cluster. + * This sample demonstrates how to get bare metal machine key set of the provided cluster. * - * @summary Get bare metal machine key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Get.json + * @summary get bare metal machine key set of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Get.json */ async function getBareMetalMachineKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const result = await client.bareMetalMachineKeySets.get( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, + "resourceGroupName", + "clusterName", + "bareMetalMachineKeySetName", ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsListByClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsListByClusterSample.ts index 5fd2e89c155f..3790457bce5e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsListByClusterSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsListByClusterSample.ts @@ -3,30 +3,25 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of bare metal machine key sets for the provided cluster. + * This sample demonstrates how to get a list of bare metal machine key sets for the provided cluster. * - * @summary Get a list of bare metal machine key sets for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_ListByCluster.json + * @summary get a list of bare metal machine key sets for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_ListByCluster.json */ async function listBareMetalMachineKeySetsOfTheCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.bareMetalMachineKeySets.listByCluster( - resourceGroupName, - clusterName, + "resourceGroupName", + "clusterName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsUpdateSample.ts index 6193871d75d3..210a5721f426 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsUpdateSample.ts @@ -1,67 +1,50 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BareMetalMachineKeySetPatchParameters, - BareMetalMachineKeySetsUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to 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. + * This sample demonstrates how to 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. * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Patch.json + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Patch.json */ async function patchBareMetalMachineKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const bareMetalMachineKeySetUpdateParameters: BareMetalMachineKeySetPatchParameters = + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachineKeySets.update( + "resourceGroupName", + "clusterName", + "bareMetalMachineKeySetName", { - expiration: new Date("2022-12-31T23:59:59.008Z"), - jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + bareMetalMachineKeySetUpdateParameters: { + expiration: new Date("2022-12-31T23:59:59.008Z"), + jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], + userList: [ + { + azureUserName: "userABC", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + { + azureUserName: "userXYZ", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const options: BareMetalMachineKeySetsUpdateOptionalParams = { - bareMetalMachineKeySetUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.beginUpdateAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - options, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesCordonSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesCordonSample.ts index fbf3ec30fdd2..9af97a71566a 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesCordonSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesCordonSample.ts @@ -1,40 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BareMetalMachineCordonParameters, - BareMetalMachinesCordonOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Cordon the provided bare metal machine's Kubernetes node. + * This sample demonstrates how to cordon the provided bare metal machine's Kubernetes node. * - * @summary Cordon the provided bare metal machine's Kubernetes node. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Cordon.json + * @summary cordon the provided bare metal machine's Kubernetes node. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Cordon.json */ async function cordonBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineCordonParameters: BareMetalMachineCordonParameters = { - evacuate: "True", - }; - const options: BareMetalMachinesCordonOptionalParams = { - bareMetalMachineCordonParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginCordonAndWait( - resourceGroupName, - bareMetalMachineName, - options, + const result = await client.bareMetalMachines.cordon( + "resourceGroupName", + "bareMetalMachineName", + { bareMetalMachineCordonParameters: { evacuate: "True" } }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesCreateOrUpdateSample.ts index 9a33a4fa70c7..6be49bfb3beb 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesCreateOrUpdateSample.ts @@ -1,49 +1,41 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { BareMetalMachine} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * This sample demonstrates how to create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. * - * @summary Create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Create.json + * @summary create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Create.json */ async function createOrUpdateBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineParameters: BareMetalMachine = { - bmcConnectionString: "bmcconnectionstring", - bmcCredentials: { password: "{password}", username: "bmcuser" }, - bmcMacAddress: "00:00:4f:00:57:00", - bootMacAddress: "00:00:4e:00:58:af", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - machineDetails: "User-provided machine details.", - machineName: "r01c001", - machineSkuId: "684E-3B16-399E", - rackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - rackSlot: 1, - serialNumber: "BM1219XXX", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginCreateOrUpdateAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineParameters, + const result = await client.bareMetalMachines.createOrUpdate( + "resourceGroupName", + "bareMetalMachineName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + bmcConnectionString: "redfish+https://10.10.10.16/redfish/v1/Systems/System.Embedded.1", + bmcCredentials: { password: "{password}", username: "bmcuser" }, + bmcMacAddress: "00:00:4f:00:57:00", + bootMacAddress: "00:00:4e:00:58:af", + machineDetails: "User-provided machine details.", + machineName: "r01c001", + machineSkuId: "684E-3B16-399E", + rackId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", + rackSlot: 1, + serialNumber: "BM1219XXX", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesDeleteSample.ts index 9d293ccf317c..5c47fbe6fa90 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * This sample demonstrates how to delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. * - * @summary Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Delete.json + * @summary delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Delete.json */ async function deleteBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginDeleteAndWait( - resourceGroupName, - bareMetalMachineName, - ); + const result = await client.bareMetalMachines.delete("resourceGroupName", "bareMetalMachineName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesGetSample.ts index ea02f292f72b..f04c36e79813 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesGetSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get properties of the provided bare metal machine. + * This sample demonstrates how to get properties of the provided bare metal machine. * - * @summary Get properties of the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Get.json + * @summary get properties of the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Get.json */ async function getBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.get( - resourceGroupName, - bareMetalMachineName, - ); + const result = await client.bareMetalMachines.get("resourceGroupName", "bareMetalMachineName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesListByResourceGroupSample.ts index e441cdfec343..743f26701d94 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of bare metal machines in the provided resource group. + * This sample demonstrates how to get a list of bare metal machines in the provided resource group. * - * @summary Get a list of bare metal machines in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_ListByResourceGroup.json + * @summary get a list of bare metal machines in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_ListByResourceGroup.json */ async function listBareMetalMachinesForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.bareMetalMachines.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.bareMetalMachines.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesListBySubscriptionSample.ts index fd29cd9fcb12..d10ef3eda883 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of bare metal machines in the provided subscription. + * This sample demonstrates how to get a list of bare metal machines in the provided subscription. * - * @summary Get a list of bare metal machines in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_ListBySubscription.json + * @summary get a list of bare metal machines in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_ListBySubscription.json */ async function listBareMetalMachinesForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.bareMetalMachines.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesPowerOffSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesPowerOffSample.ts index 766fdc95911e..9346a3e923c3 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesPowerOffSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesPowerOffSample.ts @@ -1,39 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BareMetalMachinePowerOffParameters, - BareMetalMachinesPowerOffOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Power off the provided bare metal machine. + * This sample demonstrates how to power off the provided bare metal machine. * - * @summary Power off the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_PowerOff.json + * @summary power off the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_PowerOff.json */ async function powerOffBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachinePowerOffParameters: BareMetalMachinePowerOffParameters = - { skipShutdown: "True" }; - const options: BareMetalMachinesPowerOffOptionalParams = { - bareMetalMachinePowerOffParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginPowerOffAndWait( - resourceGroupName, - bareMetalMachineName, - options, + const result = await client.bareMetalMachines.powerOff( + "resourceGroupName", + "bareMetalMachineName", + { bareMetalMachinePowerOffParameters: { skipShutdown: "True" } }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesReimageSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesReimageSample.ts index 1e9e093b32f0..c0c5e2954f38 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesReimageSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesReimageSample.ts @@ -3,26 +3,21 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Reimage the provided bare metal machine. + * This sample demonstrates how to reimage the provided bare metal machine. * - * @summary Reimage the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Reimage.json + * @summary reimage the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Reimage.json */ async function reimageBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginReimageAndWait( - resourceGroupName, - bareMetalMachineName, + const result = await client.bareMetalMachines.reimage( + "resourceGroupName", + "bareMetalMachineName", + { body: { safeguardMode: "All" } }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesReplaceSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesReplaceSample.ts index 2917cafcf204..f280f389103d 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesReplaceSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesReplaceSample.ts @@ -1,49 +1,36 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BareMetalMachineReplaceParameters, - BareMetalMachinesReplaceOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Replace the provided bare metal machine. + * This sample demonstrates how to replace the provided bare metal machine. * - * @summary Replace the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Replace.json + * @summary replace the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Replace.json */ async function replaceBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineReplaceParameters: BareMetalMachineReplaceParameters = { - bmcCredentials: { - password: "https://keyvaultname.vault.azure.net/secrets/secretName", - username: "bmcuser", - }, - bmcMacAddress: "00:00:4f:00:57:ad", - bootMacAddress: "00:00:4e:00:58:af", - machineName: "name", - safeguardMode: "All", - serialNumber: "BM1219XXX", - storagePolicy: "DiscardAll", - }; - const options: BareMetalMachinesReplaceOptionalParams = { - bareMetalMachineReplaceParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginReplaceAndWait( - resourceGroupName, - bareMetalMachineName, - options, + const result = await client.bareMetalMachines.replace( + "resourceGroupName", + "bareMetalMachineName", + { + bareMetalMachineReplaceParameters: { + bmcCredentials: { + password: "https://keyvaultname.vault.azure.net/secrets/secretName", + username: "bmcuser", + }, + bmcMacAddress: "00:00:4f:00:57:ad", + bootMacAddress: "00:00:4e:00:58:af", + machineName: "name", + safeguardMode: "All", + serialNumber: "BM1219XXX", + storagePolicy: "DiscardAll", + }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRestartSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRestartSample.ts index d1c337415e55..9da87964693e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRestartSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRestartSample.ts @@ -3,26 +3,20 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Restart the provided bare metal machine. + * This sample demonstrates how to restart the provided bare metal machine. * - * @summary Restart the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Restart.json + * @summary restart the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Restart.json */ async function restartBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRestartAndWait( - resourceGroupName, - bareMetalMachineName, + const result = await client.bareMetalMachines.restart( + "resourceGroupName", + "bareMetalMachineName", ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunCommandSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunCommandSample.ts index c4fb79a0e4b6..378992ecd53d 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunCommandSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunCommandSample.ts @@ -1,39 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BareMetalMachineRunCommandParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * This sample demonstrates how to run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. * - * @summary Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunCommand.json + * @summary run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunCommand.json */ async function runCommandOnBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters = - { - arguments: ["--argument1", "argument2"], - limitTimeSeconds: 60, - script: "cHdkCg==", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunCommandAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunCommandParameters, + const result = await client.bareMetalMachines.runCommand( + "resourceGroupName", + "bareMetalMachineName", + { arguments: ["--argument1", "argument2"], limitTimeSeconds: 60, script: "cHdkCg==" }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunDataExtractsRestrictedSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunDataExtractsRestrictedSample.ts index 7f4eec2bb43b..1a0ac364488f 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunDataExtractsRestrictedSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunDataExtractsRestrictedSample.ts @@ -1,42 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BareMetalMachineRunDataExtractsParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * This sample demonstrates how to run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. * - * @summary Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunDataExtractsRestricted.json + * @summary run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunDataExtractsRestricted.json */ async function runRestrictedDataExtractionOnBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters = - { - limitTimeSeconds: 60, - commands: [ - { arguments: ["--min-severity=8"], command: "cluster-cve-report" }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.bareMetalMachines.beginRunDataExtractsRestrictedAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunDataExtractsRestrictedParameters, - ); + const result = await client.bareMetalMachines.runDataExtractsRestricted( + "resourceGroupName", + "bareMetalMachineName", + { + commands: [{ arguments: ["--min-severity=8"], command: "cluster-cve-report" }], + limitTimeSeconds: 60, + }, + ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunDataExtractsSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunDataExtractsSample.ts index 0e37d68e8ae6..41369e4ada52 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunDataExtractsSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunDataExtractsSample.ts @@ -1,43 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BareMetalMachineRunDataExtractsParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * This sample demonstrates how to run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. * - * @summary Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunDataExtracts.json + * @summary run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunDataExtracts.json */ async function runDataExtractionOnBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters = - { - limitTimeSeconds: 60, - commands: [ - { - arguments: ["SysInfo", "TTYLog"], - command: "hardware-support-data-collection", - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunDataExtractsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunDataExtractsParameters, + const result = await client.bareMetalMachines.runDataExtracts( + "resourceGroupName", + "bareMetalMachineName", + { + commands: [{ arguments: ["SysInfo", "TTYLog"], command: "hardware-support-data-collection" }], + limitTimeSeconds: 60, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunReadCommandsSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunReadCommandsSample.ts index 3fb877af6252..ea2d23d92c72 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunReadCommandsSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunReadCommandsSample.ts @@ -1,66 +1,47 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BareMetalMachineRunReadCommandsParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * This sample demonstrates how to run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. * - * @summary Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunReadCommands_Hostname.json + * @summary run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunReadCommands_Hostname.json */ async function runAndRetrieveOutputFromASingleReadOnlyCommandOnBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters = - { limitTimeSeconds: 60, commands: [{ command: "hostname" }] }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunReadCommandsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunReadCommandsParameters, + const result = await client.bareMetalMachines.runReadCommands( + "resourceGroupName", + "bareMetalMachineName", + { commands: [{ command: "hostname" }], limitTimeSeconds: 60 }, ); console.log(result); } /** - * This sample demonstrates how to Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * This sample demonstrates how to run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. * - * @summary Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunReadCommands_Multiple.json + * @summary run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunReadCommands_Multiple.json */ async function runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters = + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.runReadCommands( + "resourceGroupName", + "bareMetalMachineName", { - limitTimeSeconds: 60, commands: [ { arguments: ["pods", "-A"], command: "kubectl get" }, { arguments: ["192.168.0.99", "-c", "3"], command: "ping" }, ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunReadCommandsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunReadCommandsParameters, + limitTimeSeconds: 60, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesStartSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesStartSample.ts index a39a4fabfc57..003f47b5b594 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesStartSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesStartSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Start the provided bare metal machine. + * This sample demonstrates how to start the provided bare metal machine. * - * @summary Start the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Start.json + * @summary start the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Start.json */ async function startBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginStartAndWait( - resourceGroupName, - bareMetalMachineName, - ); + const result = await client.bareMetalMachines.start("resourceGroupName", "bareMetalMachineName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesUncordonSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesUncordonSample.ts index 0895e8210a32..76babf603f67 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesUncordonSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesUncordonSample.ts @@ -3,26 +3,20 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Uncordon the provided bare metal machine's Kubernetes node. + * This sample demonstrates how to uncordon the provided bare metal machine's Kubernetes node. * - * @summary Uncordon the provided bare metal machine's Kubernetes node. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Uncordon.json + * @summary uncordon the provided bare metal machine's Kubernetes node. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Uncordon.json */ async function uncordonBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginUncordonAndWait( - resourceGroupName, - bareMetalMachineName, + const result = await client.bareMetalMachines.uncordon( + "resourceGroupName", + "bareMetalMachineName", ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesUpdateSample.ts index 963e5afd9eba..e5e128d75d25 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesUpdateSample.ts @@ -1,41 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BareMetalMachinePatchParameters, - BareMetalMachinesUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. + * This sample demonstrates how to patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. * - * @summary Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Patch.json + * @summary patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Patch.json */ async function patchBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineUpdateParameters: BareMetalMachinePatchParameters = { - machineDetails: "machinedetails", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: BareMetalMachinesUpdateOptionalParams = { - bareMetalMachineUpdateParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginUpdateAndWait( - resourceGroupName, - bareMetalMachineName, - options, + const result = await client.bareMetalMachines.update( + "resourceGroupName", + "bareMetalMachineName", + { + bareMetalMachineUpdateParameters: { + machineDetails: "machinedetails", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsCreateOrUpdateSample.ts index 797056a042e0..5b4ffb3dd40d 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsCreateOrUpdateSample.ts @@ -1,65 +1,54 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { BmcKeySet} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new baseboard management controller key set or update the existing one for the provided cluster. + * This sample demonstrates how to create a new baseboard management controller key set or update the existing one for the provided cluster. * - * @summary Create a new baseboard management controller key set or update the existing one for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Create.json + * @summary create a new baseboard management controller key set or update the existing one for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Create.json */ async function createOrUpdateBaseboardManagementControllerKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const bmcKeySetParameters: BmcKeySet = { - azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", - expiration: new Date("2022-12-31T23:59:59.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - privilegeLevel: "Administrator", - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - bmcKeySetParameters, + const result = await client.bmcKeySets.createOrUpdate( + "resourceGroupName", + "clusterName", + "bmcKeySetName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", + expiration: new Date("2022-12-31T23:59:59.008Z"), + privilegeLevel: "Administrator", + userList: [ + { + azureUserName: "userABC", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + { + azureUserName: "userXYZ", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsDeleteSample.ts index 7dc1508b4f11..7047485bafb3 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsDeleteSample.ts @@ -3,28 +3,21 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the baseboard management controller key set of the provided cluster. + * This sample demonstrates how to delete the baseboard management controller key set of the provided cluster. * - * @summary Delete the baseboard management controller key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Delete.json + * @summary delete the baseboard management controller key set of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Delete.json */ async function deleteBaseboardManagementControllerKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginDeleteAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, + const result = await client.bmcKeySets.delete( + "resourceGroupName", + "clusterName", + "bmcKeySetName", ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsGetSample.ts index c4df5af1b4cd..9d842de00761 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsGetSample.ts @@ -3,29 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get baseboard management controller key set of the provided cluster. + * This sample demonstrates how to get baseboard management controller key set of the provided cluster. * - * @summary Get baseboard management controller key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Get.json + * @summary get baseboard management controller key set of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Get.json */ async function getBaseboardManagementControllerKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.get( - resourceGroupName, - clusterName, - bmcKeySetName, - ); + const result = await client.bmcKeySets.get("resourceGroupName", "clusterName", "bmcKeySetName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsListByClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsListByClusterSample.ts index 05dfa8b783dd..62ea4760dfee 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsListByClusterSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsListByClusterSample.ts @@ -3,30 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of baseboard management controller key sets for the provided cluster. + * This sample demonstrates how to get a list of baseboard management controller key sets for the provided cluster. * - * @summary Get a list of baseboard management controller key sets for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_ListByCluster.json + * @summary get a list of baseboard management controller key sets for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_ListByCluster.json */ async function listBaseboardManagementControllerKeySetsOfTheCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.bmcKeySets.listByCluster( - resourceGroupName, - clusterName, - )) { + for await (const item of client.bmcKeySets.listByCluster("resourceGroupName", "clusterName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsUpdateSample.ts index 566ac9dc1b67..39e10854986e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsUpdateSample.ts @@ -1,63 +1,49 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - BmcKeySetPatchParameters, - BmcKeySetsUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to 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. + * This sample demonstrates how to 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. * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Patch.json + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Patch.json */ async function patchBaseboardManagementControllerKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const bmcKeySetUpdateParameters: BmcKeySetPatchParameters = { - expiration: new Date("2022-12-31T23:59:59.008Z"), - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const options: BmcKeySetsUpdateOptionalParams = { bmcKeySetUpdateParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginUpdateAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - options, + const result = await client.bmcKeySets.update( + "resourceGroupName", + "clusterName", + "bmcKeySetName", + { + bmcKeySetUpdateParameters: { + expiration: new Date("2022-12-31T23:59:59.008Z"), + userList: [ + { + azureUserName: "userABC", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + { + azureUserName: "userXYZ", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksCreateOrUpdateSample.ts index dad6158ce1b3..7f495bf85cc9 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksCreateOrUpdateSample.ts @@ -1,53 +1,43 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { CloudServicesNetwork} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new cloud services network or update the properties of the existing cloud services network. + * This sample demonstrates how to create a new cloud services network or update the properties of the existing cloud services network. * - * @summary Create a new cloud services network or update the properties of the existing cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Create.json + * @summary create a new cloud services network or update the properties of the existing cloud services network. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Create.json */ async function createOrUpdateCloudServicesNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const cloudServicesNetworkParameters: CloudServicesNetwork = { - additionalEgressEndpoints: [ - { - category: "azure-resource-management", - endpoints: [ - { domainName: "storageaccountex.blob.core.windows.net", port: 443 }, - ], - }, - ], - enableDefaultEgressEndpoints: "False", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - storageOptions: { - mode: "Standard", - sizeMiB: 1048576, - storageApplianceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - cloudServicesNetworkName, - cloudServicesNetworkParameters, + const result = await client.cloudServicesNetworks.createOrUpdate( + "resourceGroupName", + "cloudServicesNetworkName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + additionalEgressEndpoints: [ + { + category: "azure-resource-management", + endpoints: [{ domainName: "storageaccountex.blob.core.windows.net", port: 443 }], + }, + ], + enableDefaultEgressEndpoints: "False", + storageOptions: { + mode: "Standard", + sizeMiB: 1048576, + storageApplianceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksDeleteSample.ts index 3e9202e6ebba..9e5fe4195d18 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksDeleteSample.ts @@ -3,26 +3,20 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided cloud services network. + * This sample demonstrates how to delete the provided cloud services network. * - * @summary Delete the provided cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Delete.json + * @summary delete the provided cloud services network. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Delete.json */ async function deleteCloudServicesNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginDeleteAndWait( - resourceGroupName, - cloudServicesNetworkName, + const result = await client.cloudServicesNetworks.delete( + "resourceGroupName", + "cloudServicesNetworkName", ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksGetSample.ts index febdabce9b95..7e1dc40b19bc 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksGetSample.ts @@ -3,26 +3,20 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get properties of the provided cloud services network. + * This sample demonstrates how to get properties of the provided cloud services network. * - * @summary Get properties of the provided cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Get.json + * @summary get properties of the provided cloud services network. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Get.json */ async function getCloudServicesNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const result = await client.cloudServicesNetworks.get( - resourceGroupName, - cloudServicesNetworkName, + "resourceGroupName", + "cloudServicesNetworkName", ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksListByResourceGroupSample.ts index 1299ddb92510..8eb92bba6911 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of cloud services networks in the provided resource group. + * This sample demonstrates how to get a list of cloud services networks in the provided resource group. * - * @summary Get a list of cloud services networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_ListByResourceGroup.json + * @summary get a list of cloud services networks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_ListByResourceGroup.json */ async function listCloudServicesNetworksForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.cloudServicesNetworks.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.cloudServicesNetworks.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksListBySubscriptionSample.ts index 7514c2a4917f..e7b6bfdede6b 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of cloud services networks in the provided subscription. + * This sample demonstrates how to get a list of cloud services networks in the provided subscription. * - * @summary Get a list of cloud services networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_ListBySubscription.json + * @summary get a list of cloud services networks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_ListBySubscription.json */ async function listCloudServicesNetworksForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.cloudServicesNetworks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksUpdateSample.ts index f7f04a3ae0ed..8a1d3ab51a33 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksUpdateSample.ts @@ -1,56 +1,40 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - CloudServicesNetworkPatchParameters, - CloudServicesNetworksUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. + * This sample demonstrates how to update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. * - * @summary Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Patch.json + * @summary update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Patch.json */ async function patchCloudServicesNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const cloudServicesNetworkUpdateParameters: CloudServicesNetworkPatchParameters = + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.cloudServicesNetworks.update( + "resourceGroupName", + "cloudServicesNetworkName", { - additionalEgressEndpoints: [ - { - category: "azure-resource-management", - endpoints: [ - { domainName: "storageaccountex.blob.core.windows.net", port: 443 }, - ], + cloudServicesNetworkUpdateParameters: { + additionalEgressEndpoints: [ + { + category: "azure-resource-management", + endpoints: [{ domainName: "storageaccountex.blob.core.windows.net", port: 443 }], + }, + ], + enableDefaultEgressEndpoints: "False", + storageOptions: { + mode: "Standard", + sizeMiB: 1048576, + storageApplianceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName", }, - ], - enableDefaultEgressEndpoints: "False", - storageOptions: { - mode: "Standard", - sizeMiB: 1048576, - storageApplianceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName", + tags: { key1: "myvalue1", key2: "myvalue2" }, }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: CloudServicesNetworksUpdateOptionalParams = { - cloudServicesNetworkUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginUpdateAndWait( - resourceGroupName, - cloudServicesNetworkName, - options, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersCreateOrUpdateSample.ts index fbd3b91aff32..fe1adddaa0ba 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersCreateOrUpdateSample.ts @@ -1,85 +1,67 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { ClusterManager} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new cluster manager or update properties of the cluster manager if it exists. + * This sample demonstrates how to create a new cluster manager or update properties of the cluster manager if it exists. * - * @summary Create a new cluster manager or update properties of the cluster manager if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Create.json + * @summary create a new cluster manager or update properties of the cluster manager if it exists. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Create.json */ async function createOrUpdateClusterManager(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerParameters: ClusterManager = { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - fabricControllerId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", - identity: { type: "SystemAssigned" }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterManagerName, - clusterManagerParameters, + const result = await client.clusterManagers.createOrUpdate( + "resourceGroupName", + "clusterManagerName", + { + identity: { type: "SystemAssigned" }, + kind: "AzureLocal", + location: "location", + analyticsWorkspaceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName", + fabricControllerId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, ); console.log(result); } /** - * This sample demonstrates how to Create a new cluster manager or update properties of the cluster manager if it exists. + * This sample demonstrates how to create a new cluster manager or update properties of the cluster manager if it exists. * - * @summary Create a new cluster manager or update properties of the cluster manager if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Create_Uami.json + * @summary create a new cluster manager or update properties of the cluster manager if it exists. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Create_Uami.json */ async function createOrUpdateClusterManagerWithUserAssignedIdentity(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerParameters: ClusterManager = { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - fabricControllerId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterManagerName, - clusterManagerParameters, + const result = await client.clusterManagers.createOrUpdate( + "resourceGroupName", + "clusterManagerName", + { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + }, + }, + kind: "AzureLocal", + location: "location", + analyticsWorkspaceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName", + fabricControllerId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersDeleteSample.ts index 2666e1e6a155..ce82c7c85f4e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided cluster manager. + * This sample demonstrates how to delete the provided cluster manager. * - * @summary Delete the provided cluster manager. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Delete.json + * @summary delete the provided cluster manager. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Delete.json */ async function deleteClusterManager(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginDeleteAndWait( - resourceGroupName, - clusterManagerName, - ); + const result = await client.clusterManagers.delete("resourceGroupName", "clusterManagerName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersGetSample.ts index 23146680304e..d188fb959e8b 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersGetSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get the properties of the provided cluster manager. + * This sample demonstrates how to get the properties of the provided cluster manager. * - * @summary Get the properties of the provided cluster manager. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Get.json + * @summary get the properties of the provided cluster manager. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Get.json */ async function getClusterManager(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.get( - resourceGroupName, - clusterManagerName, - ); + const result = await client.clusterManagers.get("resourceGroupName", "clusterManagerName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersListByResourceGroupSample.ts index d2d298c69ec0..8ec189b4c469 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of cluster managers in the provided resource group. + * This sample demonstrates how to get a list of cluster managers in the provided resource group. * - * @summary Get a list of cluster managers in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_ListByResourceGroup.json + * @summary get a list of cluster managers in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_ListByResourceGroup.json */ async function listClusterManagersForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.clusterManagers.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.clusterManagers.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersListBySubscriptionSample.ts index ff1fdb40ac3f..0c33ef1d186e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of cluster managers in the provided subscription. + * This sample demonstrates how to get a list of cluster managers in the provided subscription. * - * @summary Get a list of cluster managers in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_ListBySubscription.json + * @summary get a list of cluster managers in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_ListBySubscription.json */ async function listClusterManagersForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.clusterManagers.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersUpdateRelayPrivateEndpointConnectionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersUpdateRelayPrivateEndpointConnectionSample.ts new file mode 100644 index 000000000000..692148a7214c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersUpdateRelayPrivateEndpointConnectionSample.ts @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. + * + * @summary update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_UpdateRelayPrivateEndpointConnection_Approve.json + */ +async function approvePrivateEndpointConnection(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.updateRelayPrivateEndpointConnection( + "resourceGroupName", + "clusterManagerName", + { + clusterManagerUpdateRelayPrivateEndpointConnectionParameters: { + connectionState: "Approved", + description: "Approving private endpoint connection", + privateEndpointResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. + * + * @summary update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_UpdateRelayPrivateEndpointConnection_Reject.json + */ +async function rejectPrivateEndpointConnection(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.updateRelayPrivateEndpointConnection( + "resourceGroupName", + "clusterManagerName", + { + clusterManagerUpdateRelayPrivateEndpointConnectionParameters: { + connectionState: "Rejected", + description: "Rejecting private endpoint connection", + privateEndpointResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await approvePrivateEndpointConnection(); + await rejectPrivateEndpointConnection(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersUpdateSample.ts index 573eb6969ffb..da4331968a68 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersUpdateSample.ts @@ -1,50 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ClusterManagerPatchParameters, - ClusterManagersUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. + * This sample demonstrates how to patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. * - * @summary Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Patch.json + * @summary patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Patch.json */ async function patchClusterManager(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerUpdateParameters: ClusterManagerPatchParameters = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClusterManagersUpdateOptionalParams = { - clusterManagerUpdateParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.update( - resourceGroupName, - clusterManagerName, - options, - ); + const result = await client.clusterManagers.update("resourceGroupName", "clusterManagerName", { + clusterManagerUpdateParameters: { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": + {}, + }, + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersContinueUpdateVersionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersContinueUpdateVersionSample.ts index 52df8007aefa..94786718314f 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersContinueUpdateVersionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersContinueUpdateVersionSample.ts @@ -1,36 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ClusterContinueUpdateVersionParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. + * This sample demonstrates how to trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. * - * @summary Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ContinueUpdateVersion.json + * @summary trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. + * x-ms-original-file: 2026-05-01-preview/Clusters_ContinueUpdateVersion.json */ async function continueUpdateClusterVersion(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters = - { machineGroupTargetingMode: "AlphaByRack" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginContinueUpdateVersionAndWait( - resourceGroupName, - clusterName, - clusterContinueUpdateVersionParameters, - ); + const result = await client.clusters.continueUpdateVersion("resourceGroupName", "clusterName", { + machineGroupTargetingMode: "AlphaByRack", + safeguardMode: "All", + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersCreateOrUpdateSample.ts index 9de5a8c19211..c5f827b9fe0c 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersCreateOrUpdateSample.ts @@ -1,25 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { Cluster} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new cluster or update the properties of the cluster if it exists. + * This sample demonstrates how to create a new cluster or update the properties of the cluster if it exists. * - * @summary Create a new cluster or update the properties of the cluster if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Create.json + * @summary create a new cluster or update the properties of the cluster if it exists. + * x-ms-original-file: 2026-05-01-preview/Clusters_Create.json */ async function createOrUpdateCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterParameters: Cluster = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.createOrUpdate("resourceGroupName", "clusterName", { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", + type: "CustomLocation", + }, + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + }, + }, + kind: "AzureLocal", + location: "location", aggregatorOrSingleRackDefinition: { bareMetalMachineConfigurationData: [ { @@ -67,7 +75,7 @@ async function createOrUpdateCluster(): Promise { }, analyticsOutputSettings: { analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName", associatedIdentity: { identityType: "UserAssignedIdentity", userAssignedIdentityResourceId: @@ -83,8 +91,7 @@ async function createOrUpdateCluster(): Promise { userAssignedIdentityResourceId: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", }, - containerUrl: - "https://myaccount.blob.core.windows.net/mycontainer?restype=container", + containerUrl: "https://myaccount.blob.core.windows.net/mycontainer?restype=container", overrides: [ { associatedIdentity: { @@ -93,23 +100,17 @@ async function createOrUpdateCluster(): Promise { "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", }, commandOutputType: "StorageRunReadCommands", - containerUrl: - "https://myaccount.blob.core.windows.net/myContainer2?restype=container", + containerUrl: "https://myaccount.blob.core.windows.net/myContainer2?restype=container", }, ], }, - computeDeploymentThreshold: { - type: "PercentSuccess", - grouping: "PerCluster", - value: 90, - }, + computeDeploymentThreshold: { grouping: "PerCluster", type: "PercentSuccess", value: 90 }, computeRackDefinitions: [ { bareMetalMachineConfigurationData: [ { bmcCredentials: { - password: - "https://keyvaultname.vault.azure.net/secrets/secretName", + password: "https://keyvaultname.vault.azure.net/secrets/secretName", username: "username", }, bmcMacAddress: "AA:BB:CC:DD:EE:FF", @@ -121,8 +122,7 @@ async function createOrUpdateCluster(): Promise { }, { bmcCredentials: { - password: - "https://keyvaultname.vault.azure.net/secrets/secretName", + password: "https://keyvaultname.vault.azure.net/secrets/secretName", username: "username", }, bmcMacAddress: "AA:BB:CC:DD:EE:00", @@ -142,8 +142,7 @@ async function createOrUpdateCluster(): Promise { storageApplianceConfigurationData: [ { adminCredentials: { - password: - "https://keyvaultname.vault.azure.net/secrets/secretName", + password: "https://keyvaultname.vault.azure.net/secrets/secretName", username: "username", }, rackSlot: 1, @@ -153,25 +152,10 @@ async function createOrUpdateCluster(): Promise { ], }, ], - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", - type: "CustomLocation", - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, networkFabricId: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName", - runtimeProtectionConfiguration: { enforcementLevel: "OnDemand" }, + runtimeProtectionConfiguration: { definitionUpdateMode: "None", enforcementLevel: "OnDemand" }, secretArchiveSettings: { associatedIdentity: { identityType: "UserAssignedIdentity", @@ -180,7 +164,6 @@ async function createOrUpdateCluster(): Promise { }, vaultUri: "https://keyvaultname.vault.azure.net/", }, - tags: { key1: "myvalue1", key2: "myvalue2" }, updateStrategy: { maxUnavailable: 4, strategyType: "Rack", @@ -189,14 +172,8 @@ async function createOrUpdateCluster(): Promise { waitTimeMinutes: 10, }, vulnerabilityScanningSettings: { containerScan: "Enabled" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - clusterParameters, - ); + tags: { key1: "myvalue1", key2: "myvalue2" }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersDeleteSample.ts index d6e97b704f58..61edd2d16ef8 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided cluster. + * This sample demonstrates how to delete the provided cluster. * - * @summary Delete the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Delete.json + * @summary delete the provided cluster. + * x-ms-original-file: 2026-05-01-preview/Clusters_Delete.json */ async function deleteCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeleteAndWait( - resourceGroupName, - clusterName, - ); + const result = await client.clusters.delete("resourceGroupName", "clusterName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersDeploySample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersDeploySample.ts index efb2dd476b7a..ddc838a803be 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersDeploySample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersDeploySample.ts @@ -1,64 +1,38 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ClusterDeployParameters, - ClustersDeployOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Deploy the cluster using the rack configuration provided during creation. + * This sample demonstrates how to deploy the cluster using the rack configuration provided during creation. * - * @summary Deploy the cluster using the rack configuration provided during creation. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Deploy.json + * @summary deploy the cluster using the rack configuration provided during creation. + * x-ms-original-file: 2026-05-01-preview/Clusters_Deploy.json */ async function deployCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterDeployParameters: ClusterDeployParameters = {}; - const options: ClustersDeployOptionalParams = { clusterDeployParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeployAndWait( - resourceGroupName, - clusterName, - options, - ); + const result = await client.clusters.deploy("resourceGroupName", "clusterName", { + clusterDeployParameters: {}, + }); console.log(result); } /** - * This sample demonstrates how to Deploy the cluster using the rack configuration provided during creation. + * This sample demonstrates how to deploy the cluster using the rack configuration provided during creation. * - * @summary Deploy the cluster using the rack configuration provided during creation. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Deploy_SkipValidation.json + * @summary deploy the cluster using the rack configuration provided during creation. + * x-ms-original-file: 2026-05-01-preview/Clusters_Deploy_SkipValidation.json */ async function deployClusterSkippingValidation(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterDeployParameters: ClusterDeployParameters = { - skipValidationsForMachines: ["bmmName1"], - }; - const options: ClustersDeployOptionalParams = { clusterDeployParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeployAndWait( - resourceGroupName, - clusterName, - options, - ); + const result = await client.clusters.deploy("resourceGroupName", "clusterName", { + clusterDeployParameters: { skipValidationsForMachines: ["bmmName1"] }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersGetSample.ts index 617739f3648b..9a1617843a94 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersGetSample.ts @@ -3,24 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get properties of the provided cluster. + * This sample demonstrates how to get properties of the provided cluster. * - * @summary Get properties of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Get.json + * @summary get properties of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/Clusters_Get.json */ async function getCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.get(resourceGroupName, clusterName); + const result = await client.clusters.get("resourceGroupName", "clusterName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersInspectSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersInspectSample.ts new file mode 100644 index 000000000000..33a9f7ffe675 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersInspectSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied additional actions and filters. + * + * @summary trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied additional actions and filters. + * x-ms-original-file: 2026-05-01-preview/Clusters_Inspect.json + */ +async function inspectCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.inspect("resourceGroupName", "clusterName", { + clusterInspectParameters: { + additionalActions: ["ResetHardware"], + filterDevices: { bareMetalMachineNames: ["machine1", "machine2"], rackNames: ["rack1"] }, + }, + }); + console.log(result); +} + +async function main(): Promise { + await inspectCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersListByResourceGroupSample.ts index 773b0d926c6e..05dc4e6cb34e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of clusters in the provided resource group. + * This sample demonstrates how to get a list of clusters in the provided resource group. * - * @summary Get a list of clusters in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ListByResourceGroup.json + * @summary get a list of clusters in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/Clusters_ListByResourceGroup.json */ async function listClustersForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.clusters.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.clusters.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersListBySubscriptionSample.ts index 69b128daf617..ff4ab14e854e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of clusters in the provided subscription. + * This sample demonstrates how to get a list of clusters in the provided subscription. * - * @summary Get a list of clusters in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ListBySubscription.json + * @summary get a list of clusters in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/Clusters_ListBySubscription.json */ async function listClustersForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.clusters.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersRotateCredentialSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersRotateCredentialSample.ts new file mode 100644 index 000000000000..5024603cba13 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersRotateCredentialSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to rotate the specified cluster credential. + * + * @summary rotate the specified cluster credential. + * x-ms-original-file: 2026-05-01-preview/Clusters_RotateCredential.json + */ +async function rotateOneOrMoreManagedCredentials(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.rotateCredential("resourceGroupName", "clusterName", { + credentials: ["BMC Credential"], + }); + console.log(result); +} + +async function main(): Promise { + await rotateOneOrMoreManagedCredentials(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersScanRuntimeSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersScanRuntimeSample.ts index 967a7c434bad..b30a26145d93 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersScanRuntimeSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersScanRuntimeSample.ts @@ -1,41 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ClusterScanRuntimeParameters, - ClustersScanRuntimeOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. + * This sample demonstrates how to triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. * - * @summary Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ScanRuntime.json + * @summary triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. + * x-ms-original-file: 2026-05-01-preview/Clusters_ScanRuntime.json */ async function executeARuntimeProtectionScanOnTheCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterScanRuntimeParameters: ClusterScanRuntimeParameters = { - scanActivity: "Scan", - }; - const options: ClustersScanRuntimeOptionalParams = { - clusterScanRuntimeParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginScanRuntimeAndWait( - resourceGroupName, - clusterName, - options, - ); + const result = await client.clusters.scanRuntime("resourceGroupName", "clusterName", { + clusterScanRuntimeParameters: { scanActivity: "Scan" }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersUpdateSample.ts index 7a051dad9ac6..8a7ba68dfa25 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersUpdateSample.ts @@ -1,335 +1,254 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ClusterPatchParameters, - ClustersUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.json + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_AggregatorOrSingleRackDefinition.json */ async function patchClusterAggregatorOrSingleRackDefinition(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - aggregatorOrSingleRackDefinition: { - bareMetalMachineConfigurationData: [ - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:FF", - bootMacAddress: "00:BB:CC:DD:EE:FF", - machineDetails: "extraDetails", - machineName: "bmmName1", - rackSlot: 1, - serialNumber: "BM1219XXX", - }, - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:00", - bootMacAddress: "00:BB:CC:DD:EE:00", - machineDetails: "extraDetails", - machineName: "bmmName2", - rackSlot: 2, - serialNumber: "BM1219YYY", - }, - ], - networkRackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", - rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", - rackSerialNumber: "newSerialNumber", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - storageApplianceConfigurationData: [ - { - adminCredentials: { password: "{password}", username: "username" }, - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceName: "vmName", - }, - ], - }, - computeDeploymentThreshold: { - type: "PercentSuccess", - grouping: "PerCluster", - value: 90, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + aggregatorOrSingleRackDefinition: { + bareMetalMachineConfigurationData: [ + { + bmcCredentials: { password: "{password}", username: "username" }, + bmcMacAddress: "AA:BB:CC:DD:EE:FF", + bootMacAddress: "00:BB:CC:DD:EE:FF", + machineDetails: "extraDetails", + machineName: "bmmName1", + rackSlot: 1, + serialNumber: "BM1219XXX", + }, + { + bmcCredentials: { password: "{password}", username: "username" }, + bmcMacAddress: "AA:BB:CC:DD:EE:00", + bootMacAddress: "00:BB:CC:DD:EE:00", + machineDetails: "extraDetails", + machineName: "bmmName2", + rackSlot: 2, + serialNumber: "BM1219YYY", + }, + ], + networkRackId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", + rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", + rackSerialNumber: "newSerialNumber", + rackSkuId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", + storageApplianceConfigurationData: [ + { + adminCredentials: { password: "{password}", username: "username" }, + rackSlot: 1, + serialNumber: "BM1219XXX", + storageApplianceName: "vmName", + }, + ], + }, + computeDeploymentThreshold: { grouping: "PerCluster", type: "PercentSuccess", value: 90 }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); console.log(result); } /** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_AnalyticsOutput.json + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_AnalyticsOutput.json */ async function patchClusterAnalyticsOutput(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - analyticsOutputSettings: { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": + {}, + }, }, - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, + analyticsOutputSettings: { + analyticsWorkspaceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName", + associatedIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", + }, }, + tags: { key1: "myvalue1", key2: "myvalue2" }, }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); + }); console.log(result); } /** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_CommandOutput.json + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_CommandOutput.json */ async function patchClusterCommandOutput(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - commandOutputSettings: { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": + {}, + }, }, - containerUrl: - "https://myaccount.blob.core.windows.net/mycontainer?restype=container", - overrides: [ - { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", - }, - commandOutputType: "StorageRunReadCommands", - containerUrl: - "https://myaccount.blob.core.windows.net/myContainer2?restype=container", + commandOutputSettings: { + associatedIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", }, - ], - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, + containerUrl: "https://myaccount.blob.core.windows.net/mycontainer?restype=container", + overrides: [ + { + associatedIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", + }, + commandOutputType: "StorageRunReadCommands", + containerUrl: "https://myaccount.blob.core.windows.net/myContainer2?restype=container", + }, + ], }, + tags: { key1: "myvalue1", key2: "myvalue2" }, }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); + }); console.log(result); } /** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_Location.json + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_Location.json */ async function patchClusterLocation(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - clusterLocation: "Foo Street, 3rd Floor, row 9", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + clusterLocation: "Foo Street, 3rd Floor, row 9", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); console.log(result); } /** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_RuntimeProtectionConfiguration.json + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_RuntimeProtectionConfiguration.json */ async function patchRuntimeProtectionConfiguration(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - runtimeProtectionConfiguration: { enforcementLevel: "OnDemand" }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + runtimeProtectionConfiguration: { + definitionUpdateMode: "Automatic", + enforcementLevel: "OnDemand", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); console.log(result); } /** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_SecretArchive.json + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_SecretArchive.json */ async function patchSecretArchive(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - secretArchiveSettings: { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", - }, - vaultUri: "https://keyvaultname.vault.azure.net/", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + secretArchiveSettings: { + associatedIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", + }, + vaultUri: "https://keyvaultname.vault.azure.net/", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); console.log(result); } /** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_UpdateStrategy.json + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_UpdateStrategy.json */ async function patchUpdateStrategy(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - updateStrategy: { - maxUnavailable: 4, - strategyType: "Rack", - thresholdType: "CountSuccess", - thresholdValue: 4, - waitTimeMinutes: 10, - }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + updateStrategy: { + maxUnavailable: 4, + strategyType: "Rack", + thresholdType: "CountSuccess", + thresholdValue: 4, + waitTimeMinutes: 10, + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); console.log(result); } /** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_VulnerabilityScanning.json + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_VulnerabilityScanning.json */ async function patchVulnerabilityScanning(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - vulnerabilityScanningSettings: { containerScan: "Enabled" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + vulnerabilityScanningSettings: { containerScan: "Enabled" }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersUpdateVersionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersUpdateVersionSample.ts index 53f269c51cad..fb4a5a252f03 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersUpdateVersionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersUpdateVersionSample.ts @@ -1,37 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ClusterUpdateVersionParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update the version of the provided cluster to one of the available supported versions. + * This sample demonstrates how to update the version of the provided cluster to one of the available supported versions. * - * @summary Update the version of the provided cluster to one of the available supported versions. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_UpdateVersion.json + * @summary update the version of the provided cluster to one of the available supported versions. + * x-ms-original-file: 2026-05-01-preview/Clusters_UpdateVersion.json */ async function updateClusterVersion(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateVersionParameters: ClusterUpdateVersionParameters = { - targetClusterVersion: "2.0", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateVersionAndWait( - resourceGroupName, - clusterName, - clusterUpdateVersionParameters, - ); + const result = await client.clusters.updateVersion("resourceGroupName", "clusterName", { + safeguardMode: "All", + targetClusterVersion: "2.0", + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesCreateOrUpdateSample.ts index f3b3f2eda18e..ab07a9c541bf 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesCreateOrUpdateSample.ts @@ -1,46 +1,37 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { Console} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new virtual machine console or update the properties of the existing virtual machine console. + * This sample demonstrates how to create a new virtual machine console or update the properties of the existing virtual machine console. * - * @summary Create a new virtual machine console or update the properties of the existing virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Create.json + * @summary create a new virtual machine console or update the properties of the existing virtual machine console. + * x-ms-original-file: 2026-05-01-preview/Consoles_Create.json */ async function createOrUpdateVirtualMachineConsole(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const consoleParameters: Console = { - enabled: "True", - expiration: new Date("2022-06-01T01:27:03.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - consoleParameters, + const result = await client.consoles.createOrUpdate( + "resourceGroupName", + "virtualMachineName", + "default", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + enabled: "True", + expiration: new Date("2022-06-01T01:27:03.008Z"), + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesDeleteSample.ts index bc91277fc716..175cfcac0e77 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesDeleteSample.ts @@ -3,29 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided virtual machine console. + * This sample demonstrates how to delete the provided virtual machine console. * - * @summary Delete the provided virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Delete.json + * @summary delete the provided virtual machine console. + * x-ms-original-file: 2026-05-01-preview/Consoles_Delete.json */ async function deleteVirtualMachineConsole(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - ); + const result = await client.consoles.delete("resourceGroupName", "virtualMachineName", "default"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesGetSample.ts index 2716ed9618df..f7ea0695310b 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesGetSample.ts @@ -3,29 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get properties of the provided virtual machine console. + * This sample demonstrates how to get properties of the provided virtual machine console. * - * @summary Get properties of the provided virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Get.json + * @summary get properties of the provided virtual machine console. + * x-ms-original-file: 2026-05-01-preview/Consoles_Get.json */ async function getVirtualMachineConsole(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.get( - resourceGroupName, - virtualMachineName, - consoleName, - ); + const result = await client.consoles.get("resourceGroupName", "virtualMachineName", "default"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesListByVirtualMachineSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesListByVirtualMachineSample.ts index 8566660ad349..96f4e075fb52 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesListByVirtualMachineSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesListByVirtualMachineSample.ts @@ -3,30 +3,25 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of consoles for the provided virtual machine. + * This sample demonstrates how to get a list of consoles for the provided virtual machine. * - * @summary Get a list of consoles for the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_ListByVirtualMachine.json + * @summary get a list of consoles for the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/Consoles_ListByVirtualMachine.json */ async function listConsolesOfTheVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.consoles.listByVirtualMachine( - resourceGroupName, - virtualMachineName, + "resourceGroupName", + "virtualMachineName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesUpdateSample.ts index cb0ca17307be..d43afa0a860c 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesUpdateSample.ts @@ -1,46 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ConsolePatchParameters, - ConsolesUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to 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. + * This sample demonstrates how to 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. * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Patch.json + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/Consoles_Patch.json */ async function patchVirtualMachineConsole(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const consoleUpdateParameters: ConsolePatchParameters = { - enabled: "True", - expiration: new Date("2022-06-01T01:27:03.008Z"), - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ConsolesUpdateOptionalParams = { consoleUpdateParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - options, + const result = await client.consoles.update( + "resourceGroupName", + "virtualMachineName", + "default", + { + consoleUpdateParameters: { + enabled: "True", + expiration: new Date("2022-06-01T01:27:03.008Z"), + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesCreateOrUpdateSample.ts index 588a9a58fba2..9e0a75347fba 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesCreateOrUpdateSample.ts @@ -1,42 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - KubernetesClusterFeature} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. + * This sample demonstrates how to create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. * - * @summary Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Create.json + * @summary create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Create.json */ async function createOrUpdateKubernetesClusterFeature(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const kubernetesClusterFeatureParameters: KubernetesClusterFeature = { - location: "location", - options: [{ key: "featureOptionName", value: "featureOptionValue" }], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.kubernetesClusterFeatures.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - kubernetesClusterFeatureParameters, - ); + const result = await client.kubernetesClusterFeatures.createOrUpdate( + "resourceGroupName", + "kubernetesClusterName", + "featureName", + { + location: "location", + options: [{ key: "featureOptionName", value: "featureOptionValue" }], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesDeleteSample.ts index 4b9c4e217129..db31c3dec65c 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesDeleteSample.ts @@ -3,28 +3,21 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided Kubernetes cluster feature. + * This sample demonstrates how to delete the provided Kubernetes cluster feature. * - * @summary Delete the provided Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Delete.json + * @summary delete the provided Kubernetes cluster feature. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Delete.json */ async function deleteKubernetesClusterFeature(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, + const result = await client.kubernetesClusterFeatures.delete( + "resourceGroupName", + "kubernetesClusterName", + "featureName", ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesGetSample.ts index abec9fc58965..cc5e013fa806 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesGetSample.ts @@ -3,28 +3,21 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get properties of the provided the Kubernetes cluster feature. + * This sample demonstrates how to get properties of the provided the Kubernetes cluster feature. * - * @summary Get properties of the provided the Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Get.json + * @summary get properties of the provided the Kubernetes cluster feature. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Get.json */ async function getKubernetesClusterFeature(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const result = await client.kubernetesClusterFeatures.get( - resourceGroupName, - kubernetesClusterName, - featureName, + "resourceGroupName", + "kubernetesClusterName", + "featureName", ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesListByKubernetesClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesListByKubernetesClusterSample.ts index 81e6f7533aee..0788fb7b2696 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesListByKubernetesClusterSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesListByKubernetesClusterSample.ts @@ -3,30 +3,25 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of features for the provided Kubernetes cluster. + * This sample demonstrates how to get a list of features for the provided Kubernetes cluster. * - * @summary Get a list of features for the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_ListByKubernetesCluster.json + * @summary get a list of features for the provided Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_ListByKubernetesCluster.json */ async function listFeaturesForTheKubernetesCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.kubernetesClusterFeatures.listByKubernetesCluster( - resourceGroupName, - kubernetesClusterName, + "resourceGroupName", + "kubernetesClusterName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesUpdateSample.ts index cc9004f2477b..8c21a4be6e64 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesUpdateSample.ts @@ -1,44 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - KubernetesClusterFeaturePatchParameters, - KubernetesClusterFeaturesUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Patch properties of the provided Kubernetes cluster feature. + * This sample demonstrates how to patch properties of the provided Kubernetes cluster feature. * - * @summary Patch properties of the provided Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Patch.json + * @summary patch properties of the provided Kubernetes cluster feature. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Patch.json */ async function patchKubernetesClusterFeature(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const kubernetesClusterFeatureUpdateParameters: KubernetesClusterFeaturePatchParameters = - { - options: [{ key: "featureOptionName", value: "featureOptionValue" }], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: KubernetesClusterFeaturesUpdateOptionalParams = { - kubernetesClusterFeatureUpdateParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - options, + const result = await client.kubernetesClusterFeatures.update( + "resourceGroupName", + "kubernetesClusterName", + "featureName", + { + kubernetesClusterFeatureUpdateParameters: { + options: [{ key: "featureOptionName", value: "featureOptionValue" }], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersCreateOrUpdateSample.ts index eb2c8b73e327..6083c3d8108d 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersCreateOrUpdateSample.ts @@ -1,38 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { KubernetesCluster} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new Kubernetes cluster or update the properties of the existing one. + * This sample demonstrates how to create a new Kubernetes cluster or update the properties of the existing one. * - * @summary Create a new Kubernetes cluster or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Create.json + * @summary create a new Kubernetes cluster or update the properties of the existing one. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Create.json */ async function createOrUpdateKubernetesCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterParameters: KubernetesCluster = { - aadConfiguration: { - adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"], - }, - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.createOrUpdate( + "resourceGroupName", + "kubernetesClusterName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + aadConfiguration: { adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"] }, administratorConfiguration: { adminUsername: "azure", sshPublicKeys: [ @@ -42,17 +33,7 @@ async function createOrUpdateKubernetesCluster(): Promise { }, ], }, - availabilityZones: ["1", "2", "3"], - count: 3, - vmSkuName: "NC_G6_28_v1", - }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - initialAgentPoolConfigurations: [ - { - name: "SystemPool-1", + controlPlaneNodeConfiguration: { administratorConfiguration: { adminUsername: "azure", sshPublicKeys: [ @@ -62,7 +43,59 @@ async function createOrUpdateKubernetesCluster(): Promise { }, ], }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, + availabilityZones: ["1", "2", "3"], + count: 3, + vmSkuName: "NC_G6_28_v1", + }, + initialAgentPoolConfigurations: [ + { + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, + attachedNetworkConfiguration: { + l2Networks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", + pluginType: "DPDK", + }, + ], + l3Networks: [ + { + ipamEnabled: "False", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + pluginType: "SRIOV", + }, + ], + trunkedNetworks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", + pluginType: "MACVLAN", + }, + ], + }, + availabilityZones: ["1", "2", "3"], + count: 3, + labels: [{ key: "kubernetes.label", value: "true" }], + mode: "System", + name: "SystemPool-1", + taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], + upgradeSettings: { maxSurge: "1" }, + vmSkuName: "NC_P46_224_v1", + }, + ], + kubernetesVersion: "1.XX.Y", + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, + networkConfiguration: { attachedNetworkConfiguration: { l2Networks: [ { @@ -87,125 +120,72 @@ async function createOrUpdateKubernetesCluster(): Promise { }, ], }, - availabilityZones: ["1", "2", "3"], - count: 3, - labels: [{ key: "kubernetes.label", value: "true" }], - mode: "System", - taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_P46_224_v1", - }, - ], - kubernetesVersion: "1.XX.Y", - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkConfiguration: { - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - bgpServiceLoadBalancerConfiguration: { - bgpAdvertisements: [ - { - advertiseToFabric: "True", - communities: ["64512:100"], - ipAddressPools: ["pool1"], - peers: ["peer1"], - }, - ], - bgpPeers: [ - { - name: "peer1", - bfdEnabled: "False", - bgpMultiHop: "False", - holdTime: "P300s", - keepAliveTime: "P300s", - myAsn: 64512, - peerAddress: "203.0.113.254", - peerAsn: 64497, - peerPort: 179, - }, - ], - fabricPeeringEnabled: "True", - ipAddressPools: [ - { - name: "pool1", - addresses: ["198.51.102.0/24"], - autoAssign: "True", - onlyUseHostIps: "True", - }, - ], + bgpServiceLoadBalancerConfiguration: { + bgpAdvertisements: [ + { + advertiseToFabric: "True", + communities: ["64512:100"], + ipAddressPools: ["pool1"], + peers: ["peer1"], + }, + ], + bgpPeers: [ + { + bfdEnabled: "False", + bgpMultiHop: "False", + holdTime: "P300s", + keepAliveTime: "P300s", + myAsn: 64512, + name: "peer1", + peerAddress: "203.0.113.254", + peerAsn: 64497, + peerPort: 179, + }, + ], + fabricPeeringEnabled: "True", + ipAddressPools: [ + { + addresses: ["198.51.102.0/24"], + autoAssign: "True", + name: "pool1", + onlyUseHostIps: "True", + }, + ], + }, + cloudServicesNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", + cniNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + dnsServiceIp: "198.51.101.2", + podCidrs: ["198.51.100.0/24"], + serviceCidrs: ["198.51.101.0/24"], }, - cloudServicesNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - cniNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - dnsServiceIp: "198.51.101.2", - podCidrs: ["198.51.100.0/24"], - serviceCidrs: ["198.51.101.0/24"], + tags: { key1: "myvalue1", key2: "myvalue2" }, }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterParameters, ); console.log(result); } /** - * This sample demonstrates how to Create a new Kubernetes cluster or update the properties of the existing one. + * This sample demonstrates how to create a new Kubernetes cluster or update the properties of the existing one. * - * @summary Create a new Kubernetes cluster or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_L2LoadBalancer_Create.json + * @summary create a new Kubernetes cluster or update the properties of the existing one. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_L2LoadBalancer_Create.json */ async function createOrUpdateKubernetesClusterWithALayer2LoadBalancer(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterParameters: KubernetesCluster = { - aadConfiguration: { - adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"], - }, - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.createOrUpdate( + "resourceGroupName", + "kubernetesClusterName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + aadConfiguration: { adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"] }, administratorConfiguration: { adminUsername: "azure", sshPublicKeys: [ @@ -215,17 +195,7 @@ async function createOrUpdateKubernetesClusterWithALayer2LoadBalancer(): Promise }, ], }, - availabilityZones: ["1", "2", "3"], - count: 3, - vmSkuName: "NC_G6_28_v1", - }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - initialAgentPoolConfigurations: [ - { - name: "SystemPool-1", + controlPlaneNodeConfiguration: { administratorConfiguration: { adminUsername: "azure", sshPublicKeys: [ @@ -235,7 +205,59 @@ async function createOrUpdateKubernetesClusterWithALayer2LoadBalancer(): Promise }, ], }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, + availabilityZones: ["1", "2", "3"], + count: 3, + vmSkuName: "NC_G6_28_v1", + }, + initialAgentPoolConfigurations: [ + { + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, + attachedNetworkConfiguration: { + l2Networks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", + pluginType: "DPDK", + }, + ], + l3Networks: [ + { + ipamEnabled: "False", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + pluginType: "SRIOV", + }, + ], + trunkedNetworks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", + pluginType: "MACVLAN", + }, + ], + }, + availabilityZones: ["1", "2", "3"], + count: 3, + labels: [{ key: "kubernetes.label", value: "true" }], + mode: "System", + name: "SystemPool-1", + taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], + upgradeSettings: { maxSurge: "1" }, + vmSkuName: "NC_P46_224_v1", + }, + ], + kubernetesVersion: "1.XX.Y", + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, + networkConfiguration: { attachedNetworkConfiguration: { l2Networks: [ { @@ -260,71 +282,21 @@ async function createOrUpdateKubernetesClusterWithALayer2LoadBalancer(): Promise }, ], }, - availabilityZones: ["1", "2", "3"], - count: 3, - labels: [{ key: "kubernetes.label", value: "true" }], - mode: "System", - taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_P46_224_v1", - }, - ], - kubernetesVersion: "1.XX.Y", - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkConfiguration: { - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - cloudServicesNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - cniNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - dnsServiceIp: "198.51.101.2", - l2ServiceLoadBalancerConfiguration: { - ipAddressPools: [ - { - name: "pool1", - addresses: ["198.51.102.2-198.51.102.254"], - autoAssign: "True", - }, - ], + cloudServicesNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", + cniNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + dnsServiceIp: "198.51.101.2", + l2ServiceLoadBalancerConfiguration: { + ipAddressPools: [ + { addresses: ["198.51.102.2-198.51.102.254"], autoAssign: "True", name: "pool1" }, + ], + }, + podCidrs: ["198.51.100.0/24"], + serviceCidrs: ["198.51.101.0/24"], }, - podCidrs: ["198.51.100.0/24"], - serviceCidrs: ["198.51.101.0/24"], + tags: { key1: "myvalue1", key2: "myvalue2" }, }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterParameters, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersDeleteSample.ts index 5af261eb01c6..ea51b0db0752 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersDeleteSample.ts @@ -3,26 +3,20 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided Kubernetes cluster. + * This sample demonstrates how to delete the provided Kubernetes cluster. * - * @summary Delete the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Delete.json + * @summary delete the provided Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Delete.json */ async function deleteKubernetesCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, + const result = await client.kubernetesClusters.delete( + "resourceGroupName", + "kubernetesClusterName", ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersGetSample.ts index e6b94a90dd05..949a1b12a59c 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersGetSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get properties of the provided the Kubernetes cluster. + * This sample demonstrates how to get properties of the provided the Kubernetes cluster. * - * @summary Get properties of the provided the Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Get.json + * @summary get properties of the provided the Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Get.json */ async function getKubernetesCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.get( - resourceGroupName, - kubernetesClusterName, - ); + const result = await client.kubernetesClusters.get("resourceGroupName", "kubernetesClusterName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersListByResourceGroupSample.ts index 0b95b46c6a75..25461f5a0b8b 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of Kubernetes clusters in the provided resource group. + * This sample demonstrates how to get a list of Kubernetes clusters in the provided resource group. * - * @summary Get a list of Kubernetes clusters in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_ListByResourceGroup.json + * @summary get a list of Kubernetes clusters in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_ListByResourceGroup.json */ async function listKubernetesClustersForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.kubernetesClusters.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.kubernetesClusters.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersListBySubscriptionSample.ts index 16d2837bfcf3..5a5de5bce360 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of Kubernetes clusters in the provided subscription. + * This sample demonstrates how to get a list of Kubernetes clusters in the provided subscription. * - * @summary Get a list of Kubernetes clusters in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_ListBySubscription.json + * @summary get a list of Kubernetes clusters in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_ListBySubscription.json */ async function listKubernetesClustersForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.kubernetesClusters.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersRestartNodeSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersRestartNodeSample.ts index 396734a8364a..e779e82666a1 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersRestartNodeSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersRestartNodeSample.ts @@ -1,35 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - KubernetesClusterRestartNodeParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Restart a targeted node of a Kubernetes cluster. + * This sample demonstrates how to restart a targeted node of a Kubernetes cluster. * - * @summary Restart a targeted node of a Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_RestartNode.json + * @summary restart a targeted node of a Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_RestartNode.json */ async function restartAKubernetesClusterNode(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters = - { nodeName: "nodeName" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginRestartNodeAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterRestartNodeParameters, + const result = await client.kubernetesClusters.restartNode( + "resourceGroupName", + "kubernetesClusterName", + { nodeName: "nodeName" }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersUpdateSample.ts index cc2261cd55cc..096443d9a9b3 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersUpdateSample.ts @@ -1,60 +1,47 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - KubernetesClusterPatchParameters, - KubernetesClustersUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. + * This sample demonstrates how to patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. * - * @summary Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Patch.json + * @summary patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Patch.json */ async function patchKubernetesCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterUpdateParameters: KubernetesClusterPatchParameters = { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.update( + "resourceGroupName", + "kubernetesClusterName", + { + kubernetesClusterUpdateParameters: { + administratorConfiguration: { + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + controlPlaneNodeConfiguration: { + administratorConfiguration: { + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], }, - ], + count: 3, + }, + kubernetesVersion: "1.XX.Y", + tags: { key1: "myvalue1", key2: "myvalue2" }, }, - count: 3, }, - kubernetesVersion: "1.XX.Y", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: KubernetesClustersUpdateOptionalParams = { - kubernetesClusterUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - options, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..a9f67a097916 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsCreateOrUpdateSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create the Kubernetes version resource or update its tags. This resource is system managed and should only be created with the name "default". + * + * @summary create the Kubernetes version resource or update its tags. This resource is system managed and should only be created with the name "default". + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Create.json + */ +async function createOrUpdateKubernetesVersions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesVersions.createOrUpdate("resourceGroupName", "default", { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateKubernetesVersions(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsDeleteSample.ts new file mode 100644 index 000000000000..2f67e0b0a34c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsDeleteSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the specified Kubernetes version resource. + * + * @summary delete the specified Kubernetes version resource. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Delete.json + */ +async function deleteKubernetesVersions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesVersions.delete("resourceGroupName", "default"); + console.log(result); +} + +async function main(): Promise { + await deleteKubernetesVersions(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsGetSample.ts new file mode 100644 index 000000000000..cbda1313e927 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * + * @summary retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Get.json + */ +async function getKubernetesVersions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesVersions.get("resourceGroupName", "default"); + console.log(result); +} + +async function main(): Promise { + await getKubernetesVersions(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsListByResourceGroupSample.ts new file mode 100644 index 000000000000..233191848258 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsListByResourceGroupSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a list of Kubernetes version resources in the provided resource group. + * + * @summary get a list of Kubernetes version resources in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_ListByResourceGroup.json + */ +async function listKubernetesVersionsForResourceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.kubernetesVersions.listByResourceGroup("resourceGroupName")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listKubernetesVersionsForResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsListBySubscriptionSample.ts new file mode 100644 index 000000000000..91e0f54ebed5 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsListBySubscriptionSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a list of Kubernetes version resources in the provided subscription. + * + * @summary get a list of Kubernetes version resources in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_ListBySubscription.json + */ +async function listKubernetesVersionsForSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.kubernetesVersions.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listKubernetesVersionsForSubscription(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsUpdateSample.ts new file mode 100644 index 000000000000..6729f6ec39d3 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesVersionsUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @summary update tags associated with the Kubernetes version resource. No other properties are supported for update. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_UpdateTags.json + */ +async function patchKubernetesVersions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesVersions.update("resourceGroupName", "default", { + kubernetesVersionPatchParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); + console.log(result); +} + +async function main(): Promise { + await patchKubernetesVersions(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksCreateOrUpdateSample.ts index 77b018112c3e..718b259ee364 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksCreateOrUpdateSample.ts @@ -1,43 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { L2Network} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new layer 2 (L2) network or update the properties of the existing network. + * This sample demonstrates how to create a new layer 2 (L2) network or update the properties of the existing network. * - * @summary Create a new layer 2 (L2) network or update the properties of the existing network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Create.json + * @summary create a new layer 2 (L2) network or update the properties of the existing network. + * x-ms-original-file: 2026-05-01-preview/L2Networks_Create.json */ async function createOrUpdateL2Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const l2NetworkParameters: L2Network = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l2Networks.createOrUpdate("resourceGroupName", "l2NetworkName", { extendedLocation: { name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", type: "CustomLocation", }, + location: "location", hybridAksPluginType: "DPDK", interfaceName: "eth0", l2IsolationDomainId: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", - location: "location", tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.beginCreateOrUpdateAndWait( - resourceGroupName, - l2NetworkName, - l2NetworkParameters, - ); + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksDeleteSample.ts index a0f6d38f5b1c..18c831552d18 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided layer 2 (L2) network. + * This sample demonstrates how to delete the provided layer 2 (L2) network. * - * @summary Delete the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Delete.json + * @summary delete the provided layer 2 (L2) network. + * x-ms-original-file: 2026-05-01-preview/L2Networks_Delete.json */ async function deleteL2Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.beginDeleteAndWait( - resourceGroupName, - l2NetworkName, - ); + const result = await client.l2Networks.delete("resourceGroupName", "l2NetworkName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksGetSample.ts index 3a59564b35d9..355a6b99eefb 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksGetSample.ts @@ -3,24 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get properties of the provided layer 2 (L2) network. + * This sample demonstrates how to get properties of the provided layer 2 (L2) network. * - * @summary Get properties of the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Get.json + * @summary get properties of the provided layer 2 (L2) network. + * x-ms-original-file: 2026-05-01-preview/L2Networks_Get.json */ async function getL2Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.get(resourceGroupName, l2NetworkName); + const result = await client.l2Networks.get("resourceGroupName", "l2NetworkName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksListByResourceGroupSample.ts index 9aabf24dee47..a1988a4ba226 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of layer 2 (L2) networks in the provided resource group. + * This sample demonstrates how to get a list of layer 2 (L2) networks in the provided resource group. * - * @summary Get a list of layer 2 (L2) networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_ListByResourceGroup.json + * @summary get a list of layer 2 (L2) networks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/L2Networks_ListByResourceGroup.json */ async function listL2NetworksForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.l2Networks.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.l2Networks.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksListBySubscriptionSample.ts index fd71dc952a9f..a6545e56ff25 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of layer 2 (L2) networks in the provided subscription. + * This sample demonstrates how to get a list of layer 2 (L2) networks in the provided subscription. * - * @summary Get a list of layer 2 (L2) networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_ListBySubscription.json + * @summary get a list of layer 2 (L2) networks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/L2Networks_ListBySubscription.json */ async function listL2NetworksForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.l2Networks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksUpdateSample.ts index dca17be86ceb..065330f3f7c1 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksUpdateSample.ts @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - L2NetworkPatchParameters, - L2NetworksUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update tags associated with the provided layer 2 (L2) network. + * This sample demonstrates how to update tags associated with the provided layer 2 (L2) network. * - * @summary Update tags associated with the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Patch.json + * @summary update tags associated with the provided layer 2 (L2) network. + * x-ms-original-file: 2026-05-01-preview/L2Networks_Patch.json */ async function patchL2Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const l2NetworkUpdateParameters: L2NetworkPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: L2NetworksUpdateOptionalParams = { l2NetworkUpdateParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.update( - resourceGroupName, - l2NetworkName, - options, - ); + const result = await client.l2Networks.update("resourceGroupName", "l2NetworkName", { + l2NetworkUpdateParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksCreateOrUpdateSample.ts index 618734e7cc21..98ac7d05ed42 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksCreateOrUpdateSample.ts @@ -1,46 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { L3Network} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new layer 3 (L3) network or update the properties of the existing network. + * This sample demonstrates how to create a new layer 3 (L3) network or update the properties of the existing network. * - * @summary Create a new layer 3 (L3) network or update the properties of the existing network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Create.json + * @summary create a new layer 3 (L3) network or update the properties of the existing network. + * x-ms-original-file: 2026-05-01-preview/L3Networks_Create.json */ async function createOrUpdateL3Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const l3NetworkParameters: L3Network = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l3Networks.createOrUpdate("resourceGroupName", "l3NetworkName", { extendedLocation: { name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", type: "CustomLocation", }, + location: "location", interfaceName: "eth0", ipAllocationType: "DualStack", ipv4ConnectedPrefix: "198.51.100.0/24", ipv6ConnectedPrefix: "2001:db8::/64", l3IsolationDomainId: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, vlan: 12, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.beginCreateOrUpdateAndWait( - resourceGroupName, - l3NetworkName, - l3NetworkParameters, - ); + tags: { key1: "myvalue1", key2: "myvalue2" }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksDeleteSample.ts index 392a7524560f..792bed3f4005 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided layer 3 (L3) network. + * This sample demonstrates how to delete the provided layer 3 (L3) network. * - * @summary Delete the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Delete.json + * @summary delete the provided layer 3 (L3) network. + * x-ms-original-file: 2026-05-01-preview/L3Networks_Delete.json */ async function deleteL3Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.beginDeleteAndWait( - resourceGroupName, - l3NetworkName, - ); + const result = await client.l3Networks.delete("resourceGroupName", "l3NetworkName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksGetSample.ts index 7cd4193f20ee..6fe90107ecbd 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksGetSample.ts @@ -3,24 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get properties of the provided layer 3 (L3) network. + * This sample demonstrates how to get properties of the provided layer 3 (L3) network. * - * @summary Get properties of the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Get.json + * @summary get properties of the provided layer 3 (L3) network. + * x-ms-original-file: 2026-05-01-preview/L3Networks_Get.json */ async function getL3Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.get(resourceGroupName, l3NetworkName); + const result = await client.l3Networks.get("resourceGroupName", "l3NetworkName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksListByResourceGroupSample.ts index 2231fe0a8ed2..8ccb44851361 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of layer 3 (L3) networks in the provided resource group. + * This sample demonstrates how to get a list of layer 3 (L3) networks in the provided resource group. * - * @summary Get a list of layer 3 (L3) networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_ListByResourceGroup.json + * @summary get a list of layer 3 (L3) networks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/L3Networks_ListByResourceGroup.json */ async function listL3NetworksForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.l3Networks.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.l3Networks.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksListBySubscriptionSample.ts index 59461dc60787..9bf5c2453976 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of layer 3 (L3) networks in the provided subscription. + * This sample demonstrates how to get a list of layer 3 (L3) networks in the provided subscription. * - * @summary Get a list of layer 3 (L3) networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_ListBySubscription.json + * @summary get a list of layer 3 (L3) networks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/L3Networks_ListBySubscription.json */ async function listL3NetworksForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.l3Networks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksUpdateSample.ts index 83859c05ae87..5a6d9659bfa3 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksUpdateSample.ts @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - L3NetworkPatchParameters, - L3NetworksUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update tags associated with the provided layer 3 (L3) network. + * This sample demonstrates how to update tags associated with the provided layer 3 (L3) network. * - * @summary Update tags associated with the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Patch.json + * @summary update tags associated with the provided layer 3 (L3) network. + * x-ms-original-file: 2026-05-01-preview/L3Networks_Patch.json */ async function patchL3Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const l3NetworkUpdateParameters: L3NetworkPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: L3NetworksUpdateOptionalParams = { l3NetworkUpdateParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.update( - resourceGroupName, - l3NetworkName, - options, - ); + const result = await client.l3Networks.update("resourceGroupName", "l3NetworkName", { + l3NetworkUpdateParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsCreateOrUpdateSample.ts index bb94bc41bc95..b6359cc6023e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsCreateOrUpdateSample.ts @@ -1,45 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ClusterMetricsConfiguration} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create new or update the existing metrics configuration of the provided cluster. + * This sample demonstrates how to create new or update the existing metrics configuration of the provided cluster. * - * @summary Create new or update the existing metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Create.json + * @summary create new or update the existing metrics configuration of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Create.json */ async function createOrUpdateMetricsConfigurationOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const metricsConfigurationParameters: ClusterMetricsConfiguration = { - collectionInterval: 15, - enabledMetrics: ["metric1", "metric2"], - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - metricsConfigurationParameters, + const result = await client.metricsConfigurations.createOrUpdate( + "resourceGroupName", + "clusterName", + "default", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + collectionInterval: 15, + enabledMetrics: ["metric1", "metric2"], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsDeleteSample.ts index 69707a078e3b..de450ae5aa9f 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsDeleteSample.ts @@ -3,28 +3,21 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the metrics configuration of the provided cluster. + * This sample demonstrates how to delete the metrics configuration of the provided cluster. * - * @summary Delete the metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Delete.json + * @summary delete the metrics configuration of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Delete.json */ async function deleteMetricsConfigurationOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginDeleteAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, + const result = await client.metricsConfigurations.delete( + "resourceGroupName", + "clusterName", + "default", ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsGetSample.ts index e686a29bcbf5..1c6786ae421d 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsGetSample.ts @@ -3,28 +3,21 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get metrics configuration of the provided cluster. + * This sample demonstrates how to get metrics configuration of the provided cluster. * - * @summary Get metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Get.json + * @summary get metrics configuration of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Get.json */ async function getMetricsConfigurationOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const result = await client.metricsConfigurations.get( - resourceGroupName, - clusterName, - metricsConfigurationName, + "resourceGroupName", + "clusterName", + "default", ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsListByClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsListByClusterSample.ts index 5553dc3315fc..3af267d23200 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsListByClusterSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsListByClusterSample.ts @@ -3,30 +3,25 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of metrics configurations for the provided cluster. + * This sample demonstrates how to get a list of metrics configurations for the provided cluster. * - * @summary Get a list of metrics configurations for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_ListByCluster.json + * @summary get a list of metrics configurations for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_ListByCluster.json */ async function listMetricsConfigurationsOfTheCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.metricsConfigurations.listByCluster( - resourceGroupName, - clusterName, + "resourceGroupName", + "clusterName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsUpdateSample.ts index 6d3bc33a9d9a..7c532bc00cd7 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsUpdateSample.ts @@ -1,45 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - ClusterMetricsConfigurationPatchParameters, - MetricsConfigurationsUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. + * This sample demonstrates how to patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. * - * @summary Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Patch.json + * @summary patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Patch.json */ async function patchMetricsConfigurationOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const metricsConfigurationUpdateParameters: ClusterMetricsConfigurationPatchParameters = - { - collectionInterval: 15, - enabledMetrics: ["metric1", "metric2"], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: MetricsConfigurationsUpdateOptionalParams = { - metricsConfigurationUpdateParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginUpdateAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - options, + const result = await client.metricsConfigurations.update( + "resourceGroupName", + "clusterName", + "default", + { + metricsConfigurationUpdateParameters: { + collectionInterval: 15, + enabledMetrics: ["metric1", "metric2"], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/operationsListSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/operationsListSample.ts index 80d3e84ced11..48b1fc1325d1 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/operationsListSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/operationsListSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of all available resource provider operations. It contains a URL link to get the next set of results. + * This sample demonstrates how to list the operations for the provider * - * @summary Get a list of all available resource provider operations. It contains a URL link to get the next set of results. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Operations_List.json + * @summary list the operations for the provider + * x-ms-original-file: 2026-05-01-preview/Operations_List.json */ async function listResourceProviderOperations(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.operations.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/rackSkusGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/rackSkusGetSample.ts index aedb6cb34f2c..900e7ec7d930 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/rackSkusGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/rackSkusGetSample.ts @@ -3,27 +3,23 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get the properties of the provided rack SKU. + * This sample demonstrates how to get the properties of the provided rack SKU. * - * @summary Get the properties of the provided rack SKU. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/RackSkus_Get.json + * @summary get the properties of the provided rack SKU. + * x-ms-original-file: 2026-05-01-preview/RackSkus_Get.json */ -async function getRackSkuResource(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const rackSkuName = "rackSkuName"; +async function getRackSKUResource(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.rackSkus.get(rackSkuName); + const result = await client.rackSkus.get("rackSkuName"); console.log(result); } async function main(): Promise { - await getRackSkuResource(); + await getRackSKUResource(); } main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/rackSkusListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/rackSkusListBySubscriptionSample.ts index 4d6cd3596a0e..f68241ad55ce 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/rackSkusListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/rackSkusListBySubscriptionSample.ts @@ -3,29 +3,27 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of rack SKUs in the provided subscription. + * This sample demonstrates how to get a list of rack SKUs in the provided subscription. * - * @summary Get a list of rack SKUs in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/RackSkus_ListBySubscription.json + * @summary get a list of rack SKUs in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/RackSkus_ListBySubscription.json */ -async function listRackSkUsForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; +async function listRackSKUsForSubscription(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.rackSkus.listBySubscription()) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await listRackSkUsForSubscription(); + await listRackSKUsForSubscription(); } main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/racksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/racksCreateOrUpdateSample.ts index 8db6de5a4ed3..5ef7759e12bb 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/racksCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/racksCreateOrUpdateSample.ts @@ -1,44 +1,32 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { Rack} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * This sample demonstrates how to create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. * - * @summary Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Create.json + * @summary create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/Racks_Create.json */ async function createOrUpdateRack(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const rackParameters: Rack = { - availabilityZone: "1", + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.racks.createOrUpdate("resourceGroupName", "rackName", { extendedLocation: { name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", type: "CustomLocation", }, location: "location", + availabilityZone: "1", rackLocation: "Rack 28", rackSerialNumber: "RACK_SERIAL_NUMBER", rackSkuId: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginCreateOrUpdateAndWait( - resourceGroupName, - rackName, - rackParameters, - ); + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/racksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/racksDeleteSample.ts index dc19d9b27f61..160c2b343a3f 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/racksDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/racksDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * This sample demonstrates how to delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. * - * @summary Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Delete.json + * @summary delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/Racks_Delete.json */ async function deleteRack(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginDeleteAndWait( - resourceGroupName, - rackName, - ); + const result = await client.racks.delete("resourceGroupName", "rackName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/racksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/racksGetSample.ts index b102632188f4..4403eebfd4df 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/racksGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/racksGetSample.ts @@ -3,24 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get properties of the provided rack. + * This sample demonstrates how to get properties of the provided rack. * - * @summary Get properties of the provided rack. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Get.json + * @summary get properties of the provided rack. + * x-ms-original-file: 2026-05-01-preview/Racks_Get.json */ async function getRack(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.get(resourceGroupName, rackName); + const result = await client.racks.get("resourceGroupName", "rackName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/racksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/racksListByResourceGroupSample.ts index 8b2f34e0129a..1cb255126dbf 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/racksListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/racksListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of racks in the provided resource group. + * This sample demonstrates how to get a list of racks in the provided resource group. * - * @summary Get a list of racks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_ListByResourceGroup.json + * @summary get a list of racks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/Racks_ListByResourceGroup.json */ async function listRacksForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.racks.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.racks.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/racksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/racksListBySubscriptionSample.ts index 9d77d4579a40..2832922f9efa 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/racksListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/racksListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of racks in the provided subscription. + * This sample demonstrates how to get a list of racks in the provided subscription. * - * @summary Get a list of racks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_ListBySubscription.json + * @summary get a list of racks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/Racks_ListBySubscription.json */ async function listRacksForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.racks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/racksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/racksUpdateSample.ts index daa0ff95f979..0193d70459e8 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/racksUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/racksUpdateSample.ts @@ -1,41 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - RackPatchParameters, - RacksUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. + * This sample demonstrates how to patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. * - * @summary Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Patch.json + * @summary patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Racks_Patch.json */ async function patchRack(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const rackUpdateParameters: RackPatchParameters = { - rackLocation: "Rack 2B", - rackSerialNumber: "RACK_SERIAL_NUMBER", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: RacksUpdateOptionalParams = { rackUpdateParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginUpdateAndWait( - resourceGroupName, - rackName, - options, - ); + const result = await client.racks.update("resourceGroupName", "rackName", { + rackUpdateParameters: { + rackLocation: "Rack 2B", + rackSerialNumber: "RACK_SERIAL_NUMBER", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesCreateOrUpdateSample.ts index b1c40f2591fc..c3923183212e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesCreateOrUpdateSample.ts @@ -1,44 +1,36 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { StorageAppliance} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * This sample demonstrates how to create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. * - * @summary Create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Create.json + * @summary create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Create.json */ async function createOrUpdateStorageAppliance(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceParameters: StorageAppliance = { - administratorCredentials: { password: "{password}", username: "adminUser" }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - rackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceSkuId: "684E-3B16-399E", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - storageApplianceName, - storageApplianceParameters, + const result = await client.storageAppliances.createOrUpdate( + "resourceGroupName", + "storageApplianceName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + administratorCredentials: { password: "{password}", username: "adminUser" }, + rackId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", + rackSlot: 1, + serialNumber: "BM1219XXX", + storageApplianceSkuId: "684E-3B16-399E", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesDeleteSample.ts index f57ca4d3e344..6c74013a79e7 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * This sample demonstrates how to delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. * - * @summary Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Delete.json + * @summary delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Delete.json */ async function deleteStorageAppliance(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginDeleteAndWait( - resourceGroupName, - storageApplianceName, - ); + const result = await client.storageAppliances.delete("resourceGroupName", "storageApplianceName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesDisableRemoteVendorManagementSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesDisableRemoteVendorManagementSample.ts index e8f70ef38154..758c1c22d334 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesDisableRemoteVendorManagementSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesDisableRemoteVendorManagementSample.ts @@ -3,28 +3,21 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Disable remote vendor management of the provided storage appliance. + * This sample demonstrates how to disable remote vendor management of the provided storage appliance. * - * @summary Disable remote vendor management of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_DisableRemoteVendorManagement.json + * @summary disable remote vendor management of the provided storage appliance. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_DisableRemoteVendorManagement.json */ async function turnOffRemoteVendorManagementForStorageAppliance(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.storageAppliances.beginDisableRemoteVendorManagementAndWait( - resourceGroupName, - storageApplianceName, - ); + const result = await client.storageAppliances.disableRemoteVendorManagement( + "resourceGroupName", + "storageApplianceName", + ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesEnableRemoteVendorManagementSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesEnableRemoteVendorManagementSample.ts index 832d1508d9d6..a6a014b1b59e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesEnableRemoteVendorManagementSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesEnableRemoteVendorManagementSample.ts @@ -1,41 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - StorageApplianceEnableRemoteVendorManagementParameters, - StorageAppliancesEnableRemoteVendorManagementOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Enable remote vendor management of the provided storage appliance. + * This sample demonstrates how to enable remote vendor management of the provided storage appliance. * - * @summary Enable remote vendor management of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_EnableRemoteVendorManagement.json + * @summary enable remote vendor management of the provided storage appliance. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_EnableRemoteVendorManagement.json */ async function turnOnRemoteVendorManagementForStorageAppliance(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceEnableRemoteVendorManagementParameters: StorageApplianceEnableRemoteVendorManagementParameters = - { supportEndpoints: ["10.0.0.0/24"] }; - const options: StorageAppliancesEnableRemoteVendorManagementOptionalParams = { - storageApplianceEnableRemoteVendorManagementParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.storageAppliances.beginEnableRemoteVendorManagementAndWait( - resourceGroupName, - storageApplianceName, - options, - ); + const result = await client.storageAppliances.enableRemoteVendorManagement( + "resourceGroupName", + "storageApplianceName", + { + storageApplianceEnableRemoteVendorManagementParameters: { supportEndpoints: ["10.0.0.0/24"] }, + }, + ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesGetSample.ts index 928b6322643e..a3a0868ecff3 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesGetSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get properties of the provided storage appliance. + * This sample demonstrates how to get properties of the provided storage appliance. * - * @summary Get properties of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Get.json + * @summary get properties of the provided storage appliance. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Get.json */ async function getStorageAppliance(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.get( - resourceGroupName, - storageApplianceName, - ); + const result = await client.storageAppliances.get("resourceGroupName", "storageApplianceName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesListByResourceGroupSample.ts index a1618fc429c4..9083a4ef75d9 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of storage appliances in the provided resource group. + * This sample demonstrates how to get a list of storage appliances in the provided resource group. * - * @summary Get a list of storage appliances in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_ListByResourceGroup.json + * @summary get a list of storage appliances in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_ListByResourceGroup.json */ async function listStorageAppliancesForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.storageAppliances.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.storageAppliances.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesListBySubscriptionSample.ts index 5bf07998a8cd..64ded566095d 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of storage appliances in the provided subscription. + * This sample demonstrates how to get a list of storage appliances in the provided subscription. * - * @summary Get a list of storage appliances in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_ListBySubscription.json + * @summary get a list of storage appliances in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_ListBySubscription.json */ async function listStorageAppliancesForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.storageAppliances.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesRunReadCommandsSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesRunReadCommandsSample.ts index b072f091f364..a5c0ff54468a 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesRunReadCommandsSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesRunReadCommandsSample.ts @@ -1,43 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - StorageApplianceRunReadCommandsParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Run one or more read-only commands on the provided storage appliance. + * This sample demonstrates how to run one or more read-only commands on the provided storage appliance. * - * @summary Run one or more read-only commands on the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_RunReadCommands.json + * @summary run one or more read-only commands on the provided storage appliance. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_RunReadCommands.json */ async function runAndRetrieveOutputFromReadOnlyCommandsOnStorageAppliance(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters = - { - limitTimeSeconds: 60, - commands: [ - { - arguments: ["list", "--filter", "state='open'"], - command: "purealert", - }, - ], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginRunReadCommandsAndWait( - resourceGroupName, - storageApplianceName, - storageApplianceRunReadCommandsParameters, + const result = await client.storageAppliances.runReadCommands( + "resourceGroupName", + "storageApplianceName", + { + commands: [{ arguments: ["list", "--filter", "state='open'"], command: "purealert" }], + limitTimeSeconds: 60, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesUpdateSample.ts index 8f7835f30b79..6f198c9dfdf1 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesUpdateSample.ts @@ -1,41 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - StorageAppliancePatchParameters, - StorageAppliancesUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. + * This sample demonstrates how to update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. * - * @summary Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Patch.json + * @summary update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Patch.json */ async function patchStorageAppliance(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceUpdateParameters: StorageAppliancePatchParameters = { - serialNumber: "BM1219XXX", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: StorageAppliancesUpdateOptionalParams = { - storageApplianceUpdateParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginUpdateAndWait( - resourceGroupName, - storageApplianceName, - options, + const result = await client.storageAppliances.update( + "resourceGroupName", + "storageApplianceName", + { + storageApplianceUpdateParameters: { + serialNumber: "BM1219XXX", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksCreateOrUpdateSample.ts index 20eeda605003..0007a0fad270 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksCreateOrUpdateSample.ts @@ -1,44 +1,36 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { TrunkedNetwork} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new trunked network or update the properties of the existing trunked network. + * This sample demonstrates how to create a new trunked network or update the properties of the existing trunked network. * - * @summary Create a new trunked network or update the properties of the existing trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Create.json + * @summary create a new trunked network or update the properties of the existing trunked network. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Create.json */ async function createOrUpdateTrunkedNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const trunkedNetworkParameters: TrunkedNetwork = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - interfaceName: "eth0", - isolationDomainIds: [ - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", - ], - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - vlans: [12, 14], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - trunkedNetworkName, - trunkedNetworkParameters, + const result = await client.trunkedNetworks.createOrUpdate( + "resourceGroupName", + "trunkedNetworkName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + interfaceName: "eth0", + isolationDomainIds: [ + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", + ], + vlans: [12, 14], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksDeleteSample.ts index e86867063de0..15fdbe48e5bb 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided trunked network. + * This sample demonstrates how to delete the provided trunked network. * - * @summary Delete the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Delete.json + * @summary delete the provided trunked network. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Delete.json */ async function deleteTrunkedNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.beginDeleteAndWait( - resourceGroupName, - trunkedNetworkName, - ); + const result = await client.trunkedNetworks.delete("resourceGroupName", "trunkedNetworkName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksGetSample.ts index 0fd34e510712..cac1e40a6d3c 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksGetSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get properties of the provided trunked network. + * This sample demonstrates how to get properties of the provided trunked network. * - * @summary Get properties of the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Get.json + * @summary get properties of the provided trunked network. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Get.json */ async function getTrunkedNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.get( - resourceGroupName, - trunkedNetworkName, - ); + const result = await client.trunkedNetworks.get("resourceGroupName", "trunkedNetworkName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksListByResourceGroupSample.ts index 801dc49a7421..9e25e194f910 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of trunked networks in the provided resource group. + * This sample demonstrates how to get a list of trunked networks in the provided resource group. * - * @summary Get a list of trunked networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_ListByResourceGroup.json + * @summary get a list of trunked networks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_ListByResourceGroup.json */ async function listTrunkedNetworksForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.trunkedNetworks.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.trunkedNetworks.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksListBySubscriptionSample.ts index 34edfd280514..d8d0dd798836 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of trunked networks in the provided subscription. + * This sample demonstrates how to get a list of trunked networks in the provided subscription. * - * @summary Get a list of trunked networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_ListBySubscription.json + * @summary get a list of trunked networks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_ListBySubscription.json */ async function listTrunkedNetworksForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.trunkedNetworks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksUpdateSample.ts index 9a9760d2ce30..0dcd5b530eaa 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksUpdateSample.ts @@ -1,41 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - TrunkedNetworkPatchParameters, - TrunkedNetworksUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update tags associated with the provided trunked network. + * This sample demonstrates how to update tags associated with the provided trunked network. * - * @summary Update tags associated with the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Patch.json + * @summary update tags associated with the provided trunked network. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Patch.json */ async function patchTrunkedNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const trunkedNetworkUpdateParameters: TrunkedNetworkPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: TrunkedNetworksUpdateOptionalParams = { - trunkedNetworkUpdateParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.update( - resourceGroupName, - trunkedNetworkName, - options, - ); + const result = await client.trunkedNetworks.update("resourceGroupName", "trunkedNetworkName", { + trunkedNetworkUpdateParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesAssignRelaySample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesAssignRelaySample.ts index c66b78eeed8e..930d26255d3e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesAssignRelaySample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesAssignRelaySample.ts @@ -1,43 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualMachineAssignRelayParameters, - VirtualMachinesAssignRelayOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. + * This sample demonstrates how to assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. * - * @summary Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_AssignRelay.json + * @summary assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_AssignRelay.json */ async function assignRelayToTheMicrosoftHybridComputeMachineForAVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineAssignRelayParameters: VirtualMachineAssignRelayParameters = - { - machineId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.HybridCompute/machines/machineName", - relayType: "Platform", - }; - const options: VirtualMachinesAssignRelayOptionalParams = { - virtualMachineAssignRelayParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginAssignRelayAndWait( - resourceGroupName, - virtualMachineName, - options, + const result = await client.virtualMachines.assignRelay( + "resourceGroupName", + "virtualMachineName", + { + virtualMachineAssignRelayParameters: { + machineId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.HybridCompute/machines/machineName", + relayType: "Platform", + }, + }, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesCreateOrUpdateSample.ts index e162998cd1c3..c8d81143cada 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesCreateOrUpdateSample.ts @@ -1,99 +1,87 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { VirtualMachine} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new virtual machine or update the properties of the existing virtual machine. + * This sample demonstrates how to create a new virtual machine or update the properties of the existing virtual machine. * - * @summary Create a new virtual machine or update the properties of the existing virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Create.json + * @summary create a new virtual machine or update the properties of the existing virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Create.json */ async function createOrUpdateVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineParameters: VirtualMachine = { - adminUsername: "username", - bootMethod: "UEFI", - cloudServicesNetworkAttachment: { - attachedNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - ipAllocationMethod: "Dynamic", - }, - cpuCores: 2, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.createOrUpdate( + "resourceGroupName", + "virtualMachineName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", }, - }, - location: "location", - memorySizeGB: 8, - networkAttachments: [ - { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + }, + }, + location: "location", + adminUsername: "username", + bootMethod: "UEFI", + cloudServicesNetworkAttachment: { attachedNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - defaultGateway: "True", + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", ipAllocationMethod: "Dynamic", - ipv4Address: "198.51.100.1", - ipv6Address: "2001:0db8:0000:0000:0000:0000:0000:0000", - networkAttachmentName: "netAttachName01", - }, - ], - networkDataContent: "bmV0d29ya0RhdGVTYW1wbGU=", - placementHints: [ - { - hintType: "Affinity", - resourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - schedulingExecution: "Hard", - scope: "", }, - ], - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + cpuCores: 2, + memorySizeGB: 8, + networkAttachments: [ + { + attachedNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + defaultGateway: "True", + ipAllocationMethod: "Dynamic", + ipv4Address: "198.51.100.1", + ipv6Address: "2001:0db8:0000:0000:0000:0000:0000:0000", + networkAttachmentName: "netAttachName01", + }, + ], + networkDataContent: "bmV0d29ya0RhdGVTYW1wbGU=", + placementHints: [ + { + hintType: "Affinity", + resourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", + schedulingExecution: "Hard", + scope: "", + }, + ], + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + storageProfile: { + osDisk: { createOption: "Ephemeral", deleteOption: "Delete", diskSizeGB: 120 }, + volumeAttachments: [ + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName", + ], }, - ], - storageProfile: { - osDisk: { - createOption: "Ephemeral", - deleteOption: "Delete", - diskSizeGB: 120, + userDataContent: "dXNlckRhdGVTYW1wbGU=", + vmDeviceModel: "T2", + vmImage: "myacr.azurecr.io/foobar:latest", + vmImageRepositoryCredentials: { + password: "{password}", + registryUrl: "myacr.azurecr.io", + username: "myuser", }, - volumeAttachments: [ - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName", - ], + tags: { key1: "myvalue1", key2: "myvalue2" }, }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - userDataContent: "dXNlckRhdGVTYW1wbGU=", - vmDeviceModel: "T2", - vmImage: "myacr.azurecr.io/foobar:latest", - vmImageRepositoryCredentials: { - password: "{password}", - registryUrl: "myacr.azurecr.io", - username: "myuser", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineName, - virtualMachineParameters, ); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesDeleteSample.ts index e45ba4c90bf7..4da589bc5903 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided virtual machine. + * This sample demonstrates how to delete the provided virtual machine. * - * @summary Delete the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Delete.json + * @summary delete the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Delete.json */ async function deleteVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - ); + const result = await client.virtualMachines.delete("resourceGroupName", "virtualMachineName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesGetSample.ts index a96ce83d8161..defea4835113 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesGetSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get properties of the provided virtual machine. + * This sample demonstrates how to get properties of the provided virtual machine. * - * @summary Get properties of the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Get.json + * @summary get properties of the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Get.json */ async function getVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.get( - resourceGroupName, - virtualMachineName, - ); + const result = await client.virtualMachines.get("resourceGroupName", "virtualMachineName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesListByResourceGroupSample.ts index ab8b11f70219..b3211e4a70da 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of virtual machines in the provided resource group. + * This sample demonstrates how to get a list of virtual machines in the provided resource group. * - * @summary Get a list of virtual machines in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_ListByResourceGroup.json + * @summary get a list of virtual machines in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_ListByResourceGroup.json */ async function listVirtualMachinesForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualMachines.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.virtualMachines.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesListBySubscriptionSample.ts index d371d6804330..2192fdadca4f 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of virtual machines in the provided subscription. + * This sample demonstrates how to get a list of virtual machines in the provided subscription. * - * @summary Get a list of virtual machines in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_ListBySubscription.json + * @summary get a list of virtual machines in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_ListBySubscription.json */ async function listVirtualMachinesForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.virtualMachines.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesPowerOffSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesPowerOffSample.ts index 10b18fb628b6..e4241a795c97 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesPowerOffSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesPowerOffSample.ts @@ -1,41 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualMachinePowerOffParameters, - VirtualMachinesPowerOffOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Power off the provided virtual machine. + * This sample demonstrates how to power off the provided virtual machine. * - * @summary Power off the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_PowerOff.json + * @summary power off the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_PowerOff.json */ async function powerOffVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachinePowerOffParameters: VirtualMachinePowerOffParameters = { - skipShutdown: "True", - }; - const options: VirtualMachinesPowerOffOptionalParams = { - virtualMachinePowerOffParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginPowerOffAndWait( - resourceGroupName, - virtualMachineName, - options, - ); + const result = await client.virtualMachines.powerOff("resourceGroupName", "virtualMachineName", { + virtualMachinePowerOffParameters: { skipShutdown: "True" }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesReimageSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesReimageSample.ts index 14e0ea0b53ba..e6f830320d3c 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesReimageSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesReimageSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Reimage the provided virtual machine. + * This sample demonstrates how to reimage the provided virtual machine. * - * @summary Reimage the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Reimage.json + * @summary reimage the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Reimage.json */ async function reimageVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginReimageAndWait( - resourceGroupName, - virtualMachineName, - ); + const result = await client.virtualMachines.reimage("resourceGroupName", "virtualMachineName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesRestartSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesRestartSample.ts index 0c6038ab0f02..f8228bda48ca 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesRestartSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesRestartSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Restart the provided virtual machine. + * This sample demonstrates how to restart the provided virtual machine. * - * @summary Restart the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Restart.json + * @summary restart the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Restart.json */ async function restartVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginRestartAndWait( - resourceGroupName, - virtualMachineName, - ); + const result = await client.virtualMachines.restart("resourceGroupName", "virtualMachineName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesStartSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesStartSample.ts index 23bed891fcdf..128b32f4cae9 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesStartSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesStartSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Start the provided virtual machine. + * This sample demonstrates how to start the provided virtual machine. * - * @summary Start the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Start.json + * @summary start the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Start.json */ async function startVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginStartAndWait( - resourceGroupName, - virtualMachineName, - ); + const result = await client.virtualMachines.start("resourceGroupName", "virtualMachineName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesUpdateSample.ts index 083c274fa4fa..bdea6add8d0b 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesUpdateSample.ts @@ -1,53 +1,36 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VirtualMachinePatchParameters, - VirtualMachinesUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to 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. + * This sample demonstrates how to 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. * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Patch.json + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Patch.json */ async function patchVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineUpdateParameters: VirtualMachinePatchParameters = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - vmImageRepositoryCredentials: { - password: "{password}", - registryUrl: "myacr.azurecr.io", - username: "myuser", - }, - }; - const options: VirtualMachinesUpdateOptionalParams = { - virtualMachineUpdateParameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - options, - ); + const result = await client.virtualMachines.update("resourceGroupName", "virtualMachineName", { + virtualMachineUpdateParameters: { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + }, + }, + vmImageRepositoryCredentials: { + password: "{password}", + registryUrl: "myacr.azurecr.io", + username: "myuser", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesCreateOrUpdateSample.ts index 35201771d498..334569695105 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesCreateOrUpdateSample.ts @@ -1,25 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { Volume} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new volume or update the properties of the existing one. + * This sample demonstrates how to create a new volume or update the properties of the existing one. * - * @summary Create a new volume or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Create.json + * @summary create a new volume or update the properties of the existing one. + * x-ms-original-file: 2026-05-01-preview/Volumes_Create.json */ async function createOrUpdateVolume(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const volumeParameters: Volume = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.volumes.createOrUpdate("resourceGroupName", "volumeName", { extendedLocation: { name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", type: "CustomLocation", @@ -27,16 +22,9 @@ async function createOrUpdateVolume(): Promise { location: "location", sizeMiB: 1048576, storageApplianceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName", + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName", tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.beginCreateOrUpdateAndWait( - resourceGroupName, - volumeName, - volumeParameters, - ); + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesDeleteSample.ts index efbbd0598649..bddd2cb1097e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided volume. + * This sample demonstrates how to delete the provided volume. * - * @summary Delete the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Delete.json + * @summary delete the provided volume. + * x-ms-original-file: 2026-05-01-preview/Volumes_Delete.json */ async function deleteVolume(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.beginDeleteAndWait( - resourceGroupName, - volumeName, - ); + const result = await client.volumes.delete("resourceGroupName", "volumeName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesGetSample.ts index 30139145b76c..baa7f93d5dc6 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesGetSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesGetSample.ts @@ -3,24 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get properties of the provided volume. + * This sample demonstrates how to get properties of the provided volume. * - * @summary Get properties of the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Get.json + * @summary get properties of the provided volume. + * x-ms-original-file: 2026-05-01-preview/Volumes_Get.json */ async function getVolume(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.get(resourceGroupName, volumeName); + const result = await client.volumes.get("resourceGroupName", "volumeName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesListByResourceGroupSample.ts index c19c9f0f754a..a6cd0cd208cc 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of volumes in the provided resource group. + * This sample demonstrates how to get a list of volumes in the provided resource group. * - * @summary Get a list of volumes in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_ListByResourceGroup.json + * @summary get a list of volumes in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/Volumes_ListByResourceGroup.json */ async function listVolumesForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.volumes.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.volumes.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesListBySubscriptionSample.ts index 5906d8a9ca4c..773a16c2b918 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of volumes in the provided subscription. + * This sample demonstrates how to get a list of volumes in the provided subscription. * - * @summary Get a list of volumes in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_ListBySubscription.json + * @summary get a list of volumes in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/Volumes_ListBySubscription.json */ async function listVolumeForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.volumes.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesUpdateSample.ts index f856d2e73e1d..8fefce6625fb 100644 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesUpdateSample.ts @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { - VolumePatchParameters, - VolumesUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; +import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Update tags associated with the provided volume. + * This sample demonstrates how to update tags associated with the provided volume. * - * @summary Update tags associated with the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Patch.json + * @summary update tags associated with the provided volume. + * x-ms-original-file: 2026-05-01-preview/Volumes_Patch.json */ async function patchVolume(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const volumeUpdateParameters: VolumePatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: VolumesUpdateOptionalParams = { volumeUpdateParameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.update( - resourceGroupName, - volumeName, - options, - ); + const result = await client.volumes.update("resourceGroupName", "volumeName", { + volumeUpdateParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/README.md b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/README.md deleted file mode 100644 index 81e16ccbb583..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/README.md +++ /dev/null @@ -1,306 +0,0 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [agentPoolsCreateOrUpdateSample.js][agentpoolscreateorupdatesample] | Create a new Kubernetes cluster agent pool or update the properties of the existing one. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Create.json | -| [agentPoolsDeleteSample.js][agentpoolsdeletesample] | Delete the provided Kubernetes cluster agent pool. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Delete.json | -| [agentPoolsGetSample.js][agentpoolsgetsample] | Get properties of the provided Kubernetes cluster agent pool. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Get.json | -| [agentPoolsListByKubernetesClusterSample.js][agentpoolslistbykubernetesclustersample] | Get a list of agent pools for the provided Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_ListByKubernetesCluster.json | -| [agentPoolsUpdateSample.js][agentpoolsupdatesample] | 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. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Patch.json | -| [bareMetalMachineKeySetsCreateOrUpdateSample.js][baremetalmachinekeysetscreateorupdatesample] | Create a new bare metal machine key set or update the existing one for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Create.json | -| [bareMetalMachineKeySetsDeleteSample.js][baremetalmachinekeysetsdeletesample] | Delete the bare metal machine key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Delete.json | -| [bareMetalMachineKeySetsGetSample.js][baremetalmachinekeysetsgetsample] | Get bare metal machine key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Get.json | -| [bareMetalMachineKeySetsListByClusterSample.js][baremetalmachinekeysetslistbyclustersample] | Get a list of bare metal machine key sets for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_ListByCluster.json | -| [bareMetalMachineKeySetsUpdateSample.js][baremetalmachinekeysetsupdatesample] | 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. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Patch.json | -| [bareMetalMachinesCordonSample.js][baremetalmachinescordonsample] | Cordon the provided bare metal machine's Kubernetes node. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Cordon.json | -| [bareMetalMachinesCreateOrUpdateSample.js][baremetalmachinescreateorupdatesample] | Create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Create.json | -| [bareMetalMachinesDeleteSample.js][baremetalmachinesdeletesample] | Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Delete.json | -| [bareMetalMachinesGetSample.js][baremetalmachinesgetsample] | Get properties of the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Get.json | -| [bareMetalMachinesListByResourceGroupSample.js][baremetalmachineslistbyresourcegroupsample] | Get a list of bare metal machines in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_ListByResourceGroup.json | -| [bareMetalMachinesListBySubscriptionSample.js][baremetalmachineslistbysubscriptionsample] | Get a list of bare metal machines in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_ListBySubscription.json | -| [bareMetalMachinesPowerOffSample.js][baremetalmachinespoweroffsample] | Power off the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_PowerOff.json | -| [bareMetalMachinesReimageSample.js][baremetalmachinesreimagesample] | Reimage the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Reimage.json | -| [bareMetalMachinesReplaceSample.js][baremetalmachinesreplacesample] | Replace the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Replace.json | -| [bareMetalMachinesRestartSample.js][baremetalmachinesrestartsample] | Restart the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Restart.json | -| [bareMetalMachinesRunCommandSample.js][baremetalmachinesruncommandsample] | Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunCommand.json | -| [bareMetalMachinesRunDataExtractsRestrictedSample.js][baremetalmachinesrundataextractsrestrictedsample] | Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunDataExtractsRestricted.json | -| [bareMetalMachinesRunDataExtractsSample.js][baremetalmachinesrundataextractssample] | Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunDataExtracts.json | -| [bareMetalMachinesRunReadCommandsSample.js][baremetalmachinesrunreadcommandssample] | Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunReadCommands_Hostname.json | -| [bareMetalMachinesStartSample.js][baremetalmachinesstartsample] | Start the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Start.json | -| [bareMetalMachinesUncordonSample.js][baremetalmachinesuncordonsample] | Uncordon the provided bare metal machine's Kubernetes node. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Uncordon.json | -| [bareMetalMachinesUpdateSample.js][baremetalmachinesupdatesample] | Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Patch.json | -| [bmcKeySetsCreateOrUpdateSample.js][bmckeysetscreateorupdatesample] | Create a new baseboard management controller key set or update the existing one for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Create.json | -| [bmcKeySetsDeleteSample.js][bmckeysetsdeletesample] | Delete the baseboard management controller key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Delete.json | -| [bmcKeySetsGetSample.js][bmckeysetsgetsample] | Get baseboard management controller key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Get.json | -| [bmcKeySetsListByClusterSample.js][bmckeysetslistbyclustersample] | Get a list of baseboard management controller key sets for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_ListByCluster.json | -| [bmcKeySetsUpdateSample.js][bmckeysetsupdatesample] | 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. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Patch.json | -| [cloudServicesNetworksCreateOrUpdateSample.js][cloudservicesnetworkscreateorupdatesample] | Create a new cloud services network or update the properties of the existing cloud services network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Create.json | -| [cloudServicesNetworksDeleteSample.js][cloudservicesnetworksdeletesample] | Delete the provided cloud services network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Delete.json | -| [cloudServicesNetworksGetSample.js][cloudservicesnetworksgetsample] | Get properties of the provided cloud services network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Get.json | -| [cloudServicesNetworksListByResourceGroupSample.js][cloudservicesnetworkslistbyresourcegroupsample] | Get a list of cloud services networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_ListByResourceGroup.json | -| [cloudServicesNetworksListBySubscriptionSample.js][cloudservicesnetworkslistbysubscriptionsample] | Get a list of cloud services networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_ListBySubscription.json | -| [cloudServicesNetworksUpdateSample.js][cloudservicesnetworksupdatesample] | Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Patch.json | -| [clusterManagersCreateOrUpdateSample.js][clustermanagerscreateorupdatesample] | Create a new cluster manager or update properties of the cluster manager if it exists. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Create.json | -| [clusterManagersDeleteSample.js][clustermanagersdeletesample] | Delete the provided cluster manager. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Delete.json | -| [clusterManagersGetSample.js][clustermanagersgetsample] | Get the properties of the provided cluster manager. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Get.json | -| [clusterManagersListByResourceGroupSample.js][clustermanagerslistbyresourcegroupsample] | Get a list of cluster managers in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_ListByResourceGroup.json | -| [clusterManagersListBySubscriptionSample.js][clustermanagerslistbysubscriptionsample] | Get a list of cluster managers in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_ListBySubscription.json | -| [clusterManagersUpdateSample.js][clustermanagersupdatesample] | Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Patch.json | -| [clustersContinueUpdateVersionSample.js][clusterscontinueupdateversionsample] | Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ContinueUpdateVersion.json | -| [clustersCreateOrUpdateSample.js][clusterscreateorupdatesample] | Create a new cluster or update the properties of the cluster if it exists. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Create.json | -| [clustersDeleteSample.js][clustersdeletesample] | Delete the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Delete.json | -| [clustersDeploySample.js][clustersdeploysample] | Deploy the cluster using the rack configuration provided during creation. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Deploy.json | -| [clustersGetSample.js][clustersgetsample] | Get properties of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Get.json | -| [clustersListByResourceGroupSample.js][clusterslistbyresourcegroupsample] | Get a list of clusters in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ListByResourceGroup.json | -| [clustersListBySubscriptionSample.js][clusterslistbysubscriptionsample] | Get a list of clusters in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ListBySubscription.json | -| [clustersScanRuntimeSample.js][clustersscanruntimesample] | Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ScanRuntime.json | -| [clustersUpdateSample.js][clustersupdatesample] | Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.json | -| [clustersUpdateVersionSample.js][clustersupdateversionsample] | Update the version of the provided cluster to one of the available supported versions. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_UpdateVersion.json | -| [consolesCreateOrUpdateSample.js][consolescreateorupdatesample] | Create a new virtual machine console or update the properties of the existing virtual machine console. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Create.json | -| [consolesDeleteSample.js][consolesdeletesample] | Delete the provided virtual machine console. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Delete.json | -| [consolesGetSample.js][consolesgetsample] | Get properties of the provided virtual machine console. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Get.json | -| [consolesListByVirtualMachineSample.js][consoleslistbyvirtualmachinesample] | Get a list of consoles for the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_ListByVirtualMachine.json | -| [consolesUpdateSample.js][consolesupdatesample] | 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. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Patch.json | -| [kubernetesClusterFeaturesCreateOrUpdateSample.js][kubernetesclusterfeaturescreateorupdatesample] | Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Create.json | -| [kubernetesClusterFeaturesDeleteSample.js][kubernetesclusterfeaturesdeletesample] | Delete the provided Kubernetes cluster feature. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Delete.json | -| [kubernetesClusterFeaturesGetSample.js][kubernetesclusterfeaturesgetsample] | Get properties of the provided the Kubernetes cluster feature. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Get.json | -| [kubernetesClusterFeaturesListByKubernetesClusterSample.js][kubernetesclusterfeatureslistbykubernetesclustersample] | Get a list of features for the provided Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_ListByKubernetesCluster.json | -| [kubernetesClusterFeaturesUpdateSample.js][kubernetesclusterfeaturesupdatesample] | Patch properties of the provided Kubernetes cluster feature. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Patch.json | -| [kubernetesClustersCreateOrUpdateSample.js][kubernetesclusterscreateorupdatesample] | Create a new Kubernetes cluster or update the properties of the existing one. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Create.json | -| [kubernetesClustersDeleteSample.js][kubernetesclustersdeletesample] | Delete the provided Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Delete.json | -| [kubernetesClustersGetSample.js][kubernetesclustersgetsample] | Get properties of the provided the Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Get.json | -| [kubernetesClustersListByResourceGroupSample.js][kubernetesclusterslistbyresourcegroupsample] | Get a list of Kubernetes clusters in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_ListByResourceGroup.json | -| [kubernetesClustersListBySubscriptionSample.js][kubernetesclusterslistbysubscriptionsample] | Get a list of Kubernetes clusters in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_ListBySubscription.json | -| [kubernetesClustersRestartNodeSample.js][kubernetesclustersrestartnodesample] | Restart a targeted node of a Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_RestartNode.json | -| [kubernetesClustersUpdateSample.js][kubernetesclustersupdatesample] | Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Patch.json | -| [l2NetworksCreateOrUpdateSample.js][l2networkscreateorupdatesample] | Create a new layer 2 (L2) network or update the properties of the existing network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Create.json | -| [l2NetworksDeleteSample.js][l2networksdeletesample] | Delete the provided layer 2 (L2) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Delete.json | -| [l2NetworksGetSample.js][l2networksgetsample] | Get properties of the provided layer 2 (L2) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Get.json | -| [l2NetworksListByResourceGroupSample.js][l2networkslistbyresourcegroupsample] | Get a list of layer 2 (L2) networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_ListByResourceGroup.json | -| [l2NetworksListBySubscriptionSample.js][l2networkslistbysubscriptionsample] | Get a list of layer 2 (L2) networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_ListBySubscription.json | -| [l2NetworksUpdateSample.js][l2networksupdatesample] | Update tags associated with the provided layer 2 (L2) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Patch.json | -| [l3NetworksCreateOrUpdateSample.js][l3networkscreateorupdatesample] | Create a new layer 3 (L3) network or update the properties of the existing network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Create.json | -| [l3NetworksDeleteSample.js][l3networksdeletesample] | Delete the provided layer 3 (L3) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Delete.json | -| [l3NetworksGetSample.js][l3networksgetsample] | Get properties of the provided layer 3 (L3) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Get.json | -| [l3NetworksListByResourceGroupSample.js][l3networkslistbyresourcegroupsample] | Get a list of layer 3 (L3) networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_ListByResourceGroup.json | -| [l3NetworksListBySubscriptionSample.js][l3networkslistbysubscriptionsample] | Get a list of layer 3 (L3) networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_ListBySubscription.json | -| [l3NetworksUpdateSample.js][l3networksupdatesample] | Update tags associated with the provided layer 3 (L3) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Patch.json | -| [metricsConfigurationsCreateOrUpdateSample.js][metricsconfigurationscreateorupdatesample] | Create new or update the existing metrics configuration of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Create.json | -| [metricsConfigurationsDeleteSample.js][metricsconfigurationsdeletesample] | Delete the metrics configuration of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Delete.json | -| [metricsConfigurationsGetSample.js][metricsconfigurationsgetsample] | Get metrics configuration of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Get.json | -| [metricsConfigurationsListByClusterSample.js][metricsconfigurationslistbyclustersample] | Get a list of metrics configurations for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_ListByCluster.json | -| [metricsConfigurationsUpdateSample.js][metricsconfigurationsupdatesample] | Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Patch.json | -| [operationsListSample.js][operationslistsample] | Get a list of all available resource provider operations. It contains a URL link to get the next set of results. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Operations_List.json | -| [rackSkusGetSample.js][rackskusgetsample] | Get the properties of the provided rack SKU. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/RackSkus_Get.json | -| [rackSkusListBySubscriptionSample.js][rackskuslistbysubscriptionsample] | Get a list of rack SKUs in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/RackSkus_ListBySubscription.json | -| [racksCreateOrUpdateSample.js][rackscreateorupdatesample] | Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Create.json | -| [racksDeleteSample.js][racksdeletesample] | Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Delete.json | -| [racksGetSample.js][racksgetsample] | Get properties of the provided rack. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Get.json | -| [racksListByResourceGroupSample.js][rackslistbyresourcegroupsample] | Get a list of racks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_ListByResourceGroup.json | -| [racksListBySubscriptionSample.js][rackslistbysubscriptionsample] | Get a list of racks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_ListBySubscription.json | -| [racksUpdateSample.js][racksupdatesample] | Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Patch.json | -| [storageAppliancesCreateOrUpdateSample.js][storageappliancescreateorupdatesample] | Create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Create.json | -| [storageAppliancesDeleteSample.js][storageappliancesdeletesample] | Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Delete.json | -| [storageAppliancesDisableRemoteVendorManagementSample.js][storageappliancesdisableremotevendormanagementsample] | Disable remote vendor management of the provided storage appliance. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_DisableRemoteVendorManagement.json | -| [storageAppliancesEnableRemoteVendorManagementSample.js][storageappliancesenableremotevendormanagementsample] | Enable remote vendor management of the provided storage appliance. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_EnableRemoteVendorManagement.json | -| [storageAppliancesGetSample.js][storageappliancesgetsample] | Get properties of the provided storage appliance. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Get.json | -| [storageAppliancesListByResourceGroupSample.js][storageapplianceslistbyresourcegroupsample] | Get a list of storage appliances in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_ListByResourceGroup.json | -| [storageAppliancesListBySubscriptionSample.js][storageapplianceslistbysubscriptionsample] | Get a list of storage appliances in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_ListBySubscription.json | -| [storageAppliancesRunReadCommandsSample.js][storageappliancesrunreadcommandssample] | Run one or more read-only commands on the provided storage appliance. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_RunReadCommands.json | -| [storageAppliancesUpdateSample.js][storageappliancesupdatesample] | Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Patch.json | -| [trunkedNetworksCreateOrUpdateSample.js][trunkednetworkscreateorupdatesample] | Create a new trunked network or update the properties of the existing trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Create.json | -| [trunkedNetworksDeleteSample.js][trunkednetworksdeletesample] | Delete the provided trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Delete.json | -| [trunkedNetworksGetSample.js][trunkednetworksgetsample] | Get properties of the provided trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Get.json | -| [trunkedNetworksListByResourceGroupSample.js][trunkednetworkslistbyresourcegroupsample] | Get a list of trunked networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_ListByResourceGroup.json | -| [trunkedNetworksListBySubscriptionSample.js][trunkednetworkslistbysubscriptionsample] | Get a list of trunked networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_ListBySubscription.json | -| [trunkedNetworksUpdateSample.js][trunkednetworksupdatesample] | Update tags associated with the provided trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Patch.json | -| [virtualMachinesAssignRelaySample.js][virtualmachinesassignrelaysample] | Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_AssignRelay.json | -| [virtualMachinesCreateOrUpdateSample.js][virtualmachinescreateorupdatesample] | Create a new virtual machine or update the properties of the existing virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Create.json | -| [virtualMachinesDeleteSample.js][virtualmachinesdeletesample] | Delete the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Delete.json | -| [virtualMachinesGetSample.js][virtualmachinesgetsample] | Get properties of the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Get.json | -| [virtualMachinesListByResourceGroupSample.js][virtualmachineslistbyresourcegroupsample] | Get a list of virtual machines in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_ListByResourceGroup.json | -| [virtualMachinesListBySubscriptionSample.js][virtualmachineslistbysubscriptionsample] | Get a list of virtual machines in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_ListBySubscription.json | -| [virtualMachinesPowerOffSample.js][virtualmachinespoweroffsample] | Power off the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_PowerOff.json | -| [virtualMachinesReimageSample.js][virtualmachinesreimagesample] | Reimage the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Reimage.json | -| [virtualMachinesRestartSample.js][virtualmachinesrestartsample] | Restart the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Restart.json | -| [virtualMachinesStartSample.js][virtualmachinesstartsample] | Start the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Start.json | -| [virtualMachinesUpdateSample.js][virtualmachinesupdatesample] | 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. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Patch.json | -| [volumesCreateOrUpdateSample.js][volumescreateorupdatesample] | Create a new volume or update the properties of the existing one. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Create.json | -| [volumesDeleteSample.js][volumesdeletesample] | Delete the provided volume. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Delete.json | -| [volumesGetSample.js][volumesgetsample] | Get properties of the provided volume. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Get.json | -| [volumesListByResourceGroupSample.js][volumeslistbyresourcegroupsample] | Get a list of volumes in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_ListByResourceGroup.json | -| [volumesListBySubscriptionSample.js][volumeslistbysubscriptionsample] | Get a list of volumes in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_ListBySubscription.json | -| [volumesUpdateSample.js][volumesupdatesample] | Update tags associated with the provided volume. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Patch.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node agentPoolsCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -cross-env NETWORKCLOUD_SUBSCRIPTION_ID="" NETWORKCLOUD_RESOURCE_GROUP="" node agentPoolsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[agentpoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsCreateOrUpdateSample.js -[agentpoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsDeleteSample.js -[agentpoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsGetSample.js -[agentpoolslistbykubernetesclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsListByKubernetesClusterSample.js -[agentpoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsUpdateSample.js -[baremetalmachinekeysetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsCreateOrUpdateSample.js -[baremetalmachinekeysetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsDeleteSample.js -[baremetalmachinekeysetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsGetSample.js -[baremetalmachinekeysetslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsListByClusterSample.js -[baremetalmachinekeysetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsUpdateSample.js -[baremetalmachinescordonsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesCordonSample.js -[baremetalmachinescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesCreateOrUpdateSample.js -[baremetalmachinesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesDeleteSample.js -[baremetalmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesGetSample.js -[baremetalmachineslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesListByResourceGroupSample.js -[baremetalmachineslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesListBySubscriptionSample.js -[baremetalmachinespoweroffsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesPowerOffSample.js -[baremetalmachinesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesReimageSample.js -[baremetalmachinesreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesReplaceSample.js -[baremetalmachinesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRestartSample.js -[baremetalmachinesruncommandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunCommandSample.js -[baremetalmachinesrundataextractsrestrictedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunDataExtractsRestrictedSample.js -[baremetalmachinesrundataextractssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunDataExtractsSample.js -[baremetalmachinesrunreadcommandssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunReadCommandsSample.js -[baremetalmachinesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesStartSample.js -[baremetalmachinesuncordonsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesUncordonSample.js -[baremetalmachinesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesUpdateSample.js -[bmckeysetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsCreateOrUpdateSample.js -[bmckeysetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsDeleteSample.js -[bmckeysetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsGetSample.js -[bmckeysetslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsListByClusterSample.js -[bmckeysetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsUpdateSample.js -[cloudservicesnetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksCreateOrUpdateSample.js -[cloudservicesnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksDeleteSample.js -[cloudservicesnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksGetSample.js -[cloudservicesnetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksListByResourceGroupSample.js -[cloudservicesnetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksListBySubscriptionSample.js -[cloudservicesnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksUpdateSample.js -[clustermanagerscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersCreateOrUpdateSample.js -[clustermanagersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersDeleteSample.js -[clustermanagersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersGetSample.js -[clustermanagerslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersListByResourceGroupSample.js -[clustermanagerslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersListBySubscriptionSample.js -[clustermanagersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersUpdateSample.js -[clusterscontinueupdateversionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersContinueUpdateVersionSample.js -[clusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersCreateOrUpdateSample.js -[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersDeleteSample.js -[clustersdeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersDeploySample.js -[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersGetSample.js -[clusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersListByResourceGroupSample.js -[clusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersListBySubscriptionSample.js -[clustersscanruntimesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersScanRuntimeSample.js -[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersUpdateSample.js -[clustersupdateversionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersUpdateVersionSample.js -[consolescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesCreateOrUpdateSample.js -[consolesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesDeleteSample.js -[consolesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesGetSample.js -[consoleslistbyvirtualmachinesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesListByVirtualMachineSample.js -[consolesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesUpdateSample.js -[kubernetesclusterfeaturescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesCreateOrUpdateSample.js -[kubernetesclusterfeaturesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesDeleteSample.js -[kubernetesclusterfeaturesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesGetSample.js -[kubernetesclusterfeatureslistbykubernetesclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesListByKubernetesClusterSample.js -[kubernetesclusterfeaturesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesUpdateSample.js -[kubernetesclusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersCreateOrUpdateSample.js -[kubernetesclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersDeleteSample.js -[kubernetesclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersGetSample.js -[kubernetesclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersListByResourceGroupSample.js -[kubernetesclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersListBySubscriptionSample.js -[kubernetesclustersrestartnodesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersRestartNodeSample.js -[kubernetesclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersUpdateSample.js -[l2networkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksCreateOrUpdateSample.js -[l2networksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksDeleteSample.js -[l2networksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksGetSample.js -[l2networkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksListByResourceGroupSample.js -[l2networkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksListBySubscriptionSample.js -[l2networksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksUpdateSample.js -[l3networkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksCreateOrUpdateSample.js -[l3networksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksDeleteSample.js -[l3networksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksGetSample.js -[l3networkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksListByResourceGroupSample.js -[l3networkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksListBySubscriptionSample.js -[l3networksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksUpdateSample.js -[metricsconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsCreateOrUpdateSample.js -[metricsconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsDeleteSample.js -[metricsconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsGetSample.js -[metricsconfigurationslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsListByClusterSample.js -[metricsconfigurationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsUpdateSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/operationsListSample.js -[rackskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/rackSkusGetSample.js -[rackskuslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/rackSkusListBySubscriptionSample.js -[rackscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksCreateOrUpdateSample.js -[racksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksDeleteSample.js -[racksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksGetSample.js -[rackslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksListByResourceGroupSample.js -[rackslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksListBySubscriptionSample.js -[racksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksUpdateSample.js -[storageappliancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesCreateOrUpdateSample.js -[storageappliancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesDeleteSample.js -[storageappliancesdisableremotevendormanagementsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesDisableRemoteVendorManagementSample.js -[storageappliancesenableremotevendormanagementsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesEnableRemoteVendorManagementSample.js -[storageappliancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesGetSample.js -[storageapplianceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesListByResourceGroupSample.js -[storageapplianceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesListBySubscriptionSample.js -[storageappliancesrunreadcommandssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesRunReadCommandsSample.js -[storageappliancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesUpdateSample.js -[trunkednetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksCreateOrUpdateSample.js -[trunkednetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksDeleteSample.js -[trunkednetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksGetSample.js -[trunkednetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksListByResourceGroupSample.js -[trunkednetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksListBySubscriptionSample.js -[trunkednetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksUpdateSample.js -[virtualmachinesassignrelaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesAssignRelaySample.js -[virtualmachinescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesCreateOrUpdateSample.js -[virtualmachinesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesDeleteSample.js -[virtualmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesGetSample.js -[virtualmachineslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesListByResourceGroupSample.js -[virtualmachineslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesListBySubscriptionSample.js -[virtualmachinespoweroffsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesPowerOffSample.js -[virtualmachinesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesReimageSample.js -[virtualmachinesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesRestartSample.js -[virtualmachinesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesStartSample.js -[virtualmachinesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesUpdateSample.js -[volumescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesCreateOrUpdateSample.js -[volumesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesDeleteSample.js -[volumesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesGetSample.js -[volumeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesListByResourceGroupSample.js -[volumeslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesListBySubscriptionSample.js -[volumesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesUpdateSample.js -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-networkcloud?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud/README.md diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsCreateOrUpdateSample.js deleted file mode 100644 index 96ad30f245f9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsCreateOrUpdateSample.js +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Create.json - */ -async function createOrUpdateKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const agentPoolParameters = { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - labels: [{ key: "kubernetes.label", value: "true" }], - location: "location", - mode: "System", - tags: { key1: "myvalue1", key2: "myvalue2" }, - taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_P46_224_v1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - agentPoolParameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsDeleteSample.js deleted file mode 100644 index d17060c171eb..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster agent pool. - * - * @summary Delete the provided Kubernetes cluster agent pool. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Delete.json - */ -async function deleteKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - ); - console.log(result); -} - -async function main() { - await deleteKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsGetSample.js deleted file mode 100644 index 2665900a90ac..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get properties of the provided Kubernetes cluster agent pool. - * - * @summary Get properties of the provided Kubernetes cluster agent pool. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Get.json - */ -async function getKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.get( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - ); - console.log(result); -} - -async function main() { - await getKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsUpdateSample.js deleted file mode 100644 index 92cdc9619255..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to 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. - * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Patch.json - */ -async function patchKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const agentPoolUpdateParameters = { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - count: 3, - tags: { key1: "myvalue1", key2: "myvalue2" }, - upgradeSettings: { drainTimeout: 1800, maxSurge: "1", maxUnavailable: "0" }, - }; - const options = { agentPoolUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - options, - ); - console.log(result); -} - -async function main() { - await patchKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsCreateOrUpdateSample.js deleted file mode 100644 index 763ad191c2bc..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsCreateOrUpdateSample.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a new bare metal machine key set or update the existing one for the provided cluster. - * - * @summary Create a new bare metal machine key set or update the existing one for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Create.json - */ -async function createOrUpdateBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const bareMetalMachineKeySetParameters = { - azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", - expiration: new Date("2022-12-31T23:59:59.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], - location: "location", - osGroupName: "standardAccessGroup", - privilegeLevel: "Other", - privilegeLevelName: "SecurityScanner", - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - bareMetalMachineKeySetParameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsDeleteSample.js deleted file mode 100644 index 01f827fc8e55..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the bare metal machine key set of the provided cluster. - * - * @summary Delete the bare metal machine key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Delete.json - */ -async function deleteBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.beginDeleteAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - ); - console.log(result); -} - -async function main() { - await deleteBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsGetSample.js deleted file mode 100644 index 82ad701b0715..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get bare metal machine key set of the provided cluster. - * - * @summary Get bare metal machine key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Get.json - */ -async function getBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.get( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - ); - console.log(result); -} - -async function main() { - await getBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsUpdateSample.js deleted file mode 100644 index 0c52834585be..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsUpdateSample.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to 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. - * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Patch.json - */ -async function patchBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const bareMetalMachineKeySetUpdateParameters = { - expiration: new Date("2022-12-31T23:59:59.008Z"), - jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const options = { - bareMetalMachineKeySetUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.beginUpdateAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - options, - ); - console.log(result); -} - -async function main() { - await patchBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesCordonSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesCordonSample.js deleted file mode 100644 index 7f7757e076c6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesCordonSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Cordon the provided bare metal machine's Kubernetes node. - * - * @summary Cordon the provided bare metal machine's Kubernetes node. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Cordon.json - */ -async function cordonBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineCordonParameters = { - evacuate: "True", - }; - const options = { - bareMetalMachineCordonParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginCordonAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - await cordonBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesCreateOrUpdateSample.js deleted file mode 100644 index 30406d062a4d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Create.json - */ -async function createOrUpdateBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineParameters = { - bmcConnectionString: "bmcconnectionstring", - bmcCredentials: { password: "{password}", username: "bmcuser" }, - bmcMacAddress: "00:00:4f:00:57:00", - bootMacAddress: "00:00:4e:00:58:af", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - machineDetails: "User-provided machine details.", - machineName: "r01c001", - machineSkuId: "684E-3B16-399E", - rackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - rackSlot: 1, - serialNumber: "BM1219XXX", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginCreateOrUpdateAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineParameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesGetSample.js deleted file mode 100644 index 8cb8091640e9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get properties of the provided bare metal machine. - * - * @summary Get properties of the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Get.json - */ -async function getBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.get(resourceGroupName, bareMetalMachineName); - console.log(result); -} - -async function main() { - await getBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesPowerOffSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesPowerOffSample.js deleted file mode 100644 index 0ee8719e18c9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesPowerOffSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Power off the provided bare metal machine. - * - * @summary Power off the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_PowerOff.json - */ -async function powerOffBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachinePowerOffParameters = { skipShutdown: "True" }; - const options = { - bareMetalMachinePowerOffParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginPowerOffAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - await powerOffBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesReimageSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesReimageSample.js deleted file mode 100644 index 820df9cd8285..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesReimageSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Reimage the provided bare metal machine. - * - * @summary Reimage the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Reimage.json - */ -async function reimageBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginReimageAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - await reimageBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesReplaceSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesReplaceSample.js deleted file mode 100644 index ea82fdde682f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesReplaceSample.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Replace the provided bare metal machine. - * - * @summary Replace the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Replace.json - */ -async function replaceBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineReplaceParameters = { - bmcCredentials: { - password: "https://keyvaultname.vault.azure.net/secrets/secretName", - username: "bmcuser", - }, - bmcMacAddress: "00:00:4f:00:57:ad", - bootMacAddress: "00:00:4e:00:58:af", - machineName: "name", - safeguardMode: "All", - serialNumber: "BM1219XXX", - storagePolicy: "DiscardAll", - }; - const options = { - bareMetalMachineReplaceParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginReplaceAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - await replaceBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRestartSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRestartSample.js deleted file mode 100644 index 835da5e7b4c1..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRestartSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Restart the provided bare metal machine. - * - * @summary Restart the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Restart.json - */ -async function restartBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRestartAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - await restartBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunCommandSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunCommandSample.js deleted file mode 100644 index 3374cc532e17..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunCommandSample.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunCommand.json - */ -async function runCommandOnBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunCommandParameters = { - arguments: ["--argument1", "argument2"], - limitTimeSeconds: 60, - script: "cHdkCg==", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunCommandAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunCommandParameters, - ); - console.log(result); -} - -async function main() { - await runCommandOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunDataExtractsRestrictedSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunDataExtractsRestrictedSample.js deleted file mode 100644 index 72f9e12255b9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunDataExtractsRestrictedSample.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunDataExtractsRestricted.json - */ -async function runRestrictedDataExtractionOnBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunDataExtractsRestrictedParameters = { - limitTimeSeconds: 60, - commands: [{ arguments: ["--min-severity=8"], command: "cluster-cve-report" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunDataExtractsRestrictedAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunDataExtractsRestrictedParameters, - ); - console.log(result); -} - -async function main() { - await runRestrictedDataExtractionOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunDataExtractsSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunDataExtractsSample.js deleted file mode 100644 index be76742c0c21..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunDataExtractsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunDataExtracts.json - */ -async function runDataExtractionOnBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunDataExtractsParameters = { - limitTimeSeconds: 60, - commands: [ - { - arguments: ["SysInfo", "TTYLog"], - command: "hardware-support-data-collection", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunDataExtractsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunDataExtractsParameters, - ); - console.log(result); -} - -async function main() { - await runDataExtractionOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunReadCommandsSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunReadCommandsSample.js deleted file mode 100644 index 7d942e4cb4b7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesRunReadCommandsSample.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunReadCommands_Hostname.json - */ -async function runAndRetrieveOutputFromASingleReadOnlyCommandOnBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunReadCommandsParameters = { - limitTimeSeconds: 60, - commands: [{ command: "hostname" }], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunReadCommandsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunReadCommandsParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunReadCommands_Multiple.json - */ -async function runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunReadCommandsParameters = { - limitTimeSeconds: 60, - commands: [ - { arguments: ["pods", "-A"], command: "kubectl get" }, - { arguments: ["192.168.0.99", "-c", "3"], command: "ping" }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunReadCommandsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunReadCommandsParameters, - ); - console.log(result); -} - -async function main() { - await runAndRetrieveOutputFromASingleReadOnlyCommandOnBareMetalMachine(); - await runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesStartSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesStartSample.js deleted file mode 100644 index e33424c703f5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesStartSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Start the provided bare metal machine. - * - * @summary Start the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Start.json - */ -async function startBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginStartAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - await startBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesUncordonSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesUncordonSample.js deleted file mode 100644 index e3ddd68cfe5b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesUncordonSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Uncordon the provided bare metal machine's Kubernetes node. - * - * @summary Uncordon the provided bare metal machine's Kubernetes node. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Uncordon.json - */ -async function uncordonBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginUncordonAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - await uncordonBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesUpdateSample.js deleted file mode 100644 index db477fd861f3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Patch.json - */ -async function patchBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineUpdateParameters = { - machineDetails: "machinedetails", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - bareMetalMachineUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginUpdateAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - await patchBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsCreateOrUpdateSample.js deleted file mode 100644 index eb0df972c8d7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsCreateOrUpdateSample.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a new baseboard management controller key set or update the existing one for the provided cluster. - * - * @summary Create a new baseboard management controller key set or update the existing one for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Create.json - */ -async function createOrUpdateBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const bmcKeySetParameters = { - azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", - expiration: new Date("2022-12-31T23:59:59.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - privilegeLevel: "Administrator", - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - bmcKeySetParameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsDeleteSample.js deleted file mode 100644 index 68b60bde77e0..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the baseboard management controller key set of the provided cluster. - * - * @summary Delete the baseboard management controller key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Delete.json - */ -async function deleteBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginDeleteAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - ); - console.log(result); -} - -async function main() { - await deleteBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsGetSample.js deleted file mode 100644 index 04960b3ca5d8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get baseboard management controller key set of the provided cluster. - * - * @summary Get baseboard management controller key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Get.json - */ -async function getBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.get(resourceGroupName, clusterName, bmcKeySetName); - console.log(result); -} - -async function main() { - await getBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsUpdateSample.js deleted file mode 100644 index dc482f63f9e7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsUpdateSample.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to 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. - * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Patch.json - */ -async function patchBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const bmcKeySetUpdateParameters = { - expiration: new Date("2022-12-31T23:59:59.008Z"), - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const options = { bmcKeySetUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginUpdateAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - options, - ); - console.log(result); -} - -async function main() { - await patchBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksCreateOrUpdateSample.js deleted file mode 100644 index 68a3a255a603..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a new cloud services network or update the properties of the existing cloud services network. - * - * @summary Create a new cloud services network or update the properties of the existing cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Create.json - */ -async function createOrUpdateCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const cloudServicesNetworkParameters = { - additionalEgressEndpoints: [ - { - category: "azure-resource-management", - endpoints: [{ domainName: "storageaccountex.blob.core.windows.net", port: 443 }], - }, - ], - enableDefaultEgressEndpoints: "False", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - storageOptions: { - mode: "Standard", - sizeMiB: 1048576, - storageApplianceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - cloudServicesNetworkName, - cloudServicesNetworkParameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksDeleteSample.js deleted file mode 100644 index 7e267ce62534..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksDeleteSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the provided cloud services network. - * - * @summary Delete the provided cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Delete.json - */ -async function deleteCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginDeleteAndWait( - resourceGroupName, - cloudServicesNetworkName, - ); - console.log(result); -} - -async function main() { - await deleteCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksGetSample.js deleted file mode 100644 index 4491ea4d6279..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksGetSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get properties of the provided cloud services network. - * - * @summary Get properties of the provided cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Get.json - */ -async function getCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.get( - resourceGroupName, - cloudServicesNetworkName, - ); - console.log(result); -} - -async function main() { - await getCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksUpdateSample.js deleted file mode 100644 index 07dd48929116..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Patch.json - */ -async function patchCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const cloudServicesNetworkUpdateParameters = { - additionalEgressEndpoints: [ - { - category: "azure-resource-management", - endpoints: [{ domainName: "storageaccountex.blob.core.windows.net", port: 443 }], - }, - ], - enableDefaultEgressEndpoints: "False", - storageOptions: { - mode: "Standard", - sizeMiB: 1048576, - storageApplianceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - cloudServicesNetworkUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginUpdateAndWait( - resourceGroupName, - cloudServicesNetworkName, - options, - ); - console.log(result); -} - -async function main() { - await patchCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersCreateOrUpdateSample.js deleted file mode 100644 index 1d75bdd0c9b5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersCreateOrUpdateSample.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a new cluster manager or update properties of the cluster manager if it exists. - * - * @summary Create a new cluster manager or update properties of the cluster manager if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Create.json - */ -async function createOrUpdateClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerParameters = { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - fabricControllerId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", - identity: { type: "SystemAssigned" }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterManagerName, - clusterManagerParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new cluster manager or update properties of the cluster manager if it exists. - * - * @summary Create a new cluster manager or update properties of the cluster manager if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Create_Uami.json - */ -async function createOrUpdateClusterManagerWithUserAssignedIdentity() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerParameters = { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - fabricControllerId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterManagerName, - clusterManagerParameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateClusterManager(); - await createOrUpdateClusterManagerWithUserAssignedIdentity(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersDeleteSample.js deleted file mode 100644 index 9cafbd5d9824..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersDeleteSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the provided cluster manager. - * - * @summary Delete the provided cluster manager. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Delete.json - */ -async function deleteClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginDeleteAndWait( - resourceGroupName, - clusterManagerName, - ); - console.log(result); -} - -async function main() { - await deleteClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersGetSample.js deleted file mode 100644 index 6b8908ee1a23..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the properties of the provided cluster manager. - * - * @summary Get the properties of the provided cluster manager. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Get.json - */ -async function getClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.get(resourceGroupName, clusterManagerName); - console.log(result); -} - -async function main() { - await getClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersUpdateSample.js deleted file mode 100644 index ce1681bc88e9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Patch.json - */ -async function patchClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerUpdateParameters = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - clusterManagerUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.update( - resourceGroupName, - clusterManagerName, - options, - ); - console.log(result); -} - -async function main() { - await patchClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersContinueUpdateVersionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersContinueUpdateVersionSample.js deleted file mode 100644 index e4061cb755b5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersContinueUpdateVersionSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. - * - * @summary Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ContinueUpdateVersion.json - */ -async function continueUpdateClusterVersion() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterContinueUpdateVersionParameters = { machineGroupTargetingMode: "AlphaByRack" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginContinueUpdateVersionAndWait( - resourceGroupName, - clusterName, - clusterContinueUpdateVersionParameters, - ); - console.log(result); -} - -async function main() { - await continueUpdateClusterVersion(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersDeleteSample.js deleted file mode 100644 index a9e3d5c09a5d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersDeleteSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the provided cluster. - * - * @summary Delete the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Delete.json - */ -async function deleteCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeleteAndWait(resourceGroupName, clusterName); - console.log(result); -} - -async function main() { - await deleteCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersDeploySample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersDeploySample.js deleted file mode 100644 index 774b989277e3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersDeploySample.js +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deploy the cluster using the rack configuration provided during creation. - * - * @summary Deploy the cluster using the rack configuration provided during creation. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Deploy.json - */ -async function deployCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterDeployParameters = {}; - const options = { clusterDeployParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeployAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -/** - * This sample demonstrates how to Deploy the cluster using the rack configuration provided during creation. - * - * @summary Deploy the cluster using the rack configuration provided during creation. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Deploy_SkipValidation.json - */ -async function deployClusterSkippingValidation() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterDeployParameters = { - skipValidationsForMachines: ["bmmName1"], - }; - const options = { clusterDeployParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeployAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -async function main() { - await deployCluster(); - await deployClusterSkippingValidation(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersGetSample.js deleted file mode 100644 index 1ad1ea8d2035..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get properties of the provided cluster. - * - * @summary Get properties of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Get.json - */ -async function getCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.get(resourceGroupName, clusterName); - console.log(result); -} - -async function main() { - await getCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersListByResourceGroupSample.js deleted file mode 100644 index 06f1d5320762..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersListByResourceGroupSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get a list of clusters in the provided resource group. - * - * @summary Get a list of clusters in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ListByResourceGroup.json - */ -async function listClustersForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clusters.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listClustersForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersScanRuntimeSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersScanRuntimeSample.js deleted file mode 100644 index fdfa85851bfc..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersScanRuntimeSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. - * - * @summary Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ScanRuntime.json - */ -async function executeARuntimeProtectionScanOnTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterScanRuntimeParameters = { - scanActivity: "Scan", - }; - const options = { - clusterScanRuntimeParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginScanRuntimeAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -async function main() { - await executeARuntimeProtectionScanOnTheCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersUpdateSample.js deleted file mode 100644 index 0cb82ad111b4..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersUpdateSample.js +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.json - */ -async function patchClusterAggregatorOrSingleRackDefinition() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters = { - aggregatorOrSingleRackDefinition: { - bareMetalMachineConfigurationData: [ - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:FF", - bootMacAddress: "00:BB:CC:DD:EE:FF", - machineDetails: "extraDetails", - machineName: "bmmName1", - rackSlot: 1, - serialNumber: "BM1219XXX", - }, - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:00", - bootMacAddress: "00:BB:CC:DD:EE:00", - machineDetails: "extraDetails", - machineName: "bmmName2", - rackSlot: 2, - serialNumber: "BM1219YYY", - }, - ], - networkRackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", - rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", - rackSerialNumber: "newSerialNumber", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - storageApplianceConfigurationData: [ - { - adminCredentials: { password: "{password}", username: "username" }, - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceName: "vmName", - }, - ], - }, - computeDeploymentThreshold: { - type: "PercentSuccess", - grouping: "PerCluster", - value: 90, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_AnalyticsOutput.json - */ -async function patchClusterAnalyticsOutput() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters = { - analyticsOutputSettings: { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", - }, - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_CommandOutput.json - */ -async function patchClusterCommandOutput() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters = { - commandOutputSettings: { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", - }, - containerUrl: "https://myaccount.blob.core.windows.net/mycontainer?restype=container", - overrides: [ - { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", - }, - commandOutputType: "StorageRunReadCommands", - containerUrl: "https://myaccount.blob.core.windows.net/myContainer2?restype=container", - }, - ], - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_Location.json - */ -async function patchClusterLocation() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters = { - clusterLocation: "Foo Street, 3rd Floor, row 9", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_RuntimeProtectionConfiguration.json - */ -async function patchRuntimeProtectionConfiguration() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters = { - runtimeProtectionConfiguration: { enforcementLevel: "OnDemand" }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_SecretArchive.json - */ -async function patchSecretArchive() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters = { - secretArchiveSettings: { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", - }, - vaultUri: "https://keyvaultname.vault.azure.net/", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_UpdateStrategy.json - */ -async function patchUpdateStrategy() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - updateStrategy: { - maxUnavailable: 4, - strategyType: "Rack", - thresholdType: "CountSuccess", - thresholdValue: 4, - waitTimeMinutes: 10, - }, - }; - const options = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_VulnerabilityScanning.json - */ -async function patchVulnerabilityScanning() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - vulnerabilityScanningSettings: { containerScan: "Enabled" }, - }; - const options = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -async function main() { - await patchClusterAggregatorOrSingleRackDefinition(); - await patchClusterAnalyticsOutput(); - await patchClusterCommandOutput(); - await patchClusterLocation(); - await patchRuntimeProtectionConfiguration(); - await patchSecretArchive(); - await patchUpdateStrategy(); - await patchVulnerabilityScanning(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersUpdateVersionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersUpdateVersionSample.js deleted file mode 100644 index 2455b124ca5e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersUpdateVersionSample.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update the version of the provided cluster to one of the available supported versions. - * - * @summary Update the version of the provided cluster to one of the available supported versions. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_UpdateVersion.json - */ -async function updateClusterVersion() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateVersionParameters = { - targetClusterVersion: "2.0", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateVersionAndWait( - resourceGroupName, - clusterName, - clusterUpdateVersionParameters, - ); - console.log(result); -} - -async function main() { - await updateClusterVersion(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesCreateOrUpdateSample.js deleted file mode 100644 index 9f37eb4e4578..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesCreateOrUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a new virtual machine console or update the properties of the existing virtual machine console. - * - * @summary Create a new virtual machine console or update the properties of the existing virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Create.json - */ -async function createOrUpdateVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const consoleParameters = { - enabled: "True", - expiration: new Date("2022-06-01T01:27:03.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - consoleParameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesDeleteSample.js deleted file mode 100644 index cd5a624c6139..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the provided virtual machine console. - * - * @summary Delete the provided virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Delete.json - */ -async function deleteVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - ); - console.log(result); -} - -async function main() { - await deleteVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesGetSample.js deleted file mode 100644 index 2f6c98a79b5f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get properties of the provided virtual machine console. - * - * @summary Get properties of the provided virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Get.json - */ -async function getVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.get(resourceGroupName, virtualMachineName, consoleName); - console.log(result); -} - -async function main() { - await getVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesUpdateSample.js deleted file mode 100644 index 3337214352d0..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to 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. - * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Patch.json - */ -async function patchVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const consoleUpdateParameters = { - enabled: "True", - expiration: new Date("2022-06-01T01:27:03.008Z"), - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { consoleUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - options, - ); - console.log(result); -} - -async function main() { - await patchVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesCreateOrUpdateSample.js deleted file mode 100644 index fe42eb7ac48a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesCreateOrUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. - * - * @summary Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Create.json - */ -async function createOrUpdateKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const kubernetesClusterFeatureParameters = { - location: "location", - options: [{ key: "featureOptionName", value: "featureOptionValue" }], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - kubernetesClusterFeatureParameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesDeleteSample.js deleted file mode 100644 index 54cf735b7f15..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster feature. - * - * @summary Delete the provided Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Delete.json - */ -async function deleteKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - ); - console.log(result); -} - -async function main() { - await deleteKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesGetSample.js deleted file mode 100644 index e15b1dd9f7c0..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get properties of the provided the Kubernetes cluster feature. - * - * @summary Get properties of the provided the Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Get.json - */ -async function getKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.get( - resourceGroupName, - kubernetesClusterName, - featureName, - ); - console.log(result); -} - -async function main() { - await getKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesUpdateSample.js deleted file mode 100644 index 485cd621aeb3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Patch properties of the provided Kubernetes cluster feature. - * - * @summary Patch properties of the provided Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Patch.json - */ -async function patchKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const kubernetesClusterFeatureUpdateParameters = { - options: [{ key: "featureOptionName", value: "featureOptionValue" }], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - kubernetesClusterFeatureUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - options, - ); - console.log(result); -} - -async function main() { - await patchKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersCreateOrUpdateSample.js deleted file mode 100644 index 49fd38ccd6db..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersCreateOrUpdateSample.js +++ /dev/null @@ -1,332 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a new Kubernetes cluster or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Create.json - */ -async function createOrUpdateKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterParameters = { - aadConfiguration: { - adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"], - }, - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - vmSkuName: "NC_G6_28_v1", - }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - initialAgentPoolConfigurations: [ - { - name: "SystemPool-1", - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - labels: [{ key: "kubernetes.label", value: "true" }], - mode: "System", - taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_P46_224_v1", - }, - ], - kubernetesVersion: "1.XX.Y", - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkConfiguration: { - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - bgpServiceLoadBalancerConfiguration: { - bgpAdvertisements: [ - { - advertiseToFabric: "True", - communities: ["64512:100"], - ipAddressPools: ["pool1"], - peers: ["peer1"], - }, - ], - bgpPeers: [ - { - name: "peer1", - bfdEnabled: "False", - bgpMultiHop: "False", - holdTime: "P300s", - keepAliveTime: "P300s", - myAsn: 64512, - peerAddress: "203.0.113.254", - peerAsn: 64497, - peerPort: 179, - }, - ], - fabricPeeringEnabled: "True", - ipAddressPools: [ - { - name: "pool1", - addresses: ["198.51.102.0/24"], - autoAssign: "True", - onlyUseHostIps: "True", - }, - ], - }, - cloudServicesNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - cniNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - dnsServiceIp: "198.51.101.2", - podCidrs: ["198.51.100.0/24"], - serviceCidrs: ["198.51.101.0/24"], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new Kubernetes cluster or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_L2LoadBalancer_Create.json - */ -async function createOrUpdateKubernetesClusterWithALayer2LoadBalancer() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterParameters = { - aadConfiguration: { - adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"], - }, - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - vmSkuName: "NC_G6_28_v1", - }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - initialAgentPoolConfigurations: [ - { - name: "SystemPool-1", - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - labels: [{ key: "kubernetes.label", value: "true" }], - mode: "System", - taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_P46_224_v1", - }, - ], - kubernetesVersion: "1.XX.Y", - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkConfiguration: { - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - cloudServicesNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - cniNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - dnsServiceIp: "198.51.101.2", - l2ServiceLoadBalancerConfiguration: { - ipAddressPools: [ - { - name: "pool1", - addresses: ["198.51.102.2-198.51.102.254"], - autoAssign: "True", - }, - ], - }, - podCidrs: ["198.51.100.0/24"], - serviceCidrs: ["198.51.101.0/24"], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterParameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateKubernetesCluster(); - await createOrUpdateKubernetesClusterWithALayer2LoadBalancer(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersDeleteSample.js deleted file mode 100644 index c6d664ddf7a3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersDeleteSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster. - * - * @summary Delete the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Delete.json - */ -async function deleteKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - ); - console.log(result); -} - -async function main() { - await deleteKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersGetSample.js deleted file mode 100644 index 03a54a35eefb..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get properties of the provided the Kubernetes cluster. - * - * @summary Get properties of the provided the Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Get.json - */ -async function getKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.get(resourceGroupName, kubernetesClusterName); - console.log(result); -} - -async function main() { - await getKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersRestartNodeSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersRestartNodeSample.js deleted file mode 100644 index fcd4fda5832f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersRestartNodeSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Restart a targeted node of a Kubernetes cluster. - * - * @summary Restart a targeted node of a Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_RestartNode.json - */ -async function restartAKubernetesClusterNode() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterRestartNodeParameters = { nodeName: "nodeName" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginRestartNodeAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterRestartNodeParameters, - ); - console.log(result); -} - -async function main() { - await restartAKubernetesClusterNode(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersUpdateSample.js deleted file mode 100644 index f144a673e73f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersUpdateSample.js +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Patch.json - */ -async function patchKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterUpdateParameters = { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - count: 3, - }, - kubernetesVersion: "1.XX.Y", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - kubernetesClusterUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - options, - ); - console.log(result); -} - -async function main() { - await patchKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksDeleteSample.js deleted file mode 100644 index a784b438b017..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksDeleteSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the provided layer 2 (L2) network. - * - * @summary Delete the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Delete.json - */ -async function deleteL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.beginDeleteAndWait(resourceGroupName, l2NetworkName); - console.log(result); -} - -async function main() { - await deleteL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksGetSample.js deleted file mode 100644 index 35793715986e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get properties of the provided layer 2 (L2) network. - * - * @summary Get properties of the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Get.json - */ -async function getL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.get(resourceGroupName, l2NetworkName); - console.log(result); -} - -async function main() { - await getL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksUpdateSample.js deleted file mode 100644 index 1d4e6b62aa75..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update tags associated with the provided layer 2 (L2) network. - * - * @summary Update tags associated with the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Patch.json - */ -async function patchL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const l2NetworkUpdateParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { l2NetworkUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.update(resourceGroupName, l2NetworkName, options); - console.log(result); -} - -async function main() { - await patchL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksDeleteSample.js deleted file mode 100644 index b28547f502a2..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksDeleteSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the provided layer 3 (L3) network. - * - * @summary Delete the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Delete.json - */ -async function deleteL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.beginDeleteAndWait(resourceGroupName, l3NetworkName); - console.log(result); -} - -async function main() { - await deleteL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksGetSample.js deleted file mode 100644 index e8bbc77574c7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get properties of the provided layer 3 (L3) network. - * - * @summary Get properties of the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Get.json - */ -async function getL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.get(resourceGroupName, l3NetworkName); - console.log(result); -} - -async function main() { - await getL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksUpdateSample.js deleted file mode 100644 index 5bf7bac584f2..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update tags associated with the provided layer 3 (L3) network. - * - * @summary Update tags associated with the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Patch.json - */ -async function patchL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const l3NetworkUpdateParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { l3NetworkUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.update(resourceGroupName, l3NetworkName, options); - console.log(result); -} - -async function main() { - await patchL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index 9a674d35bcf4..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create new or update the existing metrics configuration of the provided cluster. - * - * @summary Create new or update the existing metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Create.json - */ -async function createOrUpdateMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const metricsConfigurationParameters = { - collectionInterval: 15, - enabledMetrics: ["metric1", "metric2"], - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - metricsConfigurationParameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsDeleteSample.js deleted file mode 100644 index b555f1339aa8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsDeleteSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the metrics configuration of the provided cluster. - * - * @summary Delete the metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Delete.json - */ -async function deleteMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginDeleteAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - ); - console.log(result); -} - -async function main() { - await deleteMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsGetSample.js deleted file mode 100644 index 4485dabccdd5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsGetSample.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get metrics configuration of the provided cluster. - * - * @summary Get metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Get.json - */ -async function getMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.get( - resourceGroupName, - clusterName, - metricsConfigurationName, - ); - console.log(result); -} - -async function main() { - await getMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsUpdateSample.js deleted file mode 100644 index b00b043e978f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsUpdateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Patch.json - */ -async function patchMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const metricsConfigurationUpdateParameters = { - collectionInterval: 15, - enabledMetrics: ["metric1", "metric2"], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - metricsConfigurationUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginUpdateAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - options, - ); - console.log(result); -} - -async function main() { - await patchMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/rackSkusGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/rackSkusGetSample.js deleted file mode 100644 index f034a994f6cb..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/rackSkusGetSample.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the properties of the provided rack SKU. - * - * @summary Get the properties of the provided rack SKU. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/RackSkus_Get.json - */ -async function getRackSkuResource() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const rackSkuName = "rackSkuName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.rackSkus.get(rackSkuName); - console.log(result); -} - -async function main() { - await getRackSkuResource(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksGetSample.js deleted file mode 100644 index bfbfcf1d9d6c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get properties of the provided rack. - * - * @summary Get properties of the provided rack. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Get.json - */ -async function getRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.get(resourceGroupName, rackName); - console.log(result); -} - -async function main() { - await getRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksListByResourceGroupSample.js deleted file mode 100644 index 27fd88a357e3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksListByResourceGroupSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get a list of racks in the provided resource group. - * - * @summary Get a list of racks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_ListByResourceGroup.json - */ -async function listRacksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.racks.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listRacksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksUpdateSample.js deleted file mode 100644 index 2d10be2942e2..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksUpdateSample.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Patch.json - */ -async function patchRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const rackUpdateParameters = { - rackLocation: "Rack 2B", - rackSerialNumber: "RACK_SERIAL_NUMBER", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { rackUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginUpdateAndWait(resourceGroupName, rackName, options); - console.log(result); -} - -async function main() { - await patchRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesCreateOrUpdateSample.js deleted file mode 100644 index 47153fd853fb..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Create.json - */ -async function createOrUpdateStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceParameters = { - administratorCredentials: { password: "{password}", username: "adminUser" }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - rackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceSkuId: "684E-3B16-399E", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - storageApplianceName, - storageApplianceParameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesDisableRemoteVendorManagementSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesDisableRemoteVendorManagementSample.js deleted file mode 100644 index 3048f5ae3e65..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesDisableRemoteVendorManagementSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Disable remote vendor management of the provided storage appliance. - * - * @summary Disable remote vendor management of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_DisableRemoteVendorManagement.json - */ -async function turnOffRemoteVendorManagementForStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginDisableRemoteVendorManagementAndWait( - resourceGroupName, - storageApplianceName, - ); - console.log(result); -} - -async function main() { - await turnOffRemoteVendorManagementForStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesEnableRemoteVendorManagementSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesEnableRemoteVendorManagementSample.js deleted file mode 100644 index 0b6d2093c98e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesEnableRemoteVendorManagementSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Enable remote vendor management of the provided storage appliance. - * - * @summary Enable remote vendor management of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_EnableRemoteVendorManagement.json - */ -async function turnOnRemoteVendorManagementForStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceEnableRemoteVendorManagementParameters = { - supportEndpoints: ["10.0.0.0/24"], - }; - const options = { - storageApplianceEnableRemoteVendorManagementParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginEnableRemoteVendorManagementAndWait( - resourceGroupName, - storageApplianceName, - options, - ); - console.log(result); -} - -async function main() { - await turnOnRemoteVendorManagementForStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesGetSample.js deleted file mode 100644 index a0563d7f61a4..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get properties of the provided storage appliance. - * - * @summary Get properties of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Get.json - */ -async function getStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.get(resourceGroupName, storageApplianceName); - console.log(result); -} - -async function main() { - await getStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesRunReadCommandsSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesRunReadCommandsSample.js deleted file mode 100644 index 34dd928b4d01..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesRunReadCommandsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Run one or more read-only commands on the provided storage appliance. - * - * @summary Run one or more read-only commands on the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_RunReadCommands.json - */ -async function runAndRetrieveOutputFromReadOnlyCommandsOnStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceRunReadCommandsParameters = { - limitTimeSeconds: 60, - commands: [ - { - arguments: ["list", "--filter", "state='open'"], - command: "purealert", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginRunReadCommandsAndWait( - resourceGroupName, - storageApplianceName, - storageApplianceRunReadCommandsParameters, - ); - console.log(result); -} - -async function main() { - await runAndRetrieveOutputFromReadOnlyCommandsOnStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesUpdateSample.js deleted file mode 100644 index c2add6fc57e3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesUpdateSample.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. - * - * @summary Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Patch.json - */ -async function patchStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceUpdateParameters = { - serialNumber: "BM1219XXX", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - storageApplianceUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginUpdateAndWait( - resourceGroupName, - storageApplianceName, - options, - ); - console.log(result); -} - -async function main() { - await patchStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksCreateOrUpdateSample.js deleted file mode 100644 index a6740d0602eb..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a new trunked network or update the properties of the existing trunked network. - * - * @summary Create a new trunked network or update the properties of the existing trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Create.json - */ -async function createOrUpdateTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const trunkedNetworkParameters = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - interfaceName: "eth0", - isolationDomainIds: [ - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", - ], - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - vlans: [12, 14], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - trunkedNetworkName, - trunkedNetworkParameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksDeleteSample.js deleted file mode 100644 index 0067ca2a55f4..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksDeleteSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the provided trunked network. - * - * @summary Delete the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Delete.json - */ -async function deleteTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.beginDeleteAndWait( - resourceGroupName, - trunkedNetworkName, - ); - console.log(result); -} - -async function main() { - await deleteTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksGetSample.js deleted file mode 100644 index efea2fd922c3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get properties of the provided trunked network. - * - * @summary Get properties of the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Get.json - */ -async function getTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.get(resourceGroupName, trunkedNetworkName); - console.log(result); -} - -async function main() { - await getTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksUpdateSample.js deleted file mode 100644 index b6916e12f414..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update tags associated with the provided trunked network. - * - * @summary Update tags associated with the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Patch.json - */ -async function patchTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const trunkedNetworkUpdateParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - trunkedNetworkUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.update( - resourceGroupName, - trunkedNetworkName, - options, - ); - console.log(result); -} - -async function main() { - await patchTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesAssignRelaySample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesAssignRelaySample.js deleted file mode 100644 index 8401619d01b3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesAssignRelaySample.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. - * - * @summary Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_AssignRelay.json - */ -async function assignRelayToTheMicrosoftHybridComputeMachineForAVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineAssignRelayParameters = { - machineId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.HybridCompute/machines/machineName", - relayType: "Platform", - }; - const options = { - virtualMachineAssignRelayParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginAssignRelayAndWait( - resourceGroupName, - virtualMachineName, - options, - ); - console.log(result); -} - -async function main() { - await assignRelayToTheMicrosoftHybridComputeMachineForAVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesCreateOrUpdateSample.js deleted file mode 100644 index 00fae8134228..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesCreateOrUpdateSample.js +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create a new virtual machine or update the properties of the existing virtual machine. - * - * @summary Create a new virtual machine or update the properties of the existing virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Create.json - */ -async function createOrUpdateVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineParameters = { - adminUsername: "username", - bootMethod: "UEFI", - cloudServicesNetworkAttachment: { - attachedNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - ipAllocationMethod: "Dynamic", - }, - cpuCores: 2, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - location: "location", - memorySizeGB: 8, - networkAttachments: [ - { - attachedNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - defaultGateway: "True", - ipAllocationMethod: "Dynamic", - ipv4Address: "198.51.100.1", - ipv6Address: "2001:0db8:0000:0000:0000:0000:0000:0000", - networkAttachmentName: "netAttachName01", - }, - ], - networkDataContent: "bmV0d29ya0RhdGVTYW1wbGU=", - placementHints: [ - { - hintType: "Affinity", - resourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - schedulingExecution: "Hard", - scope: "", - }, - ], - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - storageProfile: { - osDisk: { - createOption: "Ephemeral", - deleteOption: "Delete", - diskSizeGB: 120, - }, - volumeAttachments: [ - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName", - ], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - userDataContent: "dXNlckRhdGVTYW1wbGU=", - vmDeviceModel: "T2", - vmImage: "myacr.azurecr.io/foobar:latest", - vmImageRepositoryCredentials: { - password: "{password}", - registryUrl: "myacr.azurecr.io", - username: "myuser", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineName, - virtualMachineParameters, - ); - console.log(result); -} - -async function main() { - await createOrUpdateVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesDeleteSample.js deleted file mode 100644 index 250f8b1087fc..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesDeleteSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the provided virtual machine. - * - * @summary Delete the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Delete.json - */ -async function deleteVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - await deleteVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesGetSample.js deleted file mode 100644 index 6c786fbe9fa0..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get properties of the provided virtual machine. - * - * @summary Get properties of the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Get.json - */ -async function getVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.get(resourceGroupName, virtualMachineName); - console.log(result); -} - -async function main() { - await getVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesPowerOffSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesPowerOffSample.js deleted file mode 100644 index 0f122ce4ef15..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesPowerOffSample.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Power off the provided virtual machine. - * - * @summary Power off the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_PowerOff.json - */ -async function powerOffVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachinePowerOffParameters = { - skipShutdown: "True", - }; - const options = { - virtualMachinePowerOffParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginPowerOffAndWait( - resourceGroupName, - virtualMachineName, - options, - ); - console.log(result); -} - -async function main() { - await powerOffVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesReimageSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesReimageSample.js deleted file mode 100644 index ce679a233183..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesReimageSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Reimage the provided virtual machine. - * - * @summary Reimage the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Reimage.json - */ -async function reimageVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginReimageAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - await reimageVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesRestartSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesRestartSample.js deleted file mode 100644 index 26b1a008fa04..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesRestartSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Restart the provided virtual machine. - * - * @summary Restart the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Restart.json - */ -async function restartVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginRestartAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - await restartVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesStartSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesStartSample.js deleted file mode 100644 index 6077639e515e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesStartSample.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Start the provided virtual machine. - * - * @summary Start the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Start.json - */ -async function startVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginStartAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - await startVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesUpdateSample.js deleted file mode 100644 index 1cb07b877a15..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to 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. - * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Patch.json - */ -async function patchVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineUpdateParameters = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - vmImageRepositoryCredentials: { - password: "{password}", - registryUrl: "myacr.azurecr.io", - username: "myuser", - }, - }; - const options = { - virtualMachineUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - options, - ); - console.log(result); -} - -async function main() { - await patchVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesDeleteSample.js deleted file mode 100644 index 2129a0025dcc..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesDeleteSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete the provided volume. - * - * @summary Delete the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Delete.json - */ -async function deleteVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.beginDeleteAndWait(resourceGroupName, volumeName); - console.log(result); -} - -async function main() { - await deleteVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesGetSample.js deleted file mode 100644 index 071fa347fd05..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get properties of the provided volume. - * - * @summary Get properties of the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Get.json - */ -async function getVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.get(resourceGroupName, volumeName); - console.log(result); -} - -async function main() { - await getVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesListByResourceGroupSample.js deleted file mode 100644 index 82d07adbf85a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesListByResourceGroupSample.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get a list of volumes in the provided resource group. - * - * @summary Get a list of volumes in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_ListByResourceGroup.json - */ -async function listVolumesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.volumes.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listVolumesForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesUpdateSample.js deleted file mode 100644 index 5c3a42bea0e7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesUpdateSample.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update tags associated with the provided volume. - * - * @summary Update tags associated with the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Patch.json - */ -async function patchVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const volumeUpdateParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { volumeUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.update(resourceGroupName, volumeName, options); - console.log(result); -} - -async function main() { - await patchVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/README.md b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/README.md deleted file mode 100644 index 458f342d1f9f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/README.md +++ /dev/null @@ -1,319 +0,0 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [agentPoolsCreateOrUpdateSample.ts][agentpoolscreateorupdatesample] | Create a new Kubernetes cluster agent pool or update the properties of the existing one. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Create.json | -| [agentPoolsDeleteSample.ts][agentpoolsdeletesample] | Delete the provided Kubernetes cluster agent pool. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Delete.json | -| [agentPoolsGetSample.ts][agentpoolsgetsample] | Get properties of the provided Kubernetes cluster agent pool. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Get.json | -| [agentPoolsListByKubernetesClusterSample.ts][agentpoolslistbykubernetesclustersample] | Get a list of agent pools for the provided Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_ListByKubernetesCluster.json | -| [agentPoolsUpdateSample.ts][agentpoolsupdatesample] | 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. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Patch.json | -| [bareMetalMachineKeySetsCreateOrUpdateSample.ts][baremetalmachinekeysetscreateorupdatesample] | Create a new bare metal machine key set or update the existing one for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Create.json | -| [bareMetalMachineKeySetsDeleteSample.ts][baremetalmachinekeysetsdeletesample] | Delete the bare metal machine key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Delete.json | -| [bareMetalMachineKeySetsGetSample.ts][baremetalmachinekeysetsgetsample] | Get bare metal machine key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Get.json | -| [bareMetalMachineKeySetsListByClusterSample.ts][baremetalmachinekeysetslistbyclustersample] | Get a list of bare metal machine key sets for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_ListByCluster.json | -| [bareMetalMachineKeySetsUpdateSample.ts][baremetalmachinekeysetsupdatesample] | 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. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Patch.json | -| [bareMetalMachinesCordonSample.ts][baremetalmachinescordonsample] | Cordon the provided bare metal machine's Kubernetes node. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Cordon.json | -| [bareMetalMachinesCreateOrUpdateSample.ts][baremetalmachinescreateorupdatesample] | Create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Create.json | -| [bareMetalMachinesDeleteSample.ts][baremetalmachinesdeletesample] | Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Delete.json | -| [bareMetalMachinesGetSample.ts][baremetalmachinesgetsample] | Get properties of the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Get.json | -| [bareMetalMachinesListByResourceGroupSample.ts][baremetalmachineslistbyresourcegroupsample] | Get a list of bare metal machines in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_ListByResourceGroup.json | -| [bareMetalMachinesListBySubscriptionSample.ts][baremetalmachineslistbysubscriptionsample] | Get a list of bare metal machines in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_ListBySubscription.json | -| [bareMetalMachinesPowerOffSample.ts][baremetalmachinespoweroffsample] | Power off the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_PowerOff.json | -| [bareMetalMachinesReimageSample.ts][baremetalmachinesreimagesample] | Reimage the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Reimage.json | -| [bareMetalMachinesReplaceSample.ts][baremetalmachinesreplacesample] | Replace the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Replace.json | -| [bareMetalMachinesRestartSample.ts][baremetalmachinesrestartsample] | Restart the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Restart.json | -| [bareMetalMachinesRunCommandSample.ts][baremetalmachinesruncommandsample] | Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunCommand.json | -| [bareMetalMachinesRunDataExtractsRestrictedSample.ts][baremetalmachinesrundataextractsrestrictedsample] | Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunDataExtractsRestricted.json | -| [bareMetalMachinesRunDataExtractsSample.ts][baremetalmachinesrundataextractssample] | Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunDataExtracts.json | -| [bareMetalMachinesRunReadCommandsSample.ts][baremetalmachinesrunreadcommandssample] | Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunReadCommands_Hostname.json | -| [bareMetalMachinesStartSample.ts][baremetalmachinesstartsample] | Start the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Start.json | -| [bareMetalMachinesUncordonSample.ts][baremetalmachinesuncordonsample] | Uncordon the provided bare metal machine's Kubernetes node. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Uncordon.json | -| [bareMetalMachinesUpdateSample.ts][baremetalmachinesupdatesample] | Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Patch.json | -| [bmcKeySetsCreateOrUpdateSample.ts][bmckeysetscreateorupdatesample] | Create a new baseboard management controller key set or update the existing one for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Create.json | -| [bmcKeySetsDeleteSample.ts][bmckeysetsdeletesample] | Delete the baseboard management controller key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Delete.json | -| [bmcKeySetsGetSample.ts][bmckeysetsgetsample] | Get baseboard management controller key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Get.json | -| [bmcKeySetsListByClusterSample.ts][bmckeysetslistbyclustersample] | Get a list of baseboard management controller key sets for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_ListByCluster.json | -| [bmcKeySetsUpdateSample.ts][bmckeysetsupdatesample] | 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. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Patch.json | -| [cloudServicesNetworksCreateOrUpdateSample.ts][cloudservicesnetworkscreateorupdatesample] | Create a new cloud services network or update the properties of the existing cloud services network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Create.json | -| [cloudServicesNetworksDeleteSample.ts][cloudservicesnetworksdeletesample] | Delete the provided cloud services network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Delete.json | -| [cloudServicesNetworksGetSample.ts][cloudservicesnetworksgetsample] | Get properties of the provided cloud services network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Get.json | -| [cloudServicesNetworksListByResourceGroupSample.ts][cloudservicesnetworkslistbyresourcegroupsample] | Get a list of cloud services networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_ListByResourceGroup.json | -| [cloudServicesNetworksListBySubscriptionSample.ts][cloudservicesnetworkslistbysubscriptionsample] | Get a list of cloud services networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_ListBySubscription.json | -| [cloudServicesNetworksUpdateSample.ts][cloudservicesnetworksupdatesample] | Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Patch.json | -| [clusterManagersCreateOrUpdateSample.ts][clustermanagerscreateorupdatesample] | Create a new cluster manager or update properties of the cluster manager if it exists. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Create.json | -| [clusterManagersDeleteSample.ts][clustermanagersdeletesample] | Delete the provided cluster manager. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Delete.json | -| [clusterManagersGetSample.ts][clustermanagersgetsample] | Get the properties of the provided cluster manager. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Get.json | -| [clusterManagersListByResourceGroupSample.ts][clustermanagerslistbyresourcegroupsample] | Get a list of cluster managers in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_ListByResourceGroup.json | -| [clusterManagersListBySubscriptionSample.ts][clustermanagerslistbysubscriptionsample] | Get a list of cluster managers in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_ListBySubscription.json | -| [clusterManagersUpdateSample.ts][clustermanagersupdatesample] | Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Patch.json | -| [clustersContinueUpdateVersionSample.ts][clusterscontinueupdateversionsample] | Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ContinueUpdateVersion.json | -| [clustersCreateOrUpdateSample.ts][clusterscreateorupdatesample] | Create a new cluster or update the properties of the cluster if it exists. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Create.json | -| [clustersDeleteSample.ts][clustersdeletesample] | Delete the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Delete.json | -| [clustersDeploySample.ts][clustersdeploysample] | Deploy the cluster using the rack configuration provided during creation. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Deploy.json | -| [clustersGetSample.ts][clustersgetsample] | Get properties of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Get.json | -| [clustersListByResourceGroupSample.ts][clusterslistbyresourcegroupsample] | Get a list of clusters in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ListByResourceGroup.json | -| [clustersListBySubscriptionSample.ts][clusterslistbysubscriptionsample] | Get a list of clusters in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ListBySubscription.json | -| [clustersScanRuntimeSample.ts][clustersscanruntimesample] | Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ScanRuntime.json | -| [clustersUpdateSample.ts][clustersupdatesample] | Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.json | -| [clustersUpdateVersionSample.ts][clustersupdateversionsample] | Update the version of the provided cluster to one of the available supported versions. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_UpdateVersion.json | -| [consolesCreateOrUpdateSample.ts][consolescreateorupdatesample] | Create a new virtual machine console or update the properties of the existing virtual machine console. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Create.json | -| [consolesDeleteSample.ts][consolesdeletesample] | Delete the provided virtual machine console. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Delete.json | -| [consolesGetSample.ts][consolesgetsample] | Get properties of the provided virtual machine console. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Get.json | -| [consolesListByVirtualMachineSample.ts][consoleslistbyvirtualmachinesample] | Get a list of consoles for the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_ListByVirtualMachine.json | -| [consolesUpdateSample.ts][consolesupdatesample] | 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. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Patch.json | -| [kubernetesClusterFeaturesCreateOrUpdateSample.ts][kubernetesclusterfeaturescreateorupdatesample] | Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Create.json | -| [kubernetesClusterFeaturesDeleteSample.ts][kubernetesclusterfeaturesdeletesample] | Delete the provided Kubernetes cluster feature. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Delete.json | -| [kubernetesClusterFeaturesGetSample.ts][kubernetesclusterfeaturesgetsample] | Get properties of the provided the Kubernetes cluster feature. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Get.json | -| [kubernetesClusterFeaturesListByKubernetesClusterSample.ts][kubernetesclusterfeatureslistbykubernetesclustersample] | Get a list of features for the provided Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_ListByKubernetesCluster.json | -| [kubernetesClusterFeaturesUpdateSample.ts][kubernetesclusterfeaturesupdatesample] | Patch properties of the provided Kubernetes cluster feature. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Patch.json | -| [kubernetesClustersCreateOrUpdateSample.ts][kubernetesclusterscreateorupdatesample] | Create a new Kubernetes cluster or update the properties of the existing one. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Create.json | -| [kubernetesClustersDeleteSample.ts][kubernetesclustersdeletesample] | Delete the provided Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Delete.json | -| [kubernetesClustersGetSample.ts][kubernetesclustersgetsample] | Get properties of the provided the Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Get.json | -| [kubernetesClustersListByResourceGroupSample.ts][kubernetesclusterslistbyresourcegroupsample] | Get a list of Kubernetes clusters in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_ListByResourceGroup.json | -| [kubernetesClustersListBySubscriptionSample.ts][kubernetesclusterslistbysubscriptionsample] | Get a list of Kubernetes clusters in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_ListBySubscription.json | -| [kubernetesClustersRestartNodeSample.ts][kubernetesclustersrestartnodesample] | Restart a targeted node of a Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_RestartNode.json | -| [kubernetesClustersUpdateSample.ts][kubernetesclustersupdatesample] | Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Patch.json | -| [l2NetworksCreateOrUpdateSample.ts][l2networkscreateorupdatesample] | Create a new layer 2 (L2) network or update the properties of the existing network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Create.json | -| [l2NetworksDeleteSample.ts][l2networksdeletesample] | Delete the provided layer 2 (L2) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Delete.json | -| [l2NetworksGetSample.ts][l2networksgetsample] | Get properties of the provided layer 2 (L2) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Get.json | -| [l2NetworksListByResourceGroupSample.ts][l2networkslistbyresourcegroupsample] | Get a list of layer 2 (L2) networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_ListByResourceGroup.json | -| [l2NetworksListBySubscriptionSample.ts][l2networkslistbysubscriptionsample] | Get a list of layer 2 (L2) networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_ListBySubscription.json | -| [l2NetworksUpdateSample.ts][l2networksupdatesample] | Update tags associated with the provided layer 2 (L2) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Patch.json | -| [l3NetworksCreateOrUpdateSample.ts][l3networkscreateorupdatesample] | Create a new layer 3 (L3) network or update the properties of the existing network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Create.json | -| [l3NetworksDeleteSample.ts][l3networksdeletesample] | Delete the provided layer 3 (L3) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Delete.json | -| [l3NetworksGetSample.ts][l3networksgetsample] | Get properties of the provided layer 3 (L3) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Get.json | -| [l3NetworksListByResourceGroupSample.ts][l3networkslistbyresourcegroupsample] | Get a list of layer 3 (L3) networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_ListByResourceGroup.json | -| [l3NetworksListBySubscriptionSample.ts][l3networkslistbysubscriptionsample] | Get a list of layer 3 (L3) networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_ListBySubscription.json | -| [l3NetworksUpdateSample.ts][l3networksupdatesample] | Update tags associated with the provided layer 3 (L3) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Patch.json | -| [metricsConfigurationsCreateOrUpdateSample.ts][metricsconfigurationscreateorupdatesample] | Create new or update the existing metrics configuration of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Create.json | -| [metricsConfigurationsDeleteSample.ts][metricsconfigurationsdeletesample] | Delete the metrics configuration of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Delete.json | -| [metricsConfigurationsGetSample.ts][metricsconfigurationsgetsample] | Get metrics configuration of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Get.json | -| [metricsConfigurationsListByClusterSample.ts][metricsconfigurationslistbyclustersample] | Get a list of metrics configurations for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_ListByCluster.json | -| [metricsConfigurationsUpdateSample.ts][metricsconfigurationsupdatesample] | Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Patch.json | -| [operationsListSample.ts][operationslistsample] | Get a list of all available resource provider operations. It contains a URL link to get the next set of results. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Operations_List.json | -| [rackSkusGetSample.ts][rackskusgetsample] | Get the properties of the provided rack SKU. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/RackSkus_Get.json | -| [rackSkusListBySubscriptionSample.ts][rackskuslistbysubscriptionsample] | Get a list of rack SKUs in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/RackSkus_ListBySubscription.json | -| [racksCreateOrUpdateSample.ts][rackscreateorupdatesample] | Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Create.json | -| [racksDeleteSample.ts][racksdeletesample] | Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Delete.json | -| [racksGetSample.ts][racksgetsample] | Get properties of the provided rack. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Get.json | -| [racksListByResourceGroupSample.ts][rackslistbyresourcegroupsample] | Get a list of racks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_ListByResourceGroup.json | -| [racksListBySubscriptionSample.ts][rackslistbysubscriptionsample] | Get a list of racks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_ListBySubscription.json | -| [racksUpdateSample.ts][racksupdatesample] | Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Patch.json | -| [storageAppliancesCreateOrUpdateSample.ts][storageappliancescreateorupdatesample] | Create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Create.json | -| [storageAppliancesDeleteSample.ts][storageappliancesdeletesample] | Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Delete.json | -| [storageAppliancesDisableRemoteVendorManagementSample.ts][storageappliancesdisableremotevendormanagementsample] | Disable remote vendor management of the provided storage appliance. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_DisableRemoteVendorManagement.json | -| [storageAppliancesEnableRemoteVendorManagementSample.ts][storageappliancesenableremotevendormanagementsample] | Enable remote vendor management of the provided storage appliance. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_EnableRemoteVendorManagement.json | -| [storageAppliancesGetSample.ts][storageappliancesgetsample] | Get properties of the provided storage appliance. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Get.json | -| [storageAppliancesListByResourceGroupSample.ts][storageapplianceslistbyresourcegroupsample] | Get a list of storage appliances in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_ListByResourceGroup.json | -| [storageAppliancesListBySubscriptionSample.ts][storageapplianceslistbysubscriptionsample] | Get a list of storage appliances in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_ListBySubscription.json | -| [storageAppliancesRunReadCommandsSample.ts][storageappliancesrunreadcommandssample] | Run one or more read-only commands on the provided storage appliance. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_RunReadCommands.json | -| [storageAppliancesUpdateSample.ts][storageappliancesupdatesample] | Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Patch.json | -| [trunkedNetworksCreateOrUpdateSample.ts][trunkednetworkscreateorupdatesample] | Create a new trunked network or update the properties of the existing trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Create.json | -| [trunkedNetworksDeleteSample.ts][trunkednetworksdeletesample] | Delete the provided trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Delete.json | -| [trunkedNetworksGetSample.ts][trunkednetworksgetsample] | Get properties of the provided trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Get.json | -| [trunkedNetworksListByResourceGroupSample.ts][trunkednetworkslistbyresourcegroupsample] | Get a list of trunked networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_ListByResourceGroup.json | -| [trunkedNetworksListBySubscriptionSample.ts][trunkednetworkslistbysubscriptionsample] | Get a list of trunked networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_ListBySubscription.json | -| [trunkedNetworksUpdateSample.ts][trunkednetworksupdatesample] | Update tags associated with the provided trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Patch.json | -| [virtualMachinesAssignRelaySample.ts][virtualmachinesassignrelaysample] | Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_AssignRelay.json | -| [virtualMachinesCreateOrUpdateSample.ts][virtualmachinescreateorupdatesample] | Create a new virtual machine or update the properties of the existing virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Create.json | -| [virtualMachinesDeleteSample.ts][virtualmachinesdeletesample] | Delete the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Delete.json | -| [virtualMachinesGetSample.ts][virtualmachinesgetsample] | Get properties of the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Get.json | -| [virtualMachinesListByResourceGroupSample.ts][virtualmachineslistbyresourcegroupsample] | Get a list of virtual machines in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_ListByResourceGroup.json | -| [virtualMachinesListBySubscriptionSample.ts][virtualmachineslistbysubscriptionsample] | Get a list of virtual machines in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_ListBySubscription.json | -| [virtualMachinesPowerOffSample.ts][virtualmachinespoweroffsample] | Power off the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_PowerOff.json | -| [virtualMachinesReimageSample.ts][virtualmachinesreimagesample] | Reimage the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Reimage.json | -| [virtualMachinesRestartSample.ts][virtualmachinesrestartsample] | Restart the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Restart.json | -| [virtualMachinesStartSample.ts][virtualmachinesstartsample] | Start the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Start.json | -| [virtualMachinesUpdateSample.ts][virtualmachinesupdatesample] | 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. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Patch.json | -| [volumesCreateOrUpdateSample.ts][volumescreateorupdatesample] | Create a new volume or update the properties of the existing one. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Create.json | -| [volumesDeleteSample.ts][volumesdeletesample] | Delete the provided volume. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Delete.json | -| [volumesGetSample.ts][volumesgetsample] | Get properties of the provided volume. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Get.json | -| [volumesListByResourceGroupSample.ts][volumeslistbyresourcegroupsample] | Get a list of volumes in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_ListByResourceGroup.json | -| [volumesListBySubscriptionSample.ts][volumeslistbysubscriptionsample] | Get a list of volumes in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_ListBySubscription.json | -| [volumesUpdateSample.ts][volumesupdatesample] | Update tags associated with the provided volume. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Patch.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/agentPoolsCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -cross-env NETWORKCLOUD_SUBSCRIPTION_ID="" NETWORKCLOUD_RESOURCE_GROUP="" node dist/agentPoolsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[agentpoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsCreateOrUpdateSample.ts -[agentpoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsDeleteSample.ts -[agentpoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsGetSample.ts -[agentpoolslistbykubernetesclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsListByKubernetesClusterSample.ts -[agentpoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsUpdateSample.ts -[baremetalmachinekeysetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsCreateOrUpdateSample.ts -[baremetalmachinekeysetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsDeleteSample.ts -[baremetalmachinekeysetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsGetSample.ts -[baremetalmachinekeysetslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsListByClusterSample.ts -[baremetalmachinekeysetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsUpdateSample.ts -[baremetalmachinescordonsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesCordonSample.ts -[baremetalmachinescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesCreateOrUpdateSample.ts -[baremetalmachinesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesDeleteSample.ts -[baremetalmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesGetSample.ts -[baremetalmachineslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesListByResourceGroupSample.ts -[baremetalmachineslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesListBySubscriptionSample.ts -[baremetalmachinespoweroffsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesPowerOffSample.ts -[baremetalmachinesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesReimageSample.ts -[baremetalmachinesreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesReplaceSample.ts -[baremetalmachinesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRestartSample.ts -[baremetalmachinesruncommandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunCommandSample.ts -[baremetalmachinesrundataextractsrestrictedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunDataExtractsRestrictedSample.ts -[baremetalmachinesrundataextractssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunDataExtractsSample.ts -[baremetalmachinesrunreadcommandssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunReadCommandsSample.ts -[baremetalmachinesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesStartSample.ts -[baremetalmachinesuncordonsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesUncordonSample.ts -[baremetalmachinesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesUpdateSample.ts -[bmckeysetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsCreateOrUpdateSample.ts -[bmckeysetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsDeleteSample.ts -[bmckeysetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsGetSample.ts -[bmckeysetslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsListByClusterSample.ts -[bmckeysetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsUpdateSample.ts -[cloudservicesnetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksCreateOrUpdateSample.ts -[cloudservicesnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksDeleteSample.ts -[cloudservicesnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksGetSample.ts -[cloudservicesnetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksListByResourceGroupSample.ts -[cloudservicesnetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksListBySubscriptionSample.ts -[cloudservicesnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksUpdateSample.ts -[clustermanagerscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersCreateOrUpdateSample.ts -[clustermanagersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersDeleteSample.ts -[clustermanagersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersGetSample.ts -[clustermanagerslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersListByResourceGroupSample.ts -[clustermanagerslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersListBySubscriptionSample.ts -[clustermanagersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersUpdateSample.ts -[clusterscontinueupdateversionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersContinueUpdateVersionSample.ts -[clusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersCreateOrUpdateSample.ts -[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersDeleteSample.ts -[clustersdeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersDeploySample.ts -[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersGetSample.ts -[clusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersListByResourceGroupSample.ts -[clusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersListBySubscriptionSample.ts -[clustersscanruntimesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersScanRuntimeSample.ts -[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersUpdateSample.ts -[clustersupdateversionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersUpdateVersionSample.ts -[consolescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesCreateOrUpdateSample.ts -[consolesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesDeleteSample.ts -[consolesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesGetSample.ts -[consoleslistbyvirtualmachinesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesListByVirtualMachineSample.ts -[consolesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesUpdateSample.ts -[kubernetesclusterfeaturescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesCreateOrUpdateSample.ts -[kubernetesclusterfeaturesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesDeleteSample.ts -[kubernetesclusterfeaturesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesGetSample.ts -[kubernetesclusterfeatureslistbykubernetesclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesListByKubernetesClusterSample.ts -[kubernetesclusterfeaturesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesUpdateSample.ts -[kubernetesclusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersCreateOrUpdateSample.ts -[kubernetesclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersDeleteSample.ts -[kubernetesclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersGetSample.ts -[kubernetesclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersListByResourceGroupSample.ts -[kubernetesclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersListBySubscriptionSample.ts -[kubernetesclustersrestartnodesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersRestartNodeSample.ts -[kubernetesclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersUpdateSample.ts -[l2networkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksCreateOrUpdateSample.ts -[l2networksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksDeleteSample.ts -[l2networksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksGetSample.ts -[l2networkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksListByResourceGroupSample.ts -[l2networkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksListBySubscriptionSample.ts -[l2networksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksUpdateSample.ts -[l3networkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksCreateOrUpdateSample.ts -[l3networksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksDeleteSample.ts -[l3networksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksGetSample.ts -[l3networkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksListByResourceGroupSample.ts -[l3networkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksListBySubscriptionSample.ts -[l3networksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksUpdateSample.ts -[metricsconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsCreateOrUpdateSample.ts -[metricsconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsDeleteSample.ts -[metricsconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsGetSample.ts -[metricsconfigurationslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsListByClusterSample.ts -[metricsconfigurationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsUpdateSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/operationsListSample.ts -[rackskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/rackSkusGetSample.ts -[rackskuslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/rackSkusListBySubscriptionSample.ts -[rackscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksCreateOrUpdateSample.ts -[racksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksDeleteSample.ts -[racksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksGetSample.ts -[rackslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksListByResourceGroupSample.ts -[rackslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksListBySubscriptionSample.ts -[racksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksUpdateSample.ts -[storageappliancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesCreateOrUpdateSample.ts -[storageappliancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesDeleteSample.ts -[storageappliancesdisableremotevendormanagementsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesDisableRemoteVendorManagementSample.ts -[storageappliancesenableremotevendormanagementsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesEnableRemoteVendorManagementSample.ts -[storageappliancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesGetSample.ts -[storageapplianceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesListByResourceGroupSample.ts -[storageapplianceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesListBySubscriptionSample.ts -[storageappliancesrunreadcommandssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesRunReadCommandsSample.ts -[storageappliancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesUpdateSample.ts -[trunkednetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksCreateOrUpdateSample.ts -[trunkednetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksDeleteSample.ts -[trunkednetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksGetSample.ts -[trunkednetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksListByResourceGroupSample.ts -[trunkednetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksListBySubscriptionSample.ts -[trunkednetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksUpdateSample.ts -[virtualmachinesassignrelaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesAssignRelaySample.ts -[virtualmachinescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesCreateOrUpdateSample.ts -[virtualmachinesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesDeleteSample.ts -[virtualmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesGetSample.ts -[virtualmachineslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesListByResourceGroupSample.ts -[virtualmachineslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesListBySubscriptionSample.ts -[virtualmachinespoweroffsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesPowerOffSample.ts -[virtualmachinesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesReimageSample.ts -[virtualmachinesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesRestartSample.ts -[virtualmachinesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesStartSample.ts -[virtualmachinesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesUpdateSample.ts -[volumescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesCreateOrUpdateSample.ts -[volumesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesDeleteSample.ts -[volumesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesGetSample.ts -[volumeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesListByResourceGroupSample.ts -[volumeslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesListBySubscriptionSample.ts -[volumesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesUpdateSample.ts -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-networkcloud?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsCreateOrUpdateSample.ts deleted file mode 100644 index 2b2fcabe4a01..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsCreateOrUpdateSample.ts +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { AgentPool} from "@azure/arm-networkcloud"; -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Create.json - */ -async function createOrUpdateKubernetesClusterAgentPool(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const agentPoolParameters: AgentPool = { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - labels: [{ key: "kubernetes.label", value: "true" }], - location: "location", - mode: "System", - tags: { key1: "myvalue1", key2: "myvalue2" }, - taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_P46_224_v1", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - agentPoolParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsDeleteSample.ts deleted file mode 100644 index f5911171917b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsDeleteSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster agent pool. - * - * @summary Delete the provided Kubernetes cluster agent pool. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Delete.json - */ -async function deleteKubernetesClusterAgentPool(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsGetSample.ts deleted file mode 100644 index f91e07275a51..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsGetSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get properties of the provided Kubernetes cluster agent pool. - * - * @summary Get properties of the provided Kubernetes cluster agent pool. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Get.json - */ -async function getKubernetesClusterAgentPool(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.get( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - ); - console.log(result); -} - -async function main(): Promise { - await getKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsUpdateSample.ts deleted file mode 100644 index 57e4d72b2f43..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - AgentPoolPatchParameters, - AgentPoolsUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to 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. - * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_Patch.json - */ -async function patchKubernetesClusterAgentPool(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const agentPoolUpdateParameters: AgentPoolPatchParameters = { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - count: 3, - tags: { key1: "myvalue1", key2: "myvalue2" }, - upgradeSettings: { drainTimeout: 1800, maxSurge: "1", maxUnavailable: "0" }, - }; - const options: AgentPoolsUpdateOptionalParams = { agentPoolUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsCreateOrUpdateSample.ts deleted file mode 100644 index 1cbd779a3b34..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsCreateOrUpdateSample.ts +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { BareMetalMachineKeySet} from "@azure/arm-networkcloud"; -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new bare metal machine key set or update the existing one for the provided cluster. - * - * @summary Create a new bare metal machine key set or update the existing one for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Create.json - */ -async function createOrUpdateBareMetalMachineKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const bareMetalMachineKeySetParameters: BareMetalMachineKeySet = { - azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", - expiration: new Date("2022-12-31T23:59:59.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], - location: "location", - osGroupName: "standardAccessGroup", - privilegeLevel: "Other", - privilegeLevelName: "SecurityScanner", - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.bareMetalMachineKeySets.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - bareMetalMachineKeySetParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsDeleteSample.ts deleted file mode 100644 index 1a9193d9016b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsDeleteSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the bare metal machine key set of the provided cluster. - * - * @summary Delete the bare metal machine key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Delete.json - */ -async function deleteBareMetalMachineKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.beginDeleteAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsGetSample.ts deleted file mode 100644 index 53a634fdb13c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsGetSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get bare metal machine key set of the provided cluster. - * - * @summary Get bare metal machine key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Get.json - */ -async function getBareMetalMachineKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.get( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - ); - console.log(result); -} - -async function main(): Promise { - await getBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsUpdateSample.ts deleted file mode 100644 index 6193871d75d3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsUpdateSample.ts +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BareMetalMachineKeySetPatchParameters, - BareMetalMachineKeySetsUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to 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. - * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_Patch.json - */ -async function patchBareMetalMachineKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const bareMetalMachineKeySetUpdateParameters: BareMetalMachineKeySetPatchParameters = - { - expiration: new Date("2022-12-31T23:59:59.008Z"), - jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const options: BareMetalMachineKeySetsUpdateOptionalParams = { - bareMetalMachineKeySetUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.beginUpdateAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesCordonSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesCordonSample.ts deleted file mode 100644 index fbf3ec30fdd2..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesCordonSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BareMetalMachineCordonParameters, - BareMetalMachinesCordonOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Cordon the provided bare metal machine's Kubernetes node. - * - * @summary Cordon the provided bare metal machine's Kubernetes node. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Cordon.json - */ -async function cordonBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineCordonParameters: BareMetalMachineCordonParameters = { - evacuate: "True", - }; - const options: BareMetalMachinesCordonOptionalParams = { - bareMetalMachineCordonParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginCordonAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await cordonBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesCreateOrUpdateSample.ts deleted file mode 100644 index 9a33a4fa70c7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { BareMetalMachine} from "@azure/arm-networkcloud"; -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Create.json - */ -async function createOrUpdateBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineParameters: BareMetalMachine = { - bmcConnectionString: "bmcconnectionstring", - bmcCredentials: { password: "{password}", username: "bmcuser" }, - bmcMacAddress: "00:00:4f:00:57:00", - bootMacAddress: "00:00:4e:00:58:af", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - machineDetails: "User-provided machine details.", - machineName: "r01c001", - machineSkuId: "684E-3B16-399E", - rackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - rackSlot: 1, - serialNumber: "BM1219XXX", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginCreateOrUpdateAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesGetSample.ts deleted file mode 100644 index ea02f292f72b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesGetSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get properties of the provided bare metal machine. - * - * @summary Get properties of the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Get.json - */ -async function getBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.get( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main(): Promise { - await getBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesPowerOffSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesPowerOffSample.ts deleted file mode 100644 index 766fdc95911e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesPowerOffSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BareMetalMachinePowerOffParameters, - BareMetalMachinesPowerOffOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Power off the provided bare metal machine. - * - * @summary Power off the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_PowerOff.json - */ -async function powerOffBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachinePowerOffParameters: BareMetalMachinePowerOffParameters = - { skipShutdown: "True" }; - const options: BareMetalMachinesPowerOffOptionalParams = { - bareMetalMachinePowerOffParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginPowerOffAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await powerOffBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesReimageSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesReimageSample.ts deleted file mode 100644 index 1e9e093b32f0..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesReimageSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Reimage the provided bare metal machine. - * - * @summary Reimage the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Reimage.json - */ -async function reimageBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginReimageAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main(): Promise { - await reimageBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesReplaceSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesReplaceSample.ts deleted file mode 100644 index 2917cafcf204..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesReplaceSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BareMetalMachineReplaceParameters, - BareMetalMachinesReplaceOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Replace the provided bare metal machine. - * - * @summary Replace the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Replace.json - */ -async function replaceBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineReplaceParameters: BareMetalMachineReplaceParameters = { - bmcCredentials: { - password: "https://keyvaultname.vault.azure.net/secrets/secretName", - username: "bmcuser", - }, - bmcMacAddress: "00:00:4f:00:57:ad", - bootMacAddress: "00:00:4e:00:58:af", - machineName: "name", - safeguardMode: "All", - serialNumber: "BM1219XXX", - storagePolicy: "DiscardAll", - }; - const options: BareMetalMachinesReplaceOptionalParams = { - bareMetalMachineReplaceParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginReplaceAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await replaceBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRestartSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRestartSample.ts deleted file mode 100644 index d1c337415e55..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRestartSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Restart the provided bare metal machine. - * - * @summary Restart the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Restart.json - */ -async function restartBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRestartAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main(): Promise { - await restartBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunCommandSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunCommandSample.ts deleted file mode 100644 index c4fb79a0e4b6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunCommandSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BareMetalMachineRunCommandParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunCommand.json - */ -async function runCommandOnBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters = - { - arguments: ["--argument1", "argument2"], - limitTimeSeconds: 60, - script: "cHdkCg==", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunCommandAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunCommandParameters, - ); - console.log(result); -} - -async function main(): Promise { - await runCommandOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunDataExtractsRestrictedSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunDataExtractsRestrictedSample.ts deleted file mode 100644 index 7f4eec2bb43b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunDataExtractsRestrictedSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BareMetalMachineRunDataExtractsParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunDataExtractsRestricted.json - */ -async function runRestrictedDataExtractionOnBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters = - { - limitTimeSeconds: 60, - commands: [ - { arguments: ["--min-severity=8"], command: "cluster-cve-report" }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.bareMetalMachines.beginRunDataExtractsRestrictedAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunDataExtractsRestrictedParameters, - ); - console.log(result); -} - -async function main(): Promise { - await runRestrictedDataExtractionOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunDataExtractsSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunDataExtractsSample.ts deleted file mode 100644 index 0e37d68e8ae6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunDataExtractsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BareMetalMachineRunDataExtractsParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunDataExtracts.json - */ -async function runDataExtractionOnBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters = - { - limitTimeSeconds: 60, - commands: [ - { - arguments: ["SysInfo", "TTYLog"], - command: "hardware-support-data-collection", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunDataExtractsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunDataExtractsParameters, - ); - console.log(result); -} - -async function main(): Promise { - await runDataExtractionOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunReadCommandsSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunReadCommandsSample.ts deleted file mode 100644 index 3fb877af6252..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesRunReadCommandsSample.ts +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BareMetalMachineRunReadCommandsParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunReadCommands_Hostname.json - */ -async function runAndRetrieveOutputFromASingleReadOnlyCommandOnBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters = - { limitTimeSeconds: 60, commands: [{ command: "hostname" }] }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunReadCommandsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunReadCommandsParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_RunReadCommands_Multiple.json - */ -async function runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters = - { - limitTimeSeconds: 60, - commands: [ - { arguments: ["pods", "-A"], command: "kubectl get" }, - { arguments: ["192.168.0.99", "-c", "3"], command: "ping" }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunReadCommandsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunReadCommandsParameters, - ); - console.log(result); -} - -async function main(): Promise { - await runAndRetrieveOutputFromASingleReadOnlyCommandOnBareMetalMachine(); - await runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesStartSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesStartSample.ts deleted file mode 100644 index a39a4fabfc57..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesStartSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Start the provided bare metal machine. - * - * @summary Start the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Start.json - */ -async function startBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginStartAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main(): Promise { - await startBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesUncordonSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesUncordonSample.ts deleted file mode 100644 index 0895e8210a32..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesUncordonSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Uncordon the provided bare metal machine's Kubernetes node. - * - * @summary Uncordon the provided bare metal machine's Kubernetes node. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Uncordon.json - */ -async function uncordonBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginUncordonAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main(): Promise { - await uncordonBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesUpdateSample.ts deleted file mode 100644 index 963e5afd9eba..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesUpdateSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BareMetalMachinePatchParameters, - BareMetalMachinesUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Patch.json - */ -async function patchBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineUpdateParameters: BareMetalMachinePatchParameters = { - machineDetails: "machinedetails", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: BareMetalMachinesUpdateOptionalParams = { - bareMetalMachineUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginUpdateAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsCreateOrUpdateSample.ts deleted file mode 100644 index 797056a042e0..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsCreateOrUpdateSample.ts +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { BmcKeySet} from "@azure/arm-networkcloud"; -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new baseboard management controller key set or update the existing one for the provided cluster. - * - * @summary Create a new baseboard management controller key set or update the existing one for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Create.json - */ -async function createOrUpdateBaseboardManagementControllerKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const bmcKeySetParameters: BmcKeySet = { - azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", - expiration: new Date("2022-12-31T23:59:59.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - privilegeLevel: "Administrator", - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - bmcKeySetParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsDeleteSample.ts deleted file mode 100644 index 7dc1508b4f11..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsDeleteSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the baseboard management controller key set of the provided cluster. - * - * @summary Delete the baseboard management controller key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Delete.json - */ -async function deleteBaseboardManagementControllerKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginDeleteAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsGetSample.ts deleted file mode 100644 index c4df5af1b4cd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsGetSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get baseboard management controller key set of the provided cluster. - * - * @summary Get baseboard management controller key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Get.json - */ -async function getBaseboardManagementControllerKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.get( - resourceGroupName, - clusterName, - bmcKeySetName, - ); - console.log(result); -} - -async function main(): Promise { - await getBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsUpdateSample.ts deleted file mode 100644 index 566ac9dc1b67..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsUpdateSample.ts +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - BmcKeySetPatchParameters, - BmcKeySetsUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to 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. - * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_Patch.json - */ -async function patchBaseboardManagementControllerKeySetOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const bmcKeySetUpdateParameters: BmcKeySetPatchParameters = { - expiration: new Date("2022-12-31T23:59:59.008Z"), - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const options: BmcKeySetsUpdateOptionalParams = { bmcKeySetUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginUpdateAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksCreateOrUpdateSample.ts deleted file mode 100644 index dad6158ce1b3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { CloudServicesNetwork} from "@azure/arm-networkcloud"; -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new cloud services network or update the properties of the existing cloud services network. - * - * @summary Create a new cloud services network or update the properties of the existing cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Create.json - */ -async function createOrUpdateCloudServicesNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const cloudServicesNetworkParameters: CloudServicesNetwork = { - additionalEgressEndpoints: [ - { - category: "azure-resource-management", - endpoints: [ - { domainName: "storageaccountex.blob.core.windows.net", port: 443 }, - ], - }, - ], - enableDefaultEgressEndpoints: "False", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - storageOptions: { - mode: "Standard", - sizeMiB: 1048576, - storageApplianceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - cloudServicesNetworkName, - cloudServicesNetworkParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksDeleteSample.ts deleted file mode 100644 index 3e9202e6ebba..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the provided cloud services network. - * - * @summary Delete the provided cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Delete.json - */ -async function deleteCloudServicesNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginDeleteAndWait( - resourceGroupName, - cloudServicesNetworkName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksGetSample.ts deleted file mode 100644 index febdabce9b95..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksGetSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get properties of the provided cloud services network. - * - * @summary Get properties of the provided cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Get.json - */ -async function getCloudServicesNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.get( - resourceGroupName, - cloudServicesNetworkName, - ); - console.log(result); -} - -async function main(): Promise { - await getCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksUpdateSample.ts deleted file mode 100644 index f7f04a3ae0ed..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksUpdateSample.ts +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - CloudServicesNetworkPatchParameters, - CloudServicesNetworksUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_Patch.json - */ -async function patchCloudServicesNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const cloudServicesNetworkUpdateParameters: CloudServicesNetworkPatchParameters = - { - additionalEgressEndpoints: [ - { - category: "azure-resource-management", - endpoints: [ - { domainName: "storageaccountex.blob.core.windows.net", port: 443 }, - ], - }, - ], - enableDefaultEgressEndpoints: "False", - storageOptions: { - mode: "Standard", - sizeMiB: 1048576, - storageApplianceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: CloudServicesNetworksUpdateOptionalParams = { - cloudServicesNetworkUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginUpdateAndWait( - resourceGroupName, - cloudServicesNetworkName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersCreateOrUpdateSample.ts deleted file mode 100644 index fbd3b91aff32..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersCreateOrUpdateSample.ts +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { ClusterManager} from "@azure/arm-networkcloud"; -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new cluster manager or update properties of the cluster manager if it exists. - * - * @summary Create a new cluster manager or update properties of the cluster manager if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Create.json - */ -async function createOrUpdateClusterManager(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerParameters: ClusterManager = { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - fabricControllerId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", - identity: { type: "SystemAssigned" }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterManagerName, - clusterManagerParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new cluster manager or update properties of the cluster manager if it exists. - * - * @summary Create a new cluster manager or update properties of the cluster manager if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Create_Uami.json - */ -async function createOrUpdateClusterManagerWithUserAssignedIdentity(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerParameters: ClusterManager = { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - fabricControllerId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterManagerName, - clusterManagerParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateClusterManager(); - await createOrUpdateClusterManagerWithUserAssignedIdentity(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersDeleteSample.ts deleted file mode 100644 index 2666e1e6a155..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the provided cluster manager. - * - * @summary Delete the provided cluster manager. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Delete.json - */ -async function deleteClusterManager(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginDeleteAndWait( - resourceGroupName, - clusterManagerName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersGetSample.ts deleted file mode 100644 index 23146680304e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersGetSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the properties of the provided cluster manager. - * - * @summary Get the properties of the provided cluster manager. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Get.json - */ -async function getClusterManager(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.get( - resourceGroupName, - clusterManagerName, - ); - console.log(result); -} - -async function main(): Promise { - await getClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersUpdateSample.ts deleted file mode 100644 index 573eb6969ffb..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ClusterManagerPatchParameters, - ClusterManagersUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_Patch.json - */ -async function patchClusterManager(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerUpdateParameters: ClusterManagerPatchParameters = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClusterManagersUpdateOptionalParams = { - clusterManagerUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.update( - resourceGroupName, - clusterManagerName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersContinueUpdateVersionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersContinueUpdateVersionSample.ts deleted file mode 100644 index 52df8007aefa..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersContinueUpdateVersionSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ClusterContinueUpdateVersionParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. - * - * @summary Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ContinueUpdateVersion.json - */ -async function continueUpdateClusterVersion(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters = - { machineGroupTargetingMode: "AlphaByRack" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginContinueUpdateVersionAndWait( - resourceGroupName, - clusterName, - clusterContinueUpdateVersionParameters, - ); - console.log(result); -} - -async function main(): Promise { - await continueUpdateClusterVersion(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersDeleteSample.ts deleted file mode 100644 index d6e97b704f58..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the provided cluster. - * - * @summary Delete the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Delete.json - */ -async function deleteCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeleteAndWait( - resourceGroupName, - clusterName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersDeploySample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersDeploySample.ts deleted file mode 100644 index efb2dd476b7a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersDeploySample.ts +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ClusterDeployParameters, - ClustersDeployOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deploy the cluster using the rack configuration provided during creation. - * - * @summary Deploy the cluster using the rack configuration provided during creation. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Deploy.json - */ -async function deployCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterDeployParameters: ClusterDeployParameters = {}; - const options: ClustersDeployOptionalParams = { clusterDeployParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeployAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deploy the cluster using the rack configuration provided during creation. - * - * @summary Deploy the cluster using the rack configuration provided during creation. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Deploy_SkipValidation.json - */ -async function deployClusterSkippingValidation(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterDeployParameters: ClusterDeployParameters = { - skipValidationsForMachines: ["bmmName1"], - }; - const options: ClustersDeployOptionalParams = { clusterDeployParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeployAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await deployCluster(); - await deployClusterSkippingValidation(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersGetSample.ts deleted file mode 100644 index 617739f3648b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get properties of the provided cluster. - * - * @summary Get properties of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Get.json - */ -async function getCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.get(resourceGroupName, clusterName); - console.log(result); -} - -async function main(): Promise { - await getCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersListByResourceGroupSample.ts deleted file mode 100644 index 773b0d926c6e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersListByResourceGroupSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a list of clusters in the provided resource group. - * - * @summary Get a list of clusters in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ListByResourceGroup.json - */ -async function listClustersForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clusters.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listClustersForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersScanRuntimeSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersScanRuntimeSample.ts deleted file mode 100644 index 967a7c434bad..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersScanRuntimeSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ClusterScanRuntimeParameters, - ClustersScanRuntimeOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. - * - * @summary Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ScanRuntime.json - */ -async function executeARuntimeProtectionScanOnTheCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterScanRuntimeParameters: ClusterScanRuntimeParameters = { - scanActivity: "Scan", - }; - const options: ClustersScanRuntimeOptionalParams = { - clusterScanRuntimeParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginScanRuntimeAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await executeARuntimeProtectionScanOnTheCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersUpdateSample.ts deleted file mode 100644 index 7a051dad9ac6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersUpdateSample.ts +++ /dev/null @@ -1,347 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ClusterPatchParameters, - ClustersUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.json - */ -async function patchClusterAggregatorOrSingleRackDefinition(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - aggregatorOrSingleRackDefinition: { - bareMetalMachineConfigurationData: [ - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:FF", - bootMacAddress: "00:BB:CC:DD:EE:FF", - machineDetails: "extraDetails", - machineName: "bmmName1", - rackSlot: 1, - serialNumber: "BM1219XXX", - }, - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:00", - bootMacAddress: "00:BB:CC:DD:EE:00", - machineDetails: "extraDetails", - machineName: "bmmName2", - rackSlot: 2, - serialNumber: "BM1219YYY", - }, - ], - networkRackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", - rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", - rackSerialNumber: "newSerialNumber", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - storageApplianceConfigurationData: [ - { - adminCredentials: { password: "{password}", username: "username" }, - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceName: "vmName", - }, - ], - }, - computeDeploymentThreshold: { - type: "PercentSuccess", - grouping: "PerCluster", - value: 90, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_AnalyticsOutput.json - */ -async function patchClusterAnalyticsOutput(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - analyticsOutputSettings: { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", - }, - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_CommandOutput.json - */ -async function patchClusterCommandOutput(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - commandOutputSettings: { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", - }, - containerUrl: - "https://myaccount.blob.core.windows.net/mycontainer?restype=container", - overrides: [ - { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", - }, - commandOutputType: "StorageRunReadCommands", - containerUrl: - "https://myaccount.blob.core.windows.net/myContainer2?restype=container", - }, - ], - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_Location.json - */ -async function patchClusterLocation(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - clusterLocation: "Foo Street, 3rd Floor, row 9", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_RuntimeProtectionConfiguration.json - */ -async function patchRuntimeProtectionConfiguration(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - runtimeProtectionConfiguration: { enforcementLevel: "OnDemand" }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_SecretArchive.json - */ -async function patchSecretArchive(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - secretArchiveSettings: { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", - }, - vaultUri: "https://keyvaultname.vault.azure.net/", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_UpdateStrategy.json - */ -async function patchUpdateStrategy(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - updateStrategy: { - maxUnavailable: 4, - strategyType: "Rack", - thresholdType: "CountSuccess", - thresholdValue: 4, - waitTimeMinutes: 10, - }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Patch_VulnerabilityScanning.json - */ -async function patchVulnerabilityScanning(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - vulnerabilityScanningSettings: { containerScan: "Enabled" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchClusterAggregatorOrSingleRackDefinition(); - await patchClusterAnalyticsOutput(); - await patchClusterCommandOutput(); - await patchClusterLocation(); - await patchRuntimeProtectionConfiguration(); - await patchSecretArchive(); - await patchUpdateStrategy(); - await patchVulnerabilityScanning(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersUpdateVersionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersUpdateVersionSample.ts deleted file mode 100644 index 53f269c51cad..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersUpdateVersionSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ClusterUpdateVersionParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update the version of the provided cluster to one of the available supported versions. - * - * @summary Update the version of the provided cluster to one of the available supported versions. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_UpdateVersion.json - */ -async function updateClusterVersion(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateVersionParameters: ClusterUpdateVersionParameters = { - targetClusterVersion: "2.0", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateVersionAndWait( - resourceGroupName, - clusterName, - clusterUpdateVersionParameters, - ); - console.log(result); -} - -async function main(): Promise { - await updateClusterVersion(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesCreateOrUpdateSample.ts deleted file mode 100644 index f3b3f2eda18e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { Console} from "@azure/arm-networkcloud"; -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new virtual machine console or update the properties of the existing virtual machine console. - * - * @summary Create a new virtual machine console or update the properties of the existing virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Create.json - */ -async function createOrUpdateVirtualMachineConsole(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const consoleParameters: Console = { - enabled: "True", - expiration: new Date("2022-06-01T01:27:03.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - consoleParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesDeleteSample.ts deleted file mode 100644 index bc91277fc716..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesDeleteSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the provided virtual machine console. - * - * @summary Delete the provided virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Delete.json - */ -async function deleteVirtualMachineConsole(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesGetSample.ts deleted file mode 100644 index 2716ed9618df..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesGetSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get properties of the provided virtual machine console. - * - * @summary Get properties of the provided virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Get.json - */ -async function getVirtualMachineConsole(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.get( - resourceGroupName, - virtualMachineName, - consoleName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesUpdateSample.ts deleted file mode 100644 index cb0ca17307be..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ConsolePatchParameters, - ConsolesUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to 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. - * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_Patch.json - */ -async function patchVirtualMachineConsole(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const consoleUpdateParameters: ConsolePatchParameters = { - enabled: "True", - expiration: new Date("2022-06-01T01:27:03.008Z"), - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ConsolesUpdateOptionalParams = { consoleUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesCreateOrUpdateSample.ts deleted file mode 100644 index 588a9a58fba2..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesCreateOrUpdateSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - KubernetesClusterFeature} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. - * - * @summary Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Create.json - */ -async function createOrUpdateKubernetesClusterFeature(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const kubernetesClusterFeatureParameters: KubernetesClusterFeature = { - location: "location", - options: [{ key: "featureOptionName", value: "featureOptionValue" }], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.kubernetesClusterFeatures.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - kubernetesClusterFeatureParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesDeleteSample.ts deleted file mode 100644 index 4b9c4e217129..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesDeleteSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster feature. - * - * @summary Delete the provided Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Delete.json - */ -async function deleteKubernetesClusterFeature(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesGetSample.ts deleted file mode 100644 index abec9fc58965..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesGetSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get properties of the provided the Kubernetes cluster feature. - * - * @summary Get properties of the provided the Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Get.json - */ -async function getKubernetesClusterFeature(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.get( - resourceGroupName, - kubernetesClusterName, - featureName, - ); - console.log(result); -} - -async function main(): Promise { - await getKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesUpdateSample.ts deleted file mode 100644 index cc9004f2477b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - KubernetesClusterFeaturePatchParameters, - KubernetesClusterFeaturesUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Patch properties of the provided Kubernetes cluster feature. - * - * @summary Patch properties of the provided Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_Patch.json - */ -async function patchKubernetesClusterFeature(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const kubernetesClusterFeatureUpdateParameters: KubernetesClusterFeaturePatchParameters = - { - options: [{ key: "featureOptionName", value: "featureOptionValue" }], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: KubernetesClusterFeaturesUpdateOptionalParams = { - kubernetesClusterFeatureUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersCreateOrUpdateSample.ts deleted file mode 100644 index eb2c8b73e327..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersCreateOrUpdateSample.ts +++ /dev/null @@ -1,337 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { KubernetesCluster} from "@azure/arm-networkcloud"; -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new Kubernetes cluster or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Create.json - */ -async function createOrUpdateKubernetesCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterParameters: KubernetesCluster = { - aadConfiguration: { - adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"], - }, - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - vmSkuName: "NC_G6_28_v1", - }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - initialAgentPoolConfigurations: [ - { - name: "SystemPool-1", - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - labels: [{ key: "kubernetes.label", value: "true" }], - mode: "System", - taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_P46_224_v1", - }, - ], - kubernetesVersion: "1.XX.Y", - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkConfiguration: { - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - bgpServiceLoadBalancerConfiguration: { - bgpAdvertisements: [ - { - advertiseToFabric: "True", - communities: ["64512:100"], - ipAddressPools: ["pool1"], - peers: ["peer1"], - }, - ], - bgpPeers: [ - { - name: "peer1", - bfdEnabled: "False", - bgpMultiHop: "False", - holdTime: "P300s", - keepAliveTime: "P300s", - myAsn: 64512, - peerAddress: "203.0.113.254", - peerAsn: 64497, - peerPort: 179, - }, - ], - fabricPeeringEnabled: "True", - ipAddressPools: [ - { - name: "pool1", - addresses: ["198.51.102.0/24"], - autoAssign: "True", - onlyUseHostIps: "True", - }, - ], - }, - cloudServicesNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - cniNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - dnsServiceIp: "198.51.101.2", - podCidrs: ["198.51.100.0/24"], - serviceCidrs: ["198.51.101.0/24"], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new Kubernetes cluster or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_L2LoadBalancer_Create.json - */ -async function createOrUpdateKubernetesClusterWithALayer2LoadBalancer(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterParameters: KubernetesCluster = { - aadConfiguration: { - adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"], - }, - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - vmSkuName: "NC_G6_28_v1", - }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - initialAgentPoolConfigurations: [ - { - name: "SystemPool-1", - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - labels: [{ key: "kubernetes.label", value: "true" }], - mode: "System", - taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_P46_224_v1", - }, - ], - kubernetesVersion: "1.XX.Y", - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkConfiguration: { - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - cloudServicesNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - cniNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - dnsServiceIp: "198.51.101.2", - l2ServiceLoadBalancerConfiguration: { - ipAddressPools: [ - { - name: "pool1", - addresses: ["198.51.102.2-198.51.102.254"], - autoAssign: "True", - }, - ], - }, - podCidrs: ["198.51.100.0/24"], - serviceCidrs: ["198.51.101.0/24"], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateKubernetesCluster(); - await createOrUpdateKubernetesClusterWithALayer2LoadBalancer(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersDeleteSample.ts deleted file mode 100644 index 5af261eb01c6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster. - * - * @summary Delete the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Delete.json - */ -async function deleteKubernetesCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersGetSample.ts deleted file mode 100644 index e6b94a90dd05..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersGetSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get properties of the provided the Kubernetes cluster. - * - * @summary Get properties of the provided the Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Get.json - */ -async function getKubernetesCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.get( - resourceGroupName, - kubernetesClusterName, - ); - console.log(result); -} - -async function main(): Promise { - await getKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersRestartNodeSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersRestartNodeSample.ts deleted file mode 100644 index 396734a8364a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersRestartNodeSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - KubernetesClusterRestartNodeParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Restart a targeted node of a Kubernetes cluster. - * - * @summary Restart a targeted node of a Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_RestartNode.json - */ -async function restartAKubernetesClusterNode(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters = - { nodeName: "nodeName" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginRestartNodeAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterRestartNodeParameters, - ); - console.log(result); -} - -async function main(): Promise { - await restartAKubernetesClusterNode(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersUpdateSample.ts deleted file mode 100644 index cc2261cd55cc..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersUpdateSample.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - KubernetesClusterPatchParameters, - KubernetesClustersUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_Patch.json - */ -async function patchKubernetesCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterUpdateParameters: KubernetesClusterPatchParameters = { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - count: 3, - }, - kubernetesVersion: "1.XX.Y", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: KubernetesClustersUpdateOptionalParams = { - kubernetesClusterUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksDeleteSample.ts deleted file mode 100644 index a0f6d38f5b1c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the provided layer 2 (L2) network. - * - * @summary Delete the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Delete.json - */ -async function deleteL2Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.beginDeleteAndWait( - resourceGroupName, - l2NetworkName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksGetSample.ts deleted file mode 100644 index 3a59564b35d9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get properties of the provided layer 2 (L2) network. - * - * @summary Get properties of the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Get.json - */ -async function getL2Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.get(resourceGroupName, l2NetworkName); - console.log(result); -} - -async function main(): Promise { - await getL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksUpdateSample.ts deleted file mode 100644 index dca17be86ceb..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksUpdateSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - L2NetworkPatchParameters, - L2NetworksUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update tags associated with the provided layer 2 (L2) network. - * - * @summary Update tags associated with the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Patch.json - */ -async function patchL2Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const l2NetworkUpdateParameters: L2NetworkPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: L2NetworksUpdateOptionalParams = { l2NetworkUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.update( - resourceGroupName, - l2NetworkName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksDeleteSample.ts deleted file mode 100644 index 392a7524560f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the provided layer 3 (L3) network. - * - * @summary Delete the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Delete.json - */ -async function deleteL3Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.beginDeleteAndWait( - resourceGroupName, - l3NetworkName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksGetSample.ts deleted file mode 100644 index 7cd4193f20ee..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get properties of the provided layer 3 (L3) network. - * - * @summary Get properties of the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Get.json - */ -async function getL3Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.get(resourceGroupName, l3NetworkName); - console.log(result); -} - -async function main(): Promise { - await getL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksUpdateSample.ts deleted file mode 100644 index 83859c05ae87..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksUpdateSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - L3NetworkPatchParameters, - L3NetworksUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update tags associated with the provided layer 3 (L3) network. - * - * @summary Update tags associated with the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Patch.json - */ -async function patchL3Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const l3NetworkUpdateParameters: L3NetworkPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: L3NetworksUpdateOptionalParams = { l3NetworkUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.update( - resourceGroupName, - l3NetworkName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index bb94bc41bc95..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ClusterMetricsConfiguration} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create new or update the existing metrics configuration of the provided cluster. - * - * @summary Create new or update the existing metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Create.json - */ -async function createOrUpdateMetricsConfigurationOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const metricsConfigurationParameters: ClusterMetricsConfiguration = { - collectionInterval: 15, - enabledMetrics: ["metric1", "metric2"], - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - metricsConfigurationParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsDeleteSample.ts deleted file mode 100644 index 69707a078e3b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsDeleteSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the metrics configuration of the provided cluster. - * - * @summary Delete the metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Delete.json - */ -async function deleteMetricsConfigurationOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginDeleteAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsGetSample.ts deleted file mode 100644 index e686a29bcbf5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsGetSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get metrics configuration of the provided cluster. - * - * @summary Get metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Get.json - */ -async function getMetricsConfigurationOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.get( - resourceGroupName, - clusterName, - metricsConfigurationName, - ); - console.log(result); -} - -async function main(): Promise { - await getMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsUpdateSample.ts deleted file mode 100644 index 6d3bc33a9d9a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - ClusterMetricsConfigurationPatchParameters, - MetricsConfigurationsUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_Patch.json - */ -async function patchMetricsConfigurationOfCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const metricsConfigurationUpdateParameters: ClusterMetricsConfigurationPatchParameters = - { - collectionInterval: 15, - enabledMetrics: ["metric1", "metric2"], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: MetricsConfigurationsUpdateOptionalParams = { - metricsConfigurationUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginUpdateAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/rackSkusGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/rackSkusGetSample.ts deleted file mode 100644 index aedb6cb34f2c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/rackSkusGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the properties of the provided rack SKU. - * - * @summary Get the properties of the provided rack SKU. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/RackSkus_Get.json - */ -async function getRackSkuResource(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const rackSkuName = "rackSkuName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.rackSkus.get(rackSkuName); - console.log(result); -} - -async function main(): Promise { - await getRackSkuResource(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksGetSample.ts deleted file mode 100644 index b102632188f4..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get properties of the provided rack. - * - * @summary Get properties of the provided rack. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Get.json - */ -async function getRack(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.get(resourceGroupName, rackName); - console.log(result); -} - -async function main(): Promise { - await getRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksListByResourceGroupSample.ts deleted file mode 100644 index 8b2f34e0129a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksListByResourceGroupSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a list of racks in the provided resource group. - * - * @summary Get a list of racks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_ListByResourceGroup.json - */ -async function listRacksForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.racks.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listRacksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksUpdateSample.ts deleted file mode 100644 index daa0ff95f979..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksUpdateSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - RackPatchParameters, - RacksUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Patch.json - */ -async function patchRack(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const rackUpdateParameters: RackPatchParameters = { - rackLocation: "Rack 2B", - rackSerialNumber: "RACK_SERIAL_NUMBER", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: RacksUpdateOptionalParams = { rackUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginUpdateAndWait( - resourceGroupName, - rackName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesCreateOrUpdateSample.ts deleted file mode 100644 index b1c40f2591fc..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { StorageAppliance} from "@azure/arm-networkcloud"; -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Create.json - */ -async function createOrUpdateStorageAppliance(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceParameters: StorageAppliance = { - administratorCredentials: { password: "{password}", username: "adminUser" }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - rackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceSkuId: "684E-3B16-399E", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - storageApplianceName, - storageApplianceParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesDisableRemoteVendorManagementSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesDisableRemoteVendorManagementSample.ts deleted file mode 100644 index e8f70ef38154..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesDisableRemoteVendorManagementSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Disable remote vendor management of the provided storage appliance. - * - * @summary Disable remote vendor management of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_DisableRemoteVendorManagement.json - */ -async function turnOffRemoteVendorManagementForStorageAppliance(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.storageAppliances.beginDisableRemoteVendorManagementAndWait( - resourceGroupName, - storageApplianceName, - ); - console.log(result); -} - -async function main(): Promise { - await turnOffRemoteVendorManagementForStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesEnableRemoteVendorManagementSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesEnableRemoteVendorManagementSample.ts deleted file mode 100644 index 832d1508d9d6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesEnableRemoteVendorManagementSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - StorageApplianceEnableRemoteVendorManagementParameters, - StorageAppliancesEnableRemoteVendorManagementOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Enable remote vendor management of the provided storage appliance. - * - * @summary Enable remote vendor management of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_EnableRemoteVendorManagement.json - */ -async function turnOnRemoteVendorManagementForStorageAppliance(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceEnableRemoteVendorManagementParameters: StorageApplianceEnableRemoteVendorManagementParameters = - { supportEndpoints: ["10.0.0.0/24"] }; - const options: StorageAppliancesEnableRemoteVendorManagementOptionalParams = { - storageApplianceEnableRemoteVendorManagementParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.storageAppliances.beginEnableRemoteVendorManagementAndWait( - resourceGroupName, - storageApplianceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await turnOnRemoteVendorManagementForStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesGetSample.ts deleted file mode 100644 index 928b6322643e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesGetSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get properties of the provided storage appliance. - * - * @summary Get properties of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Get.json - */ -async function getStorageAppliance(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.get( - resourceGroupName, - storageApplianceName, - ); - console.log(result); -} - -async function main(): Promise { - await getStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesRunReadCommandsSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesRunReadCommandsSample.ts deleted file mode 100644 index b072f091f364..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesRunReadCommandsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - StorageApplianceRunReadCommandsParameters} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Run one or more read-only commands on the provided storage appliance. - * - * @summary Run one or more read-only commands on the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_RunReadCommands.json - */ -async function runAndRetrieveOutputFromReadOnlyCommandsOnStorageAppliance(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters = - { - limitTimeSeconds: 60, - commands: [ - { - arguments: ["list", "--filter", "state='open'"], - command: "purealert", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginRunReadCommandsAndWait( - resourceGroupName, - storageApplianceName, - storageApplianceRunReadCommandsParameters, - ); - console.log(result); -} - -async function main(): Promise { - await runAndRetrieveOutputFromReadOnlyCommandsOnStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesUpdateSample.ts deleted file mode 100644 index 8f7835f30b79..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesUpdateSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - StorageAppliancePatchParameters, - StorageAppliancesUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. - * - * @summary Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Patch.json - */ -async function patchStorageAppliance(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceUpdateParameters: StorageAppliancePatchParameters = { - serialNumber: "BM1219XXX", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: StorageAppliancesUpdateOptionalParams = { - storageApplianceUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginUpdateAndWait( - resourceGroupName, - storageApplianceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 20eeda605003..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { TrunkedNetwork} from "@azure/arm-networkcloud"; -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new trunked network or update the properties of the existing trunked network. - * - * @summary Create a new trunked network or update the properties of the existing trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Create.json - */ -async function createOrUpdateTrunkedNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const trunkedNetworkParameters: TrunkedNetwork = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - interfaceName: "eth0", - isolationDomainIds: [ - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", - ], - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - vlans: [12, 14], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - trunkedNetworkName, - trunkedNetworkParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksDeleteSample.ts deleted file mode 100644 index e86867063de0..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the provided trunked network. - * - * @summary Delete the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Delete.json - */ -async function deleteTrunkedNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.beginDeleteAndWait( - resourceGroupName, - trunkedNetworkName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksGetSample.ts deleted file mode 100644 index 0fd34e510712..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksGetSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get properties of the provided trunked network. - * - * @summary Get properties of the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Get.json - */ -async function getTrunkedNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.get( - resourceGroupName, - trunkedNetworkName, - ); - console.log(result); -} - -async function main(): Promise { - await getTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksUpdateSample.ts deleted file mode 100644 index 9a9760d2ce30..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksUpdateSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - TrunkedNetworkPatchParameters, - TrunkedNetworksUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update tags associated with the provided trunked network. - * - * @summary Update tags associated with the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_Patch.json - */ -async function patchTrunkedNetwork(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const trunkedNetworkUpdateParameters: TrunkedNetworkPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: TrunkedNetworksUpdateOptionalParams = { - trunkedNetworkUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.update( - resourceGroupName, - trunkedNetworkName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesAssignRelaySample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesAssignRelaySample.ts deleted file mode 100644 index c66b78eeed8e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesAssignRelaySample.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualMachineAssignRelayParameters, - VirtualMachinesAssignRelayOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. - * - * @summary Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_AssignRelay.json - */ -async function assignRelayToTheMicrosoftHybridComputeMachineForAVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineAssignRelayParameters: VirtualMachineAssignRelayParameters = - { - machineId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.HybridCompute/machines/machineName", - relayType: "Platform", - }; - const options: VirtualMachinesAssignRelayOptionalParams = { - virtualMachineAssignRelayParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginAssignRelayAndWait( - resourceGroupName, - virtualMachineName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await assignRelayToTheMicrosoftHybridComputeMachineForAVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesCreateOrUpdateSample.ts deleted file mode 100644 index e162998cd1c3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesCreateOrUpdateSample.ts +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { VirtualMachine} from "@azure/arm-networkcloud"; -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create a new virtual machine or update the properties of the existing virtual machine. - * - * @summary Create a new virtual machine or update the properties of the existing virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Create.json - */ -async function createOrUpdateVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineParameters: VirtualMachine = { - adminUsername: "username", - bootMethod: "UEFI", - cloudServicesNetworkAttachment: { - attachedNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - ipAllocationMethod: "Dynamic", - }, - cpuCores: 2, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - location: "location", - memorySizeGB: 8, - networkAttachments: [ - { - attachedNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - defaultGateway: "True", - ipAllocationMethod: "Dynamic", - ipv4Address: "198.51.100.1", - ipv6Address: "2001:0db8:0000:0000:0000:0000:0000:0000", - networkAttachmentName: "netAttachName01", - }, - ], - networkDataContent: "bmV0d29ya0RhdGVTYW1wbGU=", - placementHints: [ - { - hintType: "Affinity", - resourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - schedulingExecution: "Hard", - scope: "", - }, - ], - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - storageProfile: { - osDisk: { - createOption: "Ephemeral", - deleteOption: "Delete", - diskSizeGB: 120, - }, - volumeAttachments: [ - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName", - ], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - userDataContent: "dXNlckRhdGVTYW1wbGU=", - vmDeviceModel: "T2", - vmImage: "myacr.azurecr.io/foobar:latest", - vmImageRepositoryCredentials: { - password: "{password}", - registryUrl: "myacr.azurecr.io", - username: "myuser", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineName, - virtualMachineParameters, - ); - console.log(result); -} - -async function main(): Promise { - await createOrUpdateVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesDeleteSample.ts deleted file mode 100644 index e45ba4c90bf7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the provided virtual machine. - * - * @summary Delete the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Delete.json - */ -async function deleteVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesGetSample.ts deleted file mode 100644 index a96ce83d8161..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesGetSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get properties of the provided virtual machine. - * - * @summary Get properties of the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Get.json - */ -async function getVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.get( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main(): Promise { - await getVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesPowerOffSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesPowerOffSample.ts deleted file mode 100644 index 10b18fb628b6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesPowerOffSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualMachinePowerOffParameters, - VirtualMachinesPowerOffOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Power off the provided virtual machine. - * - * @summary Power off the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_PowerOff.json - */ -async function powerOffVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachinePowerOffParameters: VirtualMachinePowerOffParameters = { - skipShutdown: "True", - }; - const options: VirtualMachinesPowerOffOptionalParams = { - virtualMachinePowerOffParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginPowerOffAndWait( - resourceGroupName, - virtualMachineName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await powerOffVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesReimageSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesReimageSample.ts deleted file mode 100644 index 14e0ea0b53ba..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesReimageSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Reimage the provided virtual machine. - * - * @summary Reimage the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Reimage.json - */ -async function reimageVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginReimageAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main(): Promise { - await reimageVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesRestartSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesRestartSample.ts deleted file mode 100644 index 0c6038ab0f02..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesRestartSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Restart the provided virtual machine. - * - * @summary Restart the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Restart.json - */ -async function restartVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginRestartAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main(): Promise { - await restartVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesStartSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesStartSample.ts deleted file mode 100644 index 23bed891fcdf..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesStartSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Start the provided virtual machine. - * - * @summary Start the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Start.json - */ -async function startVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginStartAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main(): Promise { - await startVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesUpdateSample.ts deleted file mode 100644 index 083c274fa4fa..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesUpdateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VirtualMachinePatchParameters, - VirtualMachinesUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to 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. - * - * @summary 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. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_Patch.json - */ -async function patchVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineUpdateParameters: VirtualMachinePatchParameters = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - vmImageRepositoryCredentials: { - password: "{password}", - registryUrl: "myacr.azurecr.io", - username: "myuser", - }, - }; - const options: VirtualMachinesUpdateOptionalParams = { - virtualMachineUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesDeleteSample.ts deleted file mode 100644 index efbbd0598649..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesDeleteSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete the provided volume. - * - * @summary Delete the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Delete.json - */ -async function deleteVolume(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.beginDeleteAndWait( - resourceGroupName, - volumeName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesGetSample.ts deleted file mode 100644 index 30139145b76c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get properties of the provided volume. - * - * @summary Get properties of the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Get.json - */ -async function getVolume(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.get(resourceGroupName, volumeName); - console.log(result); -} - -async function main(): Promise { - await getVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesListByResourceGroupSample.ts deleted file mode 100644 index c19c9f0f754a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesListByResourceGroupSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a list of volumes in the provided resource group. - * - * @summary Get a list of volumes in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_ListByResourceGroup.json - */ -async function listVolumesForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.volumes.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listVolumesForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesUpdateSample.ts deleted file mode 100644 index f856d2e73e1d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesUpdateSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - VolumePatchParameters, - VolumesUpdateOptionalParams} from "@azure/arm-networkcloud"; -import { - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update tags associated with the provided volume. - * - * @summary Update tags associated with the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Patch.json - */ -async function patchVolume(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const volumeUpdateParameters: VolumePatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: VolumesUpdateOptionalParams = { volumeUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.update( - resourceGroupName, - volumeName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await patchVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/README.md b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/README.md new file mode 100644 index 000000000000..a67b2b2e53e7 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/README.md @@ -0,0 +1,336 @@ +# @azure/arm-networkcloud client library samples for JavaScript (Beta) + +These sample programs show how to use the JavaScript client libraries for @azure/arm-networkcloud in some common scenarios. + +| **File Name** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [accessBridgesCreateOrUpdateSample.js][accessbridgescreateorupdatesample] | create a new access bridge or update the properties of the existing access bridge. x-ms-original-file: 2026-05-01-preview/AccessBridges_CreateOrUpdate.json | +| [accessBridgesDeleteSample.js][accessbridgesdeletesample] | delete the specified access bridge. x-ms-original-file: 2026-05-01-preview/AccessBridges_Delete.json | +| [accessBridgesGetSample.js][accessbridgesgetsample] | get the properties of the provided access bridge. x-ms-original-file: 2026-05-01-preview/AccessBridges_Get.json | +| [accessBridgesListByResourceGroupSample.js][accessbridgeslistbyresourcegroupsample] | get a list of access bridges in the provided resource group. x-ms-original-file: 2026-05-01-preview/AccessBridges_ListByResourceGroup.json | +| [accessBridgesListBySubscriptionSample.js][accessbridgeslistbysubscriptionsample] | get a list of access bridges in the provided subscription. x-ms-original-file: 2026-05-01-preview/AccessBridges_ListBySubscription.json | +| [accessBridgesUpdateSample.js][accessbridgesupdatesample] | update properties of the provided access bridge, or update tags associated with the access bridge. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/AccessBridges_Patch.json | +| [agentPoolsCreateOrUpdateSample.js][agentpoolscreateorupdatesample] | create a new Kubernetes cluster agent pool or update the properties of the existing one. x-ms-original-file: 2026-05-01-preview/AgentPools_Create.json | +| [agentPoolsDeleteSample.js][agentpoolsdeletesample] | delete the provided Kubernetes cluster agent pool. x-ms-original-file: 2026-05-01-preview/AgentPools_Delete.json | +| [agentPoolsGetSample.js][agentpoolsgetsample] | get properties of the provided Kubernetes cluster agent pool. x-ms-original-file: 2026-05-01-preview/AgentPools_Get.json | +| [agentPoolsListByKubernetesClusterSample.js][agentpoolslistbykubernetesclustersample] | get a list of agent pools for the provided Kubernetes cluster. x-ms-original-file: 2026-05-01-preview/AgentPools_ListByKubernetesCluster.json | +| [agentPoolsUpdateSample.js][agentpoolsupdatesample] | 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. x-ms-original-file: 2026-05-01-preview/AgentPools_Patch.json | +| [bareMetalMachineKeySetsCreateOrUpdateSample.js][baremetalmachinekeysetscreateorupdatesample] | create a new bare metal machine key set or update the existing one for the provided cluster. x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Create.json | +| [bareMetalMachineKeySetsDeleteSample.js][baremetalmachinekeysetsdeletesample] | delete the bare metal machine key set of the provided cluster. x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Delete.json | +| [bareMetalMachineKeySetsGetSample.js][baremetalmachinekeysetsgetsample] | get bare metal machine key set of the provided cluster. x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Get.json | +| [bareMetalMachineKeySetsListByClusterSample.js][baremetalmachinekeysetslistbyclustersample] | get a list of bare metal machine key sets for the provided cluster. x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_ListByCluster.json | +| [bareMetalMachineKeySetsUpdateSample.js][baremetalmachinekeysetsupdatesample] | 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. x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Patch.json | +| [bareMetalMachinesCordonSample.js][baremetalmachinescordonsample] | cordon the provided bare metal machine's Kubernetes node. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Cordon.json | +| [bareMetalMachinesCreateOrUpdateSample.js][baremetalmachinescreateorupdatesample] | create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Create.json | +| [bareMetalMachinesDeleteSample.js][baremetalmachinesdeletesample] | delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Delete.json | +| [bareMetalMachinesGetSample.js][baremetalmachinesgetsample] | get properties of the provided bare metal machine. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Get.json | +| [bareMetalMachinesListByResourceGroupSample.js][baremetalmachineslistbyresourcegroupsample] | get a list of bare metal machines in the provided resource group. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_ListByResourceGroup.json | +| [bareMetalMachinesListBySubscriptionSample.js][baremetalmachineslistbysubscriptionsample] | get a list of bare metal machines in the provided subscription. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_ListBySubscription.json | +| [bareMetalMachinesPowerOffSample.js][baremetalmachinespoweroffsample] | power off the provided bare metal machine. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_PowerOff.json | +| [bareMetalMachinesReimageSample.js][baremetalmachinesreimagesample] | reimage the provided bare metal machine. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Reimage.json | +| [bareMetalMachinesReplaceSample.js][baremetalmachinesreplacesample] | replace the provided bare metal machine. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Replace.json | +| [bareMetalMachinesRestartSample.js][baremetalmachinesrestartsample] | restart the provided bare metal machine. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Restart.json | +| [bareMetalMachinesRunCommandSample.js][baremetalmachinesruncommandsample] | run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunCommand.json | +| [bareMetalMachinesRunDataExtractsRestrictedSample.js][baremetalmachinesrundataextractsrestrictedsample] | run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunDataExtractsRestricted.json | +| [bareMetalMachinesRunDataExtractsSample.js][baremetalmachinesrundataextractssample] | run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunDataExtracts.json | +| [bareMetalMachinesRunReadCommandsSample.js][baremetalmachinesrunreadcommandssample] | run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunReadCommands_Hostname.json | +| [bareMetalMachinesStartSample.js][baremetalmachinesstartsample] | start the provided bare metal machine. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Start.json | +| [bareMetalMachinesUncordonSample.js][baremetalmachinesuncordonsample] | uncordon the provided bare metal machine's Kubernetes node. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Uncordon.json | +| [bareMetalMachinesUpdateSample.js][baremetalmachinesupdatesample] | patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Patch.json | +| [bmcKeySetsCreateOrUpdateSample.js][bmckeysetscreateorupdatesample] | create a new baseboard management controller key set or update the existing one for the provided cluster. x-ms-original-file: 2026-05-01-preview/BmcKeySets_Create.json | +| [bmcKeySetsDeleteSample.js][bmckeysetsdeletesample] | delete the baseboard management controller key set of the provided cluster. x-ms-original-file: 2026-05-01-preview/BmcKeySets_Delete.json | +| [bmcKeySetsGetSample.js][bmckeysetsgetsample] | get baseboard management controller key set of the provided cluster. x-ms-original-file: 2026-05-01-preview/BmcKeySets_Get.json | +| [bmcKeySetsListByClusterSample.js][bmckeysetslistbyclustersample] | get a list of baseboard management controller key sets for the provided cluster. x-ms-original-file: 2026-05-01-preview/BmcKeySets_ListByCluster.json | +| [bmcKeySetsUpdateSample.js][bmckeysetsupdatesample] | 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. x-ms-original-file: 2026-05-01-preview/BmcKeySets_Patch.json | +| [cloudServicesNetworksCreateOrUpdateSample.js][cloudservicesnetworkscreateorupdatesample] | create a new cloud services network or update the properties of the existing cloud services network. x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Create.json | +| [cloudServicesNetworksDeleteSample.js][cloudservicesnetworksdeletesample] | delete the provided cloud services network. x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Delete.json | +| [cloudServicesNetworksGetSample.js][cloudservicesnetworksgetsample] | get properties of the provided cloud services network. x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Get.json | +| [cloudServicesNetworksListByResourceGroupSample.js][cloudservicesnetworkslistbyresourcegroupsample] | get a list of cloud services networks in the provided resource group. x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_ListByResourceGroup.json | +| [cloudServicesNetworksListBySubscriptionSample.js][cloudservicesnetworkslistbysubscriptionsample] | get a list of cloud services networks in the provided subscription. x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_ListBySubscription.json | +| [cloudServicesNetworksUpdateSample.js][cloudservicesnetworksupdatesample] | update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Patch.json | +| [clusterManagersCreateOrUpdateSample.js][clustermanagerscreateorupdatesample] | create a new cluster manager or update properties of the cluster manager if it exists. x-ms-original-file: 2026-05-01-preview/ClusterManagers_Create.json | +| [clusterManagersDeleteSample.js][clustermanagersdeletesample] | delete the provided cluster manager. x-ms-original-file: 2026-05-01-preview/ClusterManagers_Delete.json | +| [clusterManagersGetSample.js][clustermanagersgetsample] | get the properties of the provided cluster manager. x-ms-original-file: 2026-05-01-preview/ClusterManagers_Get.json | +| [clusterManagersListByResourceGroupSample.js][clustermanagerslistbyresourcegroupsample] | get a list of cluster managers in the provided resource group. x-ms-original-file: 2026-05-01-preview/ClusterManagers_ListByResourceGroup.json | +| [clusterManagersListBySubscriptionSample.js][clustermanagerslistbysubscriptionsample] | get a list of cluster managers in the provided subscription. x-ms-original-file: 2026-05-01-preview/ClusterManagers_ListBySubscription.json | +| [clusterManagersUpdateRelayPrivateEndpointConnectionSample.js][clustermanagersupdaterelayprivateendpointconnectionsample] | update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. x-ms-original-file: 2026-05-01-preview/ClusterManagers_UpdateRelayPrivateEndpointConnection_Approve.json | +| [clusterManagersUpdateSample.js][clustermanagersupdatesample] | patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/ClusterManagers_Patch.json | +| [clustersContinueUpdateVersionSample.js][clusterscontinueupdateversionsample] | trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. x-ms-original-file: 2026-05-01-preview/Clusters_ContinueUpdateVersion.json | +| [clustersCreateOrUpdateSample.js][clusterscreateorupdatesample] | create a new cluster or update the properties of the cluster if it exists. x-ms-original-file: 2026-05-01-preview/Clusters_Create.json | +| [clustersDeleteSample.js][clustersdeletesample] | delete the provided cluster. x-ms-original-file: 2026-05-01-preview/Clusters_Delete.json | +| [clustersDeploySample.js][clustersdeploysample] | deploy the cluster using the rack configuration provided during creation. x-ms-original-file: 2026-05-01-preview/Clusters_Deploy.json | +| [clustersGetSample.js][clustersgetsample] | get properties of the provided cluster. x-ms-original-file: 2026-05-01-preview/Clusters_Get.json | +| [clustersInspectSample.js][clustersinspectsample] | trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied additional actions and filters. x-ms-original-file: 2026-05-01-preview/Clusters_Inspect.json | +| [clustersListByResourceGroupSample.js][clusterslistbyresourcegroupsample] | get a list of clusters in the provided resource group. x-ms-original-file: 2026-05-01-preview/Clusters_ListByResourceGroup.json | +| [clustersListBySubscriptionSample.js][clusterslistbysubscriptionsample] | get a list of clusters in the provided subscription. x-ms-original-file: 2026-05-01-preview/Clusters_ListBySubscription.json | +| [clustersRotateCredentialSample.js][clustersrotatecredentialsample] | rotate the specified cluster credential. x-ms-original-file: 2026-05-01-preview/Clusters_RotateCredential.json | +| [clustersScanRuntimeSample.js][clustersscanruntimesample] | triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. x-ms-original-file: 2026-05-01-preview/Clusters_ScanRuntime.json | +| [clustersUpdateSample.js][clustersupdatesample] | patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/Clusters_Patch_AggregatorOrSingleRackDefinition.json | +| [clustersUpdateVersionSample.js][clustersupdateversionsample] | update the version of the provided cluster to one of the available supported versions. x-ms-original-file: 2026-05-01-preview/Clusters_UpdateVersion.json | +| [consolesCreateOrUpdateSample.js][consolescreateorupdatesample] | create a new virtual machine console or update the properties of the existing virtual machine console. x-ms-original-file: 2026-05-01-preview/Consoles_Create.json | +| [consolesDeleteSample.js][consolesdeletesample] | delete the provided virtual machine console. x-ms-original-file: 2026-05-01-preview/Consoles_Delete.json | +| [consolesGetSample.js][consolesgetsample] | get properties of the provided virtual machine console. x-ms-original-file: 2026-05-01-preview/Consoles_Get.json | +| [consolesListByVirtualMachineSample.js][consoleslistbyvirtualmachinesample] | get a list of consoles for the provided virtual machine. x-ms-original-file: 2026-05-01-preview/Consoles_ListByVirtualMachine.json | +| [consolesUpdateSample.js][consolesupdatesample] | 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. x-ms-original-file: 2026-05-01-preview/Consoles_Patch.json | +| [kubernetesClusterFeaturesCreateOrUpdateSample.js][kubernetesclusterfeaturescreateorupdatesample] | create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Create.json | +| [kubernetesClusterFeaturesDeleteSample.js][kubernetesclusterfeaturesdeletesample] | delete the provided Kubernetes cluster feature. x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Delete.json | +| [kubernetesClusterFeaturesGetSample.js][kubernetesclusterfeaturesgetsample] | get properties of the provided the Kubernetes cluster feature. x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Get.json | +| [kubernetesClusterFeaturesListByKubernetesClusterSample.js][kubernetesclusterfeatureslistbykubernetesclustersample] | get a list of features for the provided Kubernetes cluster. x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_ListByKubernetesCluster.json | +| [kubernetesClusterFeaturesUpdateSample.js][kubernetesclusterfeaturesupdatesample] | patch properties of the provided Kubernetes cluster feature. x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Patch.json | +| [kubernetesClustersCreateOrUpdateSample.js][kubernetesclusterscreateorupdatesample] | create a new Kubernetes cluster or update the properties of the existing one. x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Create.json | +| [kubernetesClustersDeleteSample.js][kubernetesclustersdeletesample] | delete the provided Kubernetes cluster. x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Delete.json | +| [kubernetesClustersGetSample.js][kubernetesclustersgetsample] | get properties of the provided the Kubernetes cluster. x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Get.json | +| [kubernetesClustersListByResourceGroupSample.js][kubernetesclusterslistbyresourcegroupsample] | get a list of Kubernetes clusters in the provided resource group. x-ms-original-file: 2026-05-01-preview/KubernetesClusters_ListByResourceGroup.json | +| [kubernetesClustersListBySubscriptionSample.js][kubernetesclusterslistbysubscriptionsample] | get a list of Kubernetes clusters in the provided subscription. x-ms-original-file: 2026-05-01-preview/KubernetesClusters_ListBySubscription.json | +| [kubernetesClustersRestartNodeSample.js][kubernetesclustersrestartnodesample] | restart a targeted node of a Kubernetes cluster. x-ms-original-file: 2026-05-01-preview/KubernetesClusters_RestartNode.json | +| [kubernetesClustersUpdateSample.js][kubernetesclustersupdatesample] | patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Patch.json | +| [kubernetesVersionsCreateOrUpdateSample.js][kubernetesversionscreateorupdatesample] | create the Kubernetes version resource or update its tags. This resource is system managed and should only be created with the name "default". x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Create.json | +| [kubernetesVersionsDeleteSample.js][kubernetesversionsdeletesample] | delete the specified Kubernetes version resource. x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Delete.json | +| [kubernetesVersionsGetSample.js][kubernetesversionsgetsample] | retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Get.json | +| [kubernetesVersionsListByResourceGroupSample.js][kubernetesversionslistbyresourcegroupsample] | get a list of Kubernetes version resources in the provided resource group. x-ms-original-file: 2026-05-01-preview/KubernetesVersions_ListByResourceGroup.json | +| [kubernetesVersionsListBySubscriptionSample.js][kubernetesversionslistbysubscriptionsample] | get a list of Kubernetes version resources in the provided subscription. x-ms-original-file: 2026-05-01-preview/KubernetesVersions_ListBySubscription.json | +| [kubernetesVersionsUpdateSample.js][kubernetesversionsupdatesample] | update tags associated with the Kubernetes version resource. No other properties are supported for update. x-ms-original-file: 2026-05-01-preview/KubernetesVersions_UpdateTags.json | +| [l2NetworksCreateOrUpdateSample.js][l2networkscreateorupdatesample] | create a new layer 2 (L2) network or update the properties of the existing network. x-ms-original-file: 2026-05-01-preview/L2Networks_Create.json | +| [l2NetworksDeleteSample.js][l2networksdeletesample] | delete the provided layer 2 (L2) network. x-ms-original-file: 2026-05-01-preview/L2Networks_Delete.json | +| [l2NetworksGetSample.js][l2networksgetsample] | get properties of the provided layer 2 (L2) network. x-ms-original-file: 2026-05-01-preview/L2Networks_Get.json | +| [l2NetworksListByResourceGroupSample.js][l2networkslistbyresourcegroupsample] | get a list of layer 2 (L2) networks in the provided resource group. x-ms-original-file: 2026-05-01-preview/L2Networks_ListByResourceGroup.json | +| [l2NetworksListBySubscriptionSample.js][l2networkslistbysubscriptionsample] | get a list of layer 2 (L2) networks in the provided subscription. x-ms-original-file: 2026-05-01-preview/L2Networks_ListBySubscription.json | +| [l2NetworksUpdateSample.js][l2networksupdatesample] | update tags associated with the provided layer 2 (L2) network. x-ms-original-file: 2026-05-01-preview/L2Networks_Patch.json | +| [l3NetworksCreateOrUpdateSample.js][l3networkscreateorupdatesample] | create a new layer 3 (L3) network or update the properties of the existing network. x-ms-original-file: 2026-05-01-preview/L3Networks_Create.json | +| [l3NetworksDeleteSample.js][l3networksdeletesample] | delete the provided layer 3 (L3) network. x-ms-original-file: 2026-05-01-preview/L3Networks_Delete.json | +| [l3NetworksGetSample.js][l3networksgetsample] | get properties of the provided layer 3 (L3) network. x-ms-original-file: 2026-05-01-preview/L3Networks_Get.json | +| [l3NetworksListByResourceGroupSample.js][l3networkslistbyresourcegroupsample] | get a list of layer 3 (L3) networks in the provided resource group. x-ms-original-file: 2026-05-01-preview/L3Networks_ListByResourceGroup.json | +| [l3NetworksListBySubscriptionSample.js][l3networkslistbysubscriptionsample] | get a list of layer 3 (L3) networks in the provided subscription. x-ms-original-file: 2026-05-01-preview/L3Networks_ListBySubscription.json | +| [l3NetworksUpdateSample.js][l3networksupdatesample] | update tags associated with the provided layer 3 (L3) network. x-ms-original-file: 2026-05-01-preview/L3Networks_Patch.json | +| [metricsConfigurationsCreateOrUpdateSample.js][metricsconfigurationscreateorupdatesample] | create new or update the existing metrics configuration of the provided cluster. x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Create.json | +| [metricsConfigurationsDeleteSample.js][metricsconfigurationsdeletesample] | delete the metrics configuration of the provided cluster. x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Delete.json | +| [metricsConfigurationsGetSample.js][metricsconfigurationsgetsample] | get metrics configuration of the provided cluster. x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Get.json | +| [metricsConfigurationsListByClusterSample.js][metricsconfigurationslistbyclustersample] | get a list of metrics configurations for the provided cluster. x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_ListByCluster.json | +| [metricsConfigurationsUpdateSample.js][metricsconfigurationsupdatesample] | patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Patch.json | +| [operationsListSample.js][operationslistsample] | list the operations for the provider x-ms-original-file: 2026-05-01-preview/Operations_List.json | +| [rackSkusGetSample.js][rackskusgetsample] | get the properties of the provided rack SKU. x-ms-original-file: 2026-05-01-preview/RackSkus_Get.json | +| [rackSkusListBySubscriptionSample.js][rackskuslistbysubscriptionsample] | get a list of rack SKUs in the provided subscription. x-ms-original-file: 2026-05-01-preview/RackSkus_ListBySubscription.json | +| [racksCreateOrUpdateSample.js][rackscreateorupdatesample] | create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: 2026-05-01-preview/Racks_Create.json | +| [racksDeleteSample.js][racksdeletesample] | delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: 2026-05-01-preview/Racks_Delete.json | +| [racksGetSample.js][racksgetsample] | get properties of the provided rack. x-ms-original-file: 2026-05-01-preview/Racks_Get.json | +| [racksListByResourceGroupSample.js][rackslistbyresourcegroupsample] | get a list of racks in the provided resource group. x-ms-original-file: 2026-05-01-preview/Racks_ListByResourceGroup.json | +| [racksListBySubscriptionSample.js][rackslistbysubscriptionsample] | get a list of racks in the provided subscription. x-ms-original-file: 2026-05-01-preview/Racks_ListBySubscription.json | +| [racksUpdateSample.js][racksupdatesample] | patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/Racks_Patch.json | +| [storageAppliancesCreateOrUpdateSample.js][storageappliancescreateorupdatesample] | create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: 2026-05-01-preview/StorageAppliances_Create.json | +| [storageAppliancesDeleteSample.js][storageappliancesdeletesample] | delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: 2026-05-01-preview/StorageAppliances_Delete.json | +| [storageAppliancesDisableRemoteVendorManagementSample.js][storageappliancesdisableremotevendormanagementsample] | disable remote vendor management of the provided storage appliance. x-ms-original-file: 2026-05-01-preview/StorageAppliances_DisableRemoteVendorManagement.json | +| [storageAppliancesEnableRemoteVendorManagementSample.js][storageappliancesenableremotevendormanagementsample] | enable remote vendor management of the provided storage appliance. x-ms-original-file: 2026-05-01-preview/StorageAppliances_EnableRemoteVendorManagement.json | +| [storageAppliancesGetSample.js][storageappliancesgetsample] | get properties of the provided storage appliance. x-ms-original-file: 2026-05-01-preview/StorageAppliances_Get.json | +| [storageAppliancesListByResourceGroupSample.js][storageapplianceslistbyresourcegroupsample] | get a list of storage appliances in the provided resource group. x-ms-original-file: 2026-05-01-preview/StorageAppliances_ListByResourceGroup.json | +| [storageAppliancesListBySubscriptionSample.js][storageapplianceslistbysubscriptionsample] | get a list of storage appliances in the provided subscription. x-ms-original-file: 2026-05-01-preview/StorageAppliances_ListBySubscription.json | +| [storageAppliancesRunReadCommandsSample.js][storageappliancesrunreadcommandssample] | run one or more read-only commands on the provided storage appliance. x-ms-original-file: 2026-05-01-preview/StorageAppliances_RunReadCommands.json | +| [storageAppliancesUpdateSample.js][storageappliancesupdatesample] | update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/StorageAppliances_Patch.json | +| [trunkedNetworksCreateOrUpdateSample.js][trunkednetworkscreateorupdatesample] | create a new trunked network or update the properties of the existing trunked network. x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Create.json | +| [trunkedNetworksDeleteSample.js][trunkednetworksdeletesample] | delete the provided trunked network. x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Delete.json | +| [trunkedNetworksGetSample.js][trunkednetworksgetsample] | get properties of the provided trunked network. x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Get.json | +| [trunkedNetworksListByResourceGroupSample.js][trunkednetworkslistbyresourcegroupsample] | get a list of trunked networks in the provided resource group. x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_ListByResourceGroup.json | +| [trunkedNetworksListBySubscriptionSample.js][trunkednetworkslistbysubscriptionsample] | get a list of trunked networks in the provided subscription. x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_ListBySubscription.json | +| [trunkedNetworksUpdateSample.js][trunkednetworksupdatesample] | update tags associated with the provided trunked network. x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Patch.json | +| [virtualMachinesAssignRelaySample.js][virtualmachinesassignrelaysample] | assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_AssignRelay.json | +| [virtualMachinesCreateOrUpdateSample.js][virtualmachinescreateorupdatesample] | create a new virtual machine or update the properties of the existing virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_Create.json | +| [virtualMachinesDeleteSample.js][virtualmachinesdeletesample] | delete the provided virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_Delete.json | +| [virtualMachinesGetSample.js][virtualmachinesgetsample] | get properties of the provided virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_Get.json | +| [virtualMachinesListByResourceGroupSample.js][virtualmachineslistbyresourcegroupsample] | get a list of virtual machines in the provided resource group. x-ms-original-file: 2026-05-01-preview/VirtualMachines_ListByResourceGroup.json | +| [virtualMachinesListBySubscriptionSample.js][virtualmachineslistbysubscriptionsample] | get a list of virtual machines in the provided subscription. x-ms-original-file: 2026-05-01-preview/VirtualMachines_ListBySubscription.json | +| [virtualMachinesPowerOffSample.js][virtualmachinespoweroffsample] | power off the provided virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_PowerOff.json | +| [virtualMachinesReimageSample.js][virtualmachinesreimagesample] | reimage the provided virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_Reimage.json | +| [virtualMachinesRestartSample.js][virtualmachinesrestartsample] | restart the provided virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_Restart.json | +| [virtualMachinesStartSample.js][virtualmachinesstartsample] | start the provided virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_Start.json | +| [virtualMachinesUpdateSample.js][virtualmachinesupdatesample] | 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. x-ms-original-file: 2026-05-01-preview/VirtualMachines_Patch.json | +| [volumesCreateOrUpdateSample.js][volumescreateorupdatesample] | create a new volume or update the properties of the existing one. x-ms-original-file: 2026-05-01-preview/Volumes_Create.json | +| [volumesDeleteSample.js][volumesdeletesample] | delete the provided volume. x-ms-original-file: 2026-05-01-preview/Volumes_Delete.json | +| [volumesGetSample.js][volumesgetsample] | get properties of the provided volume. x-ms-original-file: 2026-05-01-preview/Volumes_Get.json | +| [volumesListByResourceGroupSample.js][volumeslistbyresourcegroupsample] | get a list of volumes in the provided resource group. x-ms-original-file: 2026-05-01-preview/Volumes_ListByResourceGroup.json | +| [volumesListBySubscriptionSample.js][volumeslistbysubscriptionsample] | get a list of volumes in the provided subscription. x-ms-original-file: 2026-05-01-preview/Volumes_ListBySubscription.json | +| [volumesUpdateSample.js][volumesupdatesample] | update tags associated with the provided volume. x-ms-original-file: 2026-05-01-preview/Volumes_Patch.json | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +3. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node accessBridgesCreateOrUpdateSample.js +``` + +Alternatively, run a single sample with the required environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +node accessBridgesCreateOrUpdateSample.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[accessbridgescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesCreateOrUpdateSample.js +[accessbridgesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesDeleteSample.js +[accessbridgesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesGetSample.js +[accessbridgeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesListByResourceGroupSample.js +[accessbridgeslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesListBySubscriptionSample.js +[accessbridgesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesUpdateSample.js +[agentpoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsCreateOrUpdateSample.js +[agentpoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsDeleteSample.js +[agentpoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsGetSample.js +[agentpoolslistbykubernetesclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsListByKubernetesClusterSample.js +[agentpoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsUpdateSample.js +[baremetalmachinekeysetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsCreateOrUpdateSample.js +[baremetalmachinekeysetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsDeleteSample.js +[baremetalmachinekeysetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsGetSample.js +[baremetalmachinekeysetslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsListByClusterSample.js +[baremetalmachinekeysetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsUpdateSample.js +[baremetalmachinescordonsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCordonSample.js +[baremetalmachinescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCreateOrUpdateSample.js +[baremetalmachinesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesDeleteSample.js +[baremetalmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesGetSample.js +[baremetalmachineslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListByResourceGroupSample.js +[baremetalmachineslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListBySubscriptionSample.js +[baremetalmachinespoweroffsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesPowerOffSample.js +[baremetalmachinesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReimageSample.js +[baremetalmachinesreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReplaceSample.js +[baremetalmachinesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRestartSample.js +[baremetalmachinesruncommandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunCommandSample.js +[baremetalmachinesrundataextractsrestrictedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunDataExtractsRestrictedSample.js +[baremetalmachinesrundataextractssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunDataExtractsSample.js +[baremetalmachinesrunreadcommandssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunReadCommandsSample.js +[baremetalmachinesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesStartSample.js +[baremetalmachinesuncordonsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUncordonSample.js +[baremetalmachinesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUpdateSample.js +[bmckeysetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsCreateOrUpdateSample.js +[bmckeysetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsDeleteSample.js +[bmckeysetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsGetSample.js +[bmckeysetslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsListByClusterSample.js +[bmckeysetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsUpdateSample.js +[cloudservicesnetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksCreateOrUpdateSample.js +[cloudservicesnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksDeleteSample.js +[cloudservicesnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksGetSample.js +[cloudservicesnetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListByResourceGroupSample.js +[cloudservicesnetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListBySubscriptionSample.js +[cloudservicesnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksUpdateSample.js +[clustermanagerscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersCreateOrUpdateSample.js +[clustermanagersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersDeleteSample.js +[clustermanagersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersGetSample.js +[clustermanagerslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListByResourceGroupSample.js +[clustermanagerslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListBySubscriptionSample.js +[clustermanagersupdaterelayprivateendpointconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersUpdateRelayPrivateEndpointConnectionSample.js +[clustermanagersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersUpdateSample.js +[clusterscontinueupdateversionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersContinueUpdateVersionSample.js +[clusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersCreateOrUpdateSample.js +[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeleteSample.js +[clustersdeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeploySample.js +[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersGetSample.js +[clustersinspectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersInspectSample.js +[clusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListByResourceGroupSample.js +[clusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListBySubscriptionSample.js +[clustersrotatecredentialsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersRotateCredentialSample.js +[clustersscanruntimesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersScanRuntimeSample.js +[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateSample.js +[clustersupdateversionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateVersionSample.js +[consolescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesCreateOrUpdateSample.js +[consolesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesDeleteSample.js +[consolesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesGetSample.js +[consoleslistbyvirtualmachinesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesListByVirtualMachineSample.js +[consolesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesUpdateSample.js +[kubernetesclusterfeaturescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesCreateOrUpdateSample.js +[kubernetesclusterfeaturesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesDeleteSample.js +[kubernetesclusterfeaturesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesGetSample.js +[kubernetesclusterfeatureslistbykubernetesclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesListByKubernetesClusterSample.js +[kubernetesclusterfeaturesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesUpdateSample.js +[kubernetesclusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersCreateOrUpdateSample.js +[kubernetesclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersDeleteSample.js +[kubernetesclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersGetSample.js +[kubernetesclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListByResourceGroupSample.js +[kubernetesclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListBySubscriptionSample.js +[kubernetesclustersrestartnodesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersRestartNodeSample.js +[kubernetesclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersUpdateSample.js +[kubernetesversionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsCreateOrUpdateSample.js +[kubernetesversionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsDeleteSample.js +[kubernetesversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsGetSample.js +[kubernetesversionslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsListByResourceGroupSample.js +[kubernetesversionslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsListBySubscriptionSample.js +[kubernetesversionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsUpdateSample.js +[l2networkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksCreateOrUpdateSample.js +[l2networksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksDeleteSample.js +[l2networksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksGetSample.js +[l2networkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListByResourceGroupSample.js +[l2networkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListBySubscriptionSample.js +[l2networksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksUpdateSample.js +[l3networkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksCreateOrUpdateSample.js +[l3networksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksDeleteSample.js +[l3networksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksGetSample.js +[l3networkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListByResourceGroupSample.js +[l3networkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListBySubscriptionSample.js +[l3networksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksUpdateSample.js +[metricsconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsCreateOrUpdateSample.js +[metricsconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsDeleteSample.js +[metricsconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsGetSample.js +[metricsconfigurationslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsListByClusterSample.js +[metricsconfigurationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsUpdateSample.js +[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/operationsListSample.js +[rackskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusGetSample.js +[rackskuslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusListBySubscriptionSample.js +[rackscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksCreateOrUpdateSample.js +[racksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksDeleteSample.js +[racksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksGetSample.js +[rackslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListByResourceGroupSample.js +[rackslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListBySubscriptionSample.js +[racksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksUpdateSample.js +[storageappliancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesCreateOrUpdateSample.js +[storageappliancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDeleteSample.js +[storageappliancesdisableremotevendormanagementsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDisableRemoteVendorManagementSample.js +[storageappliancesenableremotevendormanagementsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesEnableRemoteVendorManagementSample.js +[storageappliancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesGetSample.js +[storageapplianceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListByResourceGroupSample.js +[storageapplianceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListBySubscriptionSample.js +[storageappliancesrunreadcommandssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesRunReadCommandsSample.js +[storageappliancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesUpdateSample.js +[trunkednetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksCreateOrUpdateSample.js +[trunkednetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksDeleteSample.js +[trunkednetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksGetSample.js +[trunkednetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListByResourceGroupSample.js +[trunkednetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListBySubscriptionSample.js +[trunkednetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksUpdateSample.js +[virtualmachinesassignrelaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesAssignRelaySample.js +[virtualmachinescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesCreateOrUpdateSample.js +[virtualmachinesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesDeleteSample.js +[virtualmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesGetSample.js +[virtualmachineslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListByResourceGroupSample.js +[virtualmachineslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListBySubscriptionSample.js +[virtualmachinespoweroffsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesPowerOffSample.js +[virtualmachinesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesReimageSample.js +[virtualmachinesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesRestartSample.js +[virtualmachinesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesStartSample.js +[virtualmachinesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesUpdateSample.js +[volumescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesCreateOrUpdateSample.js +[volumesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesDeleteSample.js +[volumesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesGetSample.js +[volumeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListByResourceGroupSample.js +[volumeslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListBySubscriptionSample.js +[volumesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesUpdateSample.js +[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-networkcloud?view=azure-node-preview +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud/README.md diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesCreateOrUpdateSample.js new file mode 100644 index 000000000000..f2b60bf1831b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesCreateOrUpdateSample.js @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a new access bridge or update the properties of the existing access bridge. + * + * @summary create a new access bridge or update the properties of the existing access bridge. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_CreateOrUpdate.json + */ +async function createOrUpdateAccessBridge() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.accessBridges.createOrUpdate("resourceGroupName", "Bastion", { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + ipv4ConnectedPrefix: "198.51.100.0/24", + ipv6ConnectedPrefix: "2001:db8::/64", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName/internalNetworks/internalNetworkName", + securityRules: [ + { + description: "Allow management plane egress", + direction: "Outbound", + ipv4Addresses: ["10.10.20.10-10.10.20.20"], + ipv6Addresses: ["2001:db8:abcd:12::1000-2001:db8:abcd:12::1fff"], + port: "24562-24570", + }, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }); + console.log(result); +} + +async function main() { + await createOrUpdateAccessBridge(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesDeleteSample.js new file mode 100644 index 000000000000..82c28522b206 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesDeleteSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the specified access bridge. + * + * @summary delete the specified access bridge. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Delete.json + */ +async function deleteAccessBridge() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.accessBridges.delete("resourceGroupName", "Bastion"); + console.log(result); +} + +async function main() { + await deleteAccessBridge(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesGetSample.js new file mode 100644 index 000000000000..9e26cb8516f7 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the properties of the provided access bridge. + * + * @summary get the properties of the provided access bridge. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Get.json + */ +async function getAccessBridge() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.accessBridges.get("resourceGroupName", "Bastion"); + console.log(result); +} + +async function main() { + await getAccessBridge(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesListByResourceGroupSample.js new file mode 100644 index 000000000000..d862efc1a8fb --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesListByResourceGroupSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a list of access bridges in the provided resource group. + * + * @summary get a list of access bridges in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_ListByResourceGroup.json + */ +async function listAccessBridgesForResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.accessBridges.listByResourceGroup("resourceGroupName")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await listAccessBridgesForResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesListBySubscriptionSample.js new file mode 100644 index 000000000000..34101a46fc6a --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesListBySubscriptionSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a list of access bridges in the provided subscription. + * + * @summary get a list of access bridges in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_ListBySubscription.json + */ +async function listAccessBridgesForSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.accessBridges.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await listAccessBridgesForSubscription(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesUpdateSample.js new file mode 100644 index 000000000000..48ff6de501e2 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/accessBridgesUpdateSample.js @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update properties of the provided access bridge, or update tags associated with the access bridge. Properties and tag updates can be done independently. + * + * @summary update properties of the provided access bridge, or update tags associated with the access bridge. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Patch.json + */ +async function patchAccessBridge() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.accessBridges.update("resourceGroupName", "Bastion", { + accessBridgeUpdateParameters: { + properties: { + securityRules: [ + { + description: "Allow management plane egress", + direction: "Outbound", + ipv4Addresses: ["10.10.20.10-10.10.20.20"], + ipv6Addresses: ["2001:db8:abcd:12::1000-2001:db8:abcd:12::1fff"], + port: "24562-24570", + }, + ], + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +async function main() { + await patchAccessBridge(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsCreateOrUpdateSample.js new file mode 100644 index 000000000000..ca71fb176c5a --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsCreateOrUpdateSample.js @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a new Kubernetes cluster agent pool or update the properties of the existing one. + * + * @summary create a new Kubernetes cluster agent pool or update the properties of the existing one. + * x-ms-original-file: 2026-05-01-preview/AgentPools_Create.json + */ +async function createOrUpdateKubernetesClusterAgentPool() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.agentPools.createOrUpdate( + "resourceGroupName", + "kubernetesClusterName", + "agentPoolName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, + attachedNetworkConfiguration: { + l2Networks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", + pluginType: "DPDK", + }, + ], + l3Networks: [ + { + ipamEnabled: "False", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + pluginType: "SRIOV", + }, + ], + trunkedNetworks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", + pluginType: "MACVLAN", + }, + ], + }, + availabilityZones: ["1", "2", "3"], + count: 3, + labels: [{ key: "kubernetes.label", value: "true" }], + mode: "System", + taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], + upgradeSettings: { maxSurge: "1" }, + vmSkuName: "NC_P46_224_v1", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main() { + await createOrUpdateKubernetesClusterAgentPool(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsDeleteSample.js new file mode 100644 index 000000000000..fa020e73ae8d --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsDeleteSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the provided Kubernetes cluster agent pool. + * + * @summary delete the provided Kubernetes cluster agent pool. + * x-ms-original-file: 2026-05-01-preview/AgentPools_Delete.json + */ +async function deleteKubernetesClusterAgentPool() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.agentPools.delete( + "resourceGroupName", + "kubernetesClusterName", + "agentPoolName", + ); + console.log(result); +} + +async function main() { + await deleteKubernetesClusterAgentPool(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsGetSample.js new file mode 100644 index 000000000000..116e6e53299a --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsGetSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get properties of the provided Kubernetes cluster agent pool. + * + * @summary get properties of the provided Kubernetes cluster agent pool. + * x-ms-original-file: 2026-05-01-preview/AgentPools_Get.json + */ +async function getKubernetesClusterAgentPool() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.agentPools.get( + "resourceGroupName", + "kubernetesClusterName", + "agentPoolName", + ); + console.log(result); +} + +async function main() { + await getKubernetesClusterAgentPool(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsListByKubernetesClusterSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsListByKubernetesClusterSample.js similarity index 52% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsListByKubernetesClusterSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsListByKubernetesClusterSample.js index c28fb78f74a5..255bd7f854df 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/agentPoolsListByKubernetesClusterSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsListByKubernetesClusterSample.js @@ -3,28 +3,25 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of agent pools for the provided Kubernetes cluster. + * This sample demonstrates how to get a list of agent pools for the provided Kubernetes cluster. * - * @summary Get a list of agent pools for the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_ListByKubernetesCluster.json + * @summary get a list of agent pools for the provided Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/AgentPools_ListByKubernetesCluster.json */ async function listAgentPoolsOfTheKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.agentPools.listByKubernetesCluster( - resourceGroupName, - kubernetesClusterName, + "resourceGroupName", + "kubernetesClusterName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsUpdateSample.js new file mode 100644 index 000000000000..d6ec0f62bee9 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsUpdateSample.js @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to 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. + * + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/AgentPools_Patch.json + */ +async function patchKubernetesClusterAgentPool() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.agentPools.update( + "resourceGroupName", + "kubernetesClusterName", + "agentPoolName", + { + agentPoolUpdateParameters: { + administratorConfiguration: { + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + count: 3, + upgradeSettings: { drainTimeout: 1800, maxSurge: "1", maxUnavailable: "0" }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main() { + await patchKubernetesClusterAgentPool(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsCreateOrUpdateSample.js new file mode 100644 index 000000000000..efb2f7c0e89c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsCreateOrUpdateSample.js @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a new bare metal machine key set or update the existing one for the provided cluster. + * + * @summary create a new bare metal machine key set or update the existing one for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Create.json + */ +async function createOrUpdateBareMetalMachineKeySetOfCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachineKeySets.createOrUpdate( + "resourceGroupName", + "clusterName", + "bareMetalMachineKeySetName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", + expiration: new Date("2022-12-31T23:59:59.008Z"), + jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], + osGroupName: "standardAccessGroup", + privilegeLevel: "Other", + privilegeLevelName: "SecurityScanner", + userList: [ + { + azureUserName: "userABC", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + { + azureUserName: "userXYZ", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main() { + await createOrUpdateBareMetalMachineKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsDeleteSample.js new file mode 100644 index 000000000000..cf394a4fac6e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsDeleteSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the bare metal machine key set of the provided cluster. + * + * @summary delete the bare metal machine key set of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Delete.json + */ +async function deleteBareMetalMachineKeySetOfCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachineKeySets.delete( + "resourceGroupName", + "clusterName", + "bareMetalMachineKeySetName", + ); + console.log(result); +} + +async function main() { + await deleteBareMetalMachineKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsGetSample.js new file mode 100644 index 000000000000..ae7e78fbf674 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsGetSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get bare metal machine key set of the provided cluster. + * + * @summary get bare metal machine key set of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Get.json + */ +async function getBareMetalMachineKeySetOfCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachineKeySets.get( + "resourceGroupName", + "clusterName", + "bareMetalMachineKeySetName", + ); + console.log(result); +} + +async function main() { + await getBareMetalMachineKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsListByClusterSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsListByClusterSample.js similarity index 54% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsListByClusterSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsListByClusterSample.js index 2ad1adf80035..d854143513db 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachineKeySetsListByClusterSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsListByClusterSample.js @@ -3,28 +3,25 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of bare metal machine key sets for the provided cluster. + * This sample demonstrates how to get a list of bare metal machine key sets for the provided cluster. * - * @summary Get a list of bare metal machine key sets for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_ListByCluster.json + * @summary get a list of bare metal machine key sets for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_ListByCluster.json */ async function listBareMetalMachineKeySetsOfTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.bareMetalMachineKeySets.listByCluster( - resourceGroupName, - clusterName, + "resourceGroupName", + "clusterName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsUpdateSample.js new file mode 100644 index 000000000000..f430016088b1 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsUpdateSample.js @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to 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. + * + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Patch.json + */ +async function patchBareMetalMachineKeySetOfCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachineKeySets.update( + "resourceGroupName", + "clusterName", + "bareMetalMachineKeySetName", + { + bareMetalMachineKeySetUpdateParameters: { + expiration: new Date("2022-12-31T23:59:59.008Z"), + jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], + userList: [ + { + azureUserName: "userABC", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + { + azureUserName: "userXYZ", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main() { + await patchBareMetalMachineKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCordonSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCordonSample.js new file mode 100644 index 000000000000..3faecec684cb --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCordonSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to cordon the provided bare metal machine's Kubernetes node. + * + * @summary cordon the provided bare metal machine's Kubernetes node. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Cordon.json + */ +async function cordonBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.cordon( + "resourceGroupName", + "bareMetalMachineName", + { bareMetalMachineCordonParameters: { evacuate: "True" } }, + ); + console.log(result); +} + +async function main() { + await cordonBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCreateOrUpdateSample.js new file mode 100644 index 000000000000..065e74a994b0 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCreateOrUpdateSample.js @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * + * @summary create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Create.json + */ +async function createOrUpdateBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.createOrUpdate( + "resourceGroupName", + "bareMetalMachineName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + bmcConnectionString: "redfish+https://10.10.10.16/redfish/v1/Systems/System.Embedded.1", + bmcCredentials: { password: "{password}", username: "bmcuser" }, + bmcMacAddress: "00:00:4f:00:57:00", + bootMacAddress: "00:00:4e:00:58:af", + machineDetails: "User-provided machine details.", + machineName: "r01c001", + machineSkuId: "684E-3B16-399E", + rackId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", + rackSlot: 1, + serialNumber: "BM1219XXX", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main() { + await createOrUpdateBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesDeleteSample.js similarity index 50% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesDeleteSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesDeleteSample.js index 48d06852bd2c..addefbfb0137 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesDeleteSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesDeleteSample.js @@ -3,25 +3,18 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * This sample demonstrates how to delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. * - * @summary Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Delete.json + * @summary delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Delete.json */ async function deleteBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginDeleteAndWait( - resourceGroupName, - bareMetalMachineName, - ); + const result = await client.bareMetalMachines.delete("resourceGroupName", "bareMetalMachineName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesGetSample.js new file mode 100644 index 000000000000..95cdd1e1e2b2 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get properties of the provided bare metal machine. + * + * @summary get properties of the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Get.json + */ +async function getBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.get("resourceGroupName", "bareMetalMachineName"); + console.log(result); +} + +async function main() { + await getBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListByResourceGroupSample.js similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesListByResourceGroupSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListByResourceGroupSample.js index 9ac3eeac4de7..405f835dba7b 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesListByResourceGroupSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListByResourceGroupSample.js @@ -3,24 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of bare metal machines in the provided resource group. + * This sample demonstrates how to get a list of bare metal machines in the provided resource group. * - * @summary Get a list of bare metal machines in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_ListByResourceGroup.json + * @summary get a list of bare metal machines in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_ListByResourceGroup.json */ async function listBareMetalMachinesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.bareMetalMachines.listByResourceGroup(resourceGroupName)) { + for await (const item of client.bareMetalMachines.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListBySubscriptionSample.js similarity index 61% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesListBySubscriptionSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListBySubscriptionSample.js index 1cba2ef9a5f8..1de5c154da75 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bareMetalMachinesListBySubscriptionSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListBySubscriptionSample.js @@ -3,23 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of bare metal machines in the provided subscription. + * This sample demonstrates how to get a list of bare metal machines in the provided subscription. * - * @summary Get a list of bare metal machines in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_ListBySubscription.json + * @summary get a list of bare metal machines in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_ListBySubscription.json */ async function listBareMetalMachinesForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.bareMetalMachines.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesPowerOffSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesPowerOffSample.js new file mode 100644 index 000000000000..2ca434ac79a8 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesPowerOffSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to power off the provided bare metal machine. + * + * @summary power off the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_PowerOff.json + */ +async function powerOffBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.powerOff( + "resourceGroupName", + "bareMetalMachineName", + { bareMetalMachinePowerOffParameters: { skipShutdown: "True" } }, + ); + console.log(result); +} + +async function main() { + await powerOffBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReimageSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReimageSample.js new file mode 100644 index 000000000000..9b64085f8286 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReimageSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to reimage the provided bare metal machine. + * + * @summary reimage the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Reimage.json + */ +async function reimageBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.reimage( + "resourceGroupName", + "bareMetalMachineName", + { body: { safeguardMode: "All" } }, + ); + console.log(result); +} + +async function main() { + await reimageBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReplaceSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReplaceSample.js new file mode 100644 index 000000000000..73067171b4c9 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReplaceSample.js @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to replace the provided bare metal machine. + * + * @summary replace the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Replace.json + */ +async function replaceBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.replace( + "resourceGroupName", + "bareMetalMachineName", + { + bareMetalMachineReplaceParameters: { + bmcCredentials: { + password: "https://keyvaultname.vault.azure.net/secrets/secretName", + username: "bmcuser", + }, + bmcMacAddress: "00:00:4f:00:57:ad", + bootMacAddress: "00:00:4e:00:58:af", + machineName: "name", + safeguardMode: "All", + serialNumber: "BM1219XXX", + storagePolicy: "DiscardAll", + }, + }, + ); + console.log(result); +} + +async function main() { + await replaceBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRestartSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRestartSample.js new file mode 100644 index 000000000000..74e89d7e4280 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRestartSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to restart the provided bare metal machine. + * + * @summary restart the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Restart.json + */ +async function restartBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.restart( + "resourceGroupName", + "bareMetalMachineName", + ); + console.log(result); +} + +async function main() { + await restartBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunCommandSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunCommandSample.js new file mode 100644 index 000000000000..fbf4a12c568b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunCommandSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * + * @summary run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunCommand.json + */ +async function runCommandOnBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.runCommand( + "resourceGroupName", + "bareMetalMachineName", + { arguments: ["--argument1", "argument2"], limitTimeSeconds: 60, script: "cHdkCg==" }, + ); + console.log(result); +} + +async function main() { + await runCommandOnBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunDataExtractsRestrictedSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunDataExtractsRestrictedSample.js new file mode 100644 index 000000000000..f374b5e97394 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunDataExtractsRestrictedSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * + * @summary run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunDataExtractsRestricted.json + */ +async function runRestrictedDataExtractionOnBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.runDataExtractsRestricted( + "resourceGroupName", + "bareMetalMachineName", + { + commands: [{ arguments: ["--min-severity=8"], command: "cluster-cve-report" }], + limitTimeSeconds: 60, + }, + ); + console.log(result); +} + +async function main() { + await runRestrictedDataExtractionOnBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunDataExtractsSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunDataExtractsSample.js new file mode 100644 index 000000000000..b26246839b77 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunDataExtractsSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * + * @summary run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunDataExtracts.json + */ +async function runDataExtractionOnBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.runDataExtracts( + "resourceGroupName", + "bareMetalMachineName", + { + commands: [{ arguments: ["SysInfo", "TTYLog"], command: "hardware-support-data-collection" }], + limitTimeSeconds: 60, + }, + ); + console.log(result); +} + +async function main() { + await runDataExtractionOnBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunReadCommandsSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunReadCommandsSample.js new file mode 100644 index 000000000000..2730f47d9d53 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunReadCommandsSample.js @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * + * @summary run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunReadCommands_Hostname.json + */ +async function runAndRetrieveOutputFromASingleReadOnlyCommandOnBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.runReadCommands( + "resourceGroupName", + "bareMetalMachineName", + { commands: [{ command: "hostname" }], limitTimeSeconds: 60 }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * + * @summary run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunReadCommands_Multiple.json + */ +async function runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.runReadCommands( + "resourceGroupName", + "bareMetalMachineName", + { + commands: [ + { arguments: ["pods", "-A"], command: "kubectl get" }, + { arguments: ["192.168.0.99", "-c", "3"], command: "ping" }, + ], + limitTimeSeconds: 60, + }, + ); + console.log(result); +} + +async function main() { + await runAndRetrieveOutputFromASingleReadOnlyCommandOnBareMetalMachine(); + await runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesStartSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesStartSample.js new file mode 100644 index 000000000000..60145fca88d6 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesStartSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to start the provided bare metal machine. + * + * @summary start the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Start.json + */ +async function startBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.start("resourceGroupName", "bareMetalMachineName"); + console.log(result); +} + +async function main() { + await startBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUncordonSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUncordonSample.js new file mode 100644 index 000000000000..7d8137ebec9a --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUncordonSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to uncordon the provided bare metal machine's Kubernetes node. + * + * @summary uncordon the provided bare metal machine's Kubernetes node. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Uncordon.json + */ +async function uncordonBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.uncordon( + "resourceGroupName", + "bareMetalMachineName", + ); + console.log(result); +} + +async function main() { + await uncordonBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUpdateSample.js new file mode 100644 index 000000000000..0c75a6b4d836 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUpdateSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. + * + * @summary patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Patch.json + */ +async function patchBareMetalMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.update( + "resourceGroupName", + "bareMetalMachineName", + { + bareMetalMachineUpdateParameters: { + machineDetails: "machinedetails", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main() { + await patchBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsCreateOrUpdateSample.js new file mode 100644 index 000000000000..0b742448c07b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsCreateOrUpdateSample.js @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a new baseboard management controller key set or update the existing one for the provided cluster. + * + * @summary create a new baseboard management controller key set or update the existing one for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Create.json + */ +async function createOrUpdateBaseboardManagementControllerKeySetOfCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bmcKeySets.createOrUpdate( + "resourceGroupName", + "clusterName", + "bmcKeySetName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", + expiration: new Date("2022-12-31T23:59:59.008Z"), + privilegeLevel: "Administrator", + userList: [ + { + azureUserName: "userABC", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + { + azureUserName: "userXYZ", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main() { + await createOrUpdateBaseboardManagementControllerKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsDeleteSample.js new file mode 100644 index 000000000000..222f49a6a02e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsDeleteSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the baseboard management controller key set of the provided cluster. + * + * @summary delete the baseboard management controller key set of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Delete.json + */ +async function deleteBaseboardManagementControllerKeySetOfCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bmcKeySets.delete( + "resourceGroupName", + "clusterName", + "bmcKeySetName", + ); + console.log(result); +} + +async function main() { + await deleteBaseboardManagementControllerKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsGetSample.js new file mode 100644 index 000000000000..ccb43dde83f2 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get baseboard management controller key set of the provided cluster. + * + * @summary get baseboard management controller key set of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Get.json + */ +async function getBaseboardManagementControllerKeySetOfCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bmcKeySets.get("resourceGroupName", "clusterName", "bmcKeySetName"); + console.log(result); +} + +async function main() { + await getBaseboardManagementControllerKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsListByClusterSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsListByClusterSample.js similarity index 51% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsListByClusterSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsListByClusterSample.js index a0f8f6e40a1b..2db3716fab60 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/bmcKeySetsListByClusterSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsListByClusterSample.js @@ -3,25 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of baseboard management controller key sets for the provided cluster. + * This sample demonstrates how to get a list of baseboard management controller key sets for the provided cluster. * - * @summary Get a list of baseboard management controller key sets for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_ListByCluster.json + * @summary get a list of baseboard management controller key sets for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_ListByCluster.json */ async function listBaseboardManagementControllerKeySetsOfTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.bmcKeySets.listByCluster(resourceGroupName, clusterName)) { + for await (const item of client.bmcKeySets.listByCluster("resourceGroupName", "clusterName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsUpdateSample.js new file mode 100644 index 000000000000..5c0a7f5fc7ba --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsUpdateSample.js @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to 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. + * + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Patch.json + */ +async function patchBaseboardManagementControllerKeySetOfCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bmcKeySets.update( + "resourceGroupName", + "clusterName", + "bmcKeySetName", + { + bmcKeySetUpdateParameters: { + expiration: new Date("2022-12-31T23:59:59.008Z"), + userList: [ + { + azureUserName: "userABC", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + { + azureUserName: "userXYZ", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main() { + await patchBaseboardManagementControllerKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksCreateOrUpdateSample.js new file mode 100644 index 000000000000..8ad188e78d58 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksCreateOrUpdateSample.js @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a new cloud services network or update the properties of the existing cloud services network. + * + * @summary create a new cloud services network or update the properties of the existing cloud services network. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Create.json + */ +async function createOrUpdateCloudServicesNetwork() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.cloudServicesNetworks.createOrUpdate( + "resourceGroupName", + "cloudServicesNetworkName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + additionalEgressEndpoints: [ + { + category: "azure-resource-management", + endpoints: [{ domainName: "storageaccountex.blob.core.windows.net", port: 443 }], + }, + ], + enableDefaultEgressEndpoints: "False", + storageOptions: { + mode: "Standard", + sizeMiB: 1048576, + storageApplianceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main() { + await createOrUpdateCloudServicesNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksDeleteSample.js new file mode 100644 index 000000000000..bd9bb8fc218e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksDeleteSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the provided cloud services network. + * + * @summary delete the provided cloud services network. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Delete.json + */ +async function deleteCloudServicesNetwork() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.cloudServicesNetworks.delete( + "resourceGroupName", + "cloudServicesNetworkName", + ); + console.log(result); +} + +async function main() { + await deleteCloudServicesNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksGetSample.js new file mode 100644 index 000000000000..587dc3ddddf7 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksGetSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get properties of the provided cloud services network. + * + * @summary get properties of the provided cloud services network. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Get.json + */ +async function getCloudServicesNetwork() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.cloudServicesNetworks.get( + "resourceGroupName", + "cloudServicesNetworkName", + ); + console.log(result); +} + +async function main() { + await getCloudServicesNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListByResourceGroupSample.js similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksListByResourceGroupSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListByResourceGroupSample.js index 69a96cebb5de..8316ffe952cc 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksListByResourceGroupSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListByResourceGroupSample.js @@ -3,24 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of cloud services networks in the provided resource group. + * This sample demonstrates how to get a list of cloud services networks in the provided resource group. * - * @summary Get a list of cloud services networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_ListByResourceGroup.json + * @summary get a list of cloud services networks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_ListByResourceGroup.json */ async function listCloudServicesNetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.cloudServicesNetworks.listByResourceGroup(resourceGroupName)) { + for await (const item of client.cloudServicesNetworks.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListBySubscriptionSample.js similarity index 62% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksListBySubscriptionSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListBySubscriptionSample.js index 8d57a5d30b96..b43abda1a9b4 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/cloudServicesNetworksListBySubscriptionSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListBySubscriptionSample.js @@ -3,23 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of cloud services networks in the provided subscription. + * This sample demonstrates how to get a list of cloud services networks in the provided subscription. * - * @summary Get a list of cloud services networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_ListBySubscription.json + * @summary get a list of cloud services networks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_ListBySubscription.json */ async function listCloudServicesNetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.cloudServicesNetworks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksUpdateSample.js new file mode 100644 index 000000000000..73c950dcc5a8 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksUpdateSample.js @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. + * + * @summary update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Patch.json + */ +async function patchCloudServicesNetwork() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.cloudServicesNetworks.update( + "resourceGroupName", + "cloudServicesNetworkName", + { + cloudServicesNetworkUpdateParameters: { + additionalEgressEndpoints: [ + { + category: "azure-resource-management", + endpoints: [{ domainName: "storageaccountex.blob.core.windows.net", port: 443 }], + }, + ], + enableDefaultEgressEndpoints: "False", + storageOptions: { + mode: "Standard", + sizeMiB: 1048576, + storageApplianceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main() { + await patchCloudServicesNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersCreateOrUpdateSample.js new file mode 100644 index 000000000000..824f40443ad4 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersCreateOrUpdateSample.js @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a new cluster manager or update properties of the cluster manager if it exists. + * + * @summary create a new cluster manager or update properties of the cluster manager if it exists. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Create.json + */ +async function createOrUpdateClusterManager() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.createOrUpdate( + "resourceGroupName", + "clusterManagerName", + { + identity: { type: "SystemAssigned" }, + kind: "AzureLocal", + location: "location", + analyticsWorkspaceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName", + fabricControllerId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to create a new cluster manager or update properties of the cluster manager if it exists. + * + * @summary create a new cluster manager or update properties of the cluster manager if it exists. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Create_Uami.json + */ +async function createOrUpdateClusterManagerWithUserAssignedIdentity() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.createOrUpdate( + "resourceGroupName", + "clusterManagerName", + { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + }, + }, + kind: "AzureLocal", + location: "location", + analyticsWorkspaceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName", + fabricControllerId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main() { + await createOrUpdateClusterManager(); + await createOrUpdateClusterManagerWithUserAssignedIdentity(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersDeleteSample.js new file mode 100644 index 000000000000..a36118b388ce --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersDeleteSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the provided cluster manager. + * + * @summary delete the provided cluster manager. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Delete.json + */ +async function deleteClusterManager() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.delete("resourceGroupName", "clusterManagerName"); + console.log(result); +} + +async function main() { + await deleteClusterManager(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersGetSample.js new file mode 100644 index 000000000000..fc704ae45965 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the properties of the provided cluster manager. + * + * @summary get the properties of the provided cluster manager. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Get.json + */ +async function getClusterManager() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.get("resourceGroupName", "clusterManagerName"); + console.log(result); +} + +async function main() { + await getClusterManager(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListByResourceGroupSample.js similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersListByResourceGroupSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListByResourceGroupSample.js index ba1d82db4ed4..3e2638f95903 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersListByResourceGroupSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListByResourceGroupSample.js @@ -3,24 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of cluster managers in the provided resource group. + * This sample demonstrates how to get a list of cluster managers in the provided resource group. * - * @summary Get a list of cluster managers in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_ListByResourceGroup.json + * @summary get a list of cluster managers in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_ListByResourceGroup.json */ async function listClusterManagersForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.clusterManagers.listByResourceGroup(resourceGroupName)) { + for await (const item of client.clusterManagers.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListBySubscriptionSample.js similarity index 61% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersListBySubscriptionSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListBySubscriptionSample.js index 3fe828699bd4..adccecde8cac 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clusterManagersListBySubscriptionSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListBySubscriptionSample.js @@ -3,23 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of cluster managers in the provided subscription. + * This sample demonstrates how to get a list of cluster managers in the provided subscription. * - * @summary Get a list of cluster managers in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_ListBySubscription.json + * @summary get a list of cluster managers in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_ListBySubscription.json */ async function listClusterManagersForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.clusterManagers.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersUpdateRelayPrivateEndpointConnectionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersUpdateRelayPrivateEndpointConnectionSample.js new file mode 100644 index 000000000000..d6fe81d24596 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersUpdateRelayPrivateEndpointConnectionSample.js @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. + * + * @summary update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_UpdateRelayPrivateEndpointConnection_Approve.json + */ +async function approvePrivateEndpointConnection() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.updateRelayPrivateEndpointConnection( + "resourceGroupName", + "clusterManagerName", + { + clusterManagerUpdateRelayPrivateEndpointConnectionParameters: { + connectionState: "Approved", + description: "Approving private endpoint connection", + privateEndpointResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. + * + * @summary update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_UpdateRelayPrivateEndpointConnection_Reject.json + */ +async function rejectPrivateEndpointConnection() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.updateRelayPrivateEndpointConnection( + "resourceGroupName", + "clusterManagerName", + { + clusterManagerUpdateRelayPrivateEndpointConnectionParameters: { + connectionState: "Rejected", + description: "Rejecting private endpoint connection", + privateEndpointResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", + }, + }, + ); + console.log(result); +} + +async function main() { + await approvePrivateEndpointConnection(); + await rejectPrivateEndpointConnection(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersUpdateSample.js new file mode 100644 index 000000000000..6a4369a12aeb --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersUpdateSample.js @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. + * + * @summary patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Patch.json + */ +async function patchClusterManager() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.update("resourceGroupName", "clusterManagerName", { + clusterManagerUpdateParameters: { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": + {}, + }, + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +async function main() { + await patchClusterManager(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersContinueUpdateVersionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersContinueUpdateVersionSample.js new file mode 100644 index 000000000000..65e465d408dd --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersContinueUpdateVersionSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. + * + * @summary trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. + * x-ms-original-file: 2026-05-01-preview/Clusters_ContinueUpdateVersion.json + */ +async function continueUpdateClusterVersion() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.continueUpdateVersion("resourceGroupName", "clusterName", { + machineGroupTargetingMode: "AlphaByRack", + safeguardMode: "All", + }); + console.log(result); +} + +async function main() { + await continueUpdateClusterVersion(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersCreateOrUpdateSample.js similarity index 84% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersCreateOrUpdateSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersCreateOrUpdateSample.js index 614770c4cf4c..bde6177f0603 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersCreateOrUpdateSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersCreateOrUpdateSample.js @@ -3,20 +3,31 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Create a new cluster or update the properties of the cluster if it exists. + * This sample demonstrates how to create a new cluster or update the properties of the cluster if it exists. * - * @summary Create a new cluster or update the properties of the cluster if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Create.json + * @summary create a new cluster or update the properties of the cluster if it exists. + * x-ms-original-file: 2026-05-01-preview/Clusters_Create.json */ async function createOrUpdateCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.createOrUpdate("resourceGroupName", "clusterName", { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", + type: "CustomLocation", + }, + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + }, + }, + kind: "AzureLocal", + location: "location", aggregatorOrSingleRackDefinition: { bareMetalMachineConfigurationData: [ { @@ -64,7 +75,7 @@ async function createOrUpdateCluster() { }, analyticsOutputSettings: { analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName", associatedIdentity: { identityType: "UserAssignedIdentity", userAssignedIdentityResourceId: @@ -93,11 +104,7 @@ async function createOrUpdateCluster() { }, ], }, - computeDeploymentThreshold: { - type: "PercentSuccess", - grouping: "PerCluster", - value: 90, - }, + computeDeploymentThreshold: { grouping: "PerCluster", type: "PercentSuccess", value: 90 }, computeRackDefinitions: [ { bareMetalMachineConfigurationData: [ @@ -145,25 +152,10 @@ async function createOrUpdateCluster() { ], }, ], - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", - type: "CustomLocation", - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, networkFabricId: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName", - runtimeProtectionConfiguration: { enforcementLevel: "OnDemand" }, + runtimeProtectionConfiguration: { definitionUpdateMode: "None", enforcementLevel: "OnDemand" }, secretArchiveSettings: { associatedIdentity: { identityType: "UserAssignedIdentity", @@ -172,7 +164,6 @@ async function createOrUpdateCluster() { }, vaultUri: "https://keyvaultname.vault.azure.net/", }, - tags: { key1: "myvalue1", key2: "myvalue2" }, updateStrategy: { maxUnavailable: 4, strategyType: "Rack", @@ -181,14 +172,8 @@ async function createOrUpdateCluster() { waitTimeMinutes: 10, }, vulnerabilityScanningSettings: { containerScan: "Enabled" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - clusterParameters, - ); + tags: { key1: "myvalue1", key2: "myvalue2" }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeleteSample.js new file mode 100644 index 000000000000..581c78797627 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeleteSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the provided cluster. + * + * @summary delete the provided cluster. + * x-ms-original-file: 2026-05-01-preview/Clusters_Delete.json + */ +async function deleteCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.delete("resourceGroupName", "clusterName"); + console.log(result); +} + +async function main() { + await deleteCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeploySample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeploySample.js new file mode 100644 index 000000000000..c91818bb24fd --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeploySample.js @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deploy the cluster using the rack configuration provided during creation. + * + * @summary deploy the cluster using the rack configuration provided during creation. + * x-ms-original-file: 2026-05-01-preview/Clusters_Deploy.json + */ +async function deployCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.deploy("resourceGroupName", "clusterName", { + clusterDeployParameters: {}, + }); + console.log(result); +} + +/** + * This sample demonstrates how to deploy the cluster using the rack configuration provided during creation. + * + * @summary deploy the cluster using the rack configuration provided during creation. + * x-ms-original-file: 2026-05-01-preview/Clusters_Deploy_SkipValidation.json + */ +async function deployClusterSkippingValidation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.deploy("resourceGroupName", "clusterName", { + clusterDeployParameters: { skipValidationsForMachines: ["bmmName1"] }, + }); + console.log(result); +} + +async function main() { + await deployCluster(); + await deployClusterSkippingValidation(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersGetSample.js new file mode 100644 index 000000000000..651cebe699e7 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get properties of the provided cluster. + * + * @summary get properties of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/Clusters_Get.json + */ +async function getCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.get("resourceGroupName", "clusterName"); + console.log(result); +} + +async function main() { + await getCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersInspectSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersInspectSample.js new file mode 100644 index 000000000000..b5772260dfb9 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersInspectSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied additional actions and filters. + * + * @summary trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied additional actions and filters. + * x-ms-original-file: 2026-05-01-preview/Clusters_Inspect.json + */ +async function inspectCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.inspect("resourceGroupName", "clusterName", { + clusterInspectParameters: { + additionalActions: ["ResetHardware"], + filterDevices: { bareMetalMachineNames: ["machine1", "machine2"], rackNames: ["rack1"] }, + }, + }); + console.log(result); +} + +async function main() { + await inspectCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListByResourceGroupSample.js new file mode 100644 index 000000000000..58ece6574b61 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListByResourceGroupSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a list of clusters in the provided resource group. + * + * @summary get a list of clusters in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/Clusters_ListByResourceGroup.json + */ +async function listClustersForResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.clusters.listByResourceGroup("resourceGroupName")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await listClustersForResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListBySubscriptionSample.js similarity index 60% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersListBySubscriptionSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListBySubscriptionSample.js index ebf119b3ded2..0601cbf519c2 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/clustersListBySubscriptionSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListBySubscriptionSample.js @@ -3,23 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of clusters in the provided subscription. + * This sample demonstrates how to get a list of clusters in the provided subscription. * - * @summary Get a list of clusters in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ListBySubscription.json + * @summary get a list of clusters in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/Clusters_ListBySubscription.json */ async function listClustersForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.clusters.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersRotateCredentialSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersRotateCredentialSample.js new file mode 100644 index 000000000000..98d3855d7901 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersRotateCredentialSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to rotate the specified cluster credential. + * + * @summary rotate the specified cluster credential. + * x-ms-original-file: 2026-05-01-preview/Clusters_RotateCredential.json + */ +async function rotateOneOrMoreManagedCredentials() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.rotateCredential("resourceGroupName", "clusterName", { + credentials: ["BMC Credential"], + }); + console.log(result); +} + +async function main() { + await rotateOneOrMoreManagedCredentials(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersScanRuntimeSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersScanRuntimeSample.js new file mode 100644 index 000000000000..42d46408d03c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersScanRuntimeSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. + * + * @summary triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. + * x-ms-original-file: 2026-05-01-preview/Clusters_ScanRuntime.json + */ +async function executeARuntimeProtectionScanOnTheCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.scanRuntime("resourceGroupName", "clusterName", { + clusterScanRuntimeParameters: { scanActivity: "Scan" }, + }); + console.log(result); +} + +async function main() { + await executeARuntimeProtectionScanOnTheCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateSample.js new file mode 100644 index 000000000000..9695c2365771 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateSample.js @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_AggregatorOrSingleRackDefinition.json + */ +async function patchClusterAggregatorOrSingleRackDefinition() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + aggregatorOrSingleRackDefinition: { + bareMetalMachineConfigurationData: [ + { + bmcCredentials: { password: "{password}", username: "username" }, + bmcMacAddress: "AA:BB:CC:DD:EE:FF", + bootMacAddress: "00:BB:CC:DD:EE:FF", + machineDetails: "extraDetails", + machineName: "bmmName1", + rackSlot: 1, + serialNumber: "BM1219XXX", + }, + { + bmcCredentials: { password: "{password}", username: "username" }, + bmcMacAddress: "AA:BB:CC:DD:EE:00", + bootMacAddress: "00:BB:CC:DD:EE:00", + machineDetails: "extraDetails", + machineName: "bmmName2", + rackSlot: 2, + serialNumber: "BM1219YYY", + }, + ], + networkRackId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", + rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", + rackSerialNumber: "newSerialNumber", + rackSkuId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", + storageApplianceConfigurationData: [ + { + adminCredentials: { password: "{password}", username: "username" }, + rackSlot: 1, + serialNumber: "BM1219XXX", + storageApplianceName: "vmName", + }, + ], + }, + computeDeploymentThreshold: { grouping: "PerCluster", type: "PercentSuccess", value: 90 }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_AnalyticsOutput.json + */ +async function patchClusterAnalyticsOutput() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": + {}, + }, + }, + analyticsOutputSettings: { + analyticsWorkspaceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName", + associatedIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", + }, + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_CommandOutput.json + */ +async function patchClusterCommandOutput() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": + {}, + }, + }, + commandOutputSettings: { + associatedIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", + }, + containerUrl: "https://myaccount.blob.core.windows.net/mycontainer?restype=container", + overrides: [ + { + associatedIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", + }, + commandOutputType: "StorageRunReadCommands", + containerUrl: "https://myaccount.blob.core.windows.net/myContainer2?restype=container", + }, + ], + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_Location.json + */ +async function patchClusterLocation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + clusterLocation: "Foo Street, 3rd Floor, row 9", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_RuntimeProtectionConfiguration.json + */ +async function patchRuntimeProtectionConfiguration() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + runtimeProtectionConfiguration: { + definitionUpdateMode: "Automatic", + enforcementLevel: "OnDemand", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_SecretArchive.json + */ +async function patchSecretArchive() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + secretArchiveSettings: { + associatedIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", + }, + vaultUri: "https://keyvaultname.vault.azure.net/", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_UpdateStrategy.json + */ +async function patchUpdateStrategy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + updateStrategy: { + maxUnavailable: 4, + strategyType: "Rack", + thresholdType: "CountSuccess", + thresholdValue: 4, + waitTimeMinutes: 10, + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_VulnerabilityScanning.json + */ +async function patchVulnerabilityScanning() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + vulnerabilityScanningSettings: { containerScan: "Enabled" }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +async function main() { + await patchClusterAggregatorOrSingleRackDefinition(); + await patchClusterAnalyticsOutput(); + await patchClusterCommandOutput(); + await patchClusterLocation(); + await patchRuntimeProtectionConfiguration(); + await patchSecretArchive(); + await patchUpdateStrategy(); + await patchVulnerabilityScanning(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateVersionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateVersionSample.js new file mode 100644 index 000000000000..c5bb023544f3 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateVersionSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update the version of the provided cluster to one of the available supported versions. + * + * @summary update the version of the provided cluster to one of the available supported versions. + * x-ms-original-file: 2026-05-01-preview/Clusters_UpdateVersion.json + */ +async function updateClusterVersion() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.updateVersion("resourceGroupName", "clusterName", { + safeguardMode: "All", + targetClusterVersion: "2.0", + }); + console.log(result); +} + +async function main() { + await updateClusterVersion(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesCreateOrUpdateSample.js new file mode 100644 index 000000000000..8695edf7fa05 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesCreateOrUpdateSample.js @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a new virtual machine console or update the properties of the existing virtual machine console. + * + * @summary create a new virtual machine console or update the properties of the existing virtual machine console. + * x-ms-original-file: 2026-05-01-preview/Consoles_Create.json + */ +async function createOrUpdateVirtualMachineConsole() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.consoles.createOrUpdate( + "resourceGroupName", + "virtualMachineName", + "default", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + enabled: "True", + expiration: new Date("2022-06-01T01:27:03.008Z"), + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main() { + await createOrUpdateVirtualMachineConsole(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesDeleteSample.js new file mode 100644 index 000000000000..5e480d9a3819 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesDeleteSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the provided virtual machine console. + * + * @summary delete the provided virtual machine console. + * x-ms-original-file: 2026-05-01-preview/Consoles_Delete.json + */ +async function deleteVirtualMachineConsole() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.consoles.delete("resourceGroupName", "virtualMachineName", "default"); + console.log(result); +} + +async function main() { + await deleteVirtualMachineConsole(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesGetSample.js new file mode 100644 index 000000000000..0b1c88b56f9c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get properties of the provided virtual machine console. + * + * @summary get properties of the provided virtual machine console. + * x-ms-original-file: 2026-05-01-preview/Consoles_Get.json + */ +async function getVirtualMachineConsole() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.consoles.get("resourceGroupName", "virtualMachineName", "default"); + console.log(result); +} + +async function main() { + await getVirtualMachineConsole(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesListByVirtualMachineSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesListByVirtualMachineSample.js similarity index 52% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesListByVirtualMachineSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesListByVirtualMachineSample.js index e13eb5b5782a..60e9ea73bc0e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/consolesListByVirtualMachineSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesListByVirtualMachineSample.js @@ -3,28 +3,25 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of consoles for the provided virtual machine. + * This sample demonstrates how to get a list of consoles for the provided virtual machine. * - * @summary Get a list of consoles for the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_ListByVirtualMachine.json + * @summary get a list of consoles for the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/Consoles_ListByVirtualMachine.json */ async function listConsolesOfTheVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.consoles.listByVirtualMachine( - resourceGroupName, - virtualMachineName, + "resourceGroupName", + "virtualMachineName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesUpdateSample.js new file mode 100644 index 000000000000..538d5f6e3b12 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesUpdateSample.js @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to 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. + * + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/Consoles_Patch.json + */ +async function patchVirtualMachineConsole() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.consoles.update( + "resourceGroupName", + "virtualMachineName", + "default", + { + consoleUpdateParameters: { + enabled: "True", + expiration: new Date("2022-06-01T01:27:03.008Z"), + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main() { + await patchVirtualMachineConsole(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesCreateOrUpdateSample.js new file mode 100644 index 000000000000..73fe85eead90 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesCreateOrUpdateSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. + * + * @summary create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Create.json + */ +async function createOrUpdateKubernetesClusterFeature() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusterFeatures.createOrUpdate( + "resourceGroupName", + "kubernetesClusterName", + "featureName", + { + location: "location", + options: [{ key: "featureOptionName", value: "featureOptionValue" }], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main() { + await createOrUpdateKubernetesClusterFeature(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesDeleteSample.js new file mode 100644 index 000000000000..776e747b440c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesDeleteSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the provided Kubernetes cluster feature. + * + * @summary delete the provided Kubernetes cluster feature. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Delete.json + */ +async function deleteKubernetesClusterFeature() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusterFeatures.delete( + "resourceGroupName", + "kubernetesClusterName", + "featureName", + ); + console.log(result); +} + +async function main() { + await deleteKubernetesClusterFeature(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesGetSample.js new file mode 100644 index 000000000000..3cd33fbbbe6e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesGetSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get properties of the provided the Kubernetes cluster feature. + * + * @summary get properties of the provided the Kubernetes cluster feature. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Get.json + */ +async function getKubernetesClusterFeature() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusterFeatures.get( + "resourceGroupName", + "kubernetesClusterName", + "featureName", + ); + console.log(result); +} + +async function main() { + await getKubernetesClusterFeature(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesListByKubernetesClusterSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesListByKubernetesClusterSample.js similarity index 52% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesListByKubernetesClusterSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesListByKubernetesClusterSample.js index 656996319e5f..601c78ab8721 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClusterFeaturesListByKubernetesClusterSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesListByKubernetesClusterSample.js @@ -3,28 +3,25 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of features for the provided Kubernetes cluster. + * This sample demonstrates how to get a list of features for the provided Kubernetes cluster. * - * @summary Get a list of features for the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_ListByKubernetesCluster.json + * @summary get a list of features for the provided Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_ListByKubernetesCluster.json */ async function listFeaturesForTheKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.kubernetesClusterFeatures.listByKubernetesCluster( - resourceGroupName, - kubernetesClusterName, + "resourceGroupName", + "kubernetesClusterName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesUpdateSample.js new file mode 100644 index 000000000000..8f64a154d6d3 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesUpdateSample.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to patch properties of the provided Kubernetes cluster feature. + * + * @summary patch properties of the provided Kubernetes cluster feature. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Patch.json + */ +async function patchKubernetesClusterFeature() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusterFeatures.update( + "resourceGroupName", + "kubernetesClusterName", + "featureName", + { + kubernetesClusterFeatureUpdateParameters: { + options: [{ key: "featureOptionName", value: "featureOptionValue" }], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main() { + await patchKubernetesClusterFeature(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersCreateOrUpdateSample.js new file mode 100644 index 000000000000..01d12e1deb22 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersCreateOrUpdateSample.js @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a new Kubernetes cluster or update the properties of the existing one. + * + * @summary create a new Kubernetes cluster or update the properties of the existing one. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Create.json + */ +async function createOrUpdateKubernetesCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.createOrUpdate( + "resourceGroupName", + "kubernetesClusterName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + aadConfiguration: { adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"] }, + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + controlPlaneNodeConfiguration: { + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + availabilityZones: ["1", "2", "3"], + count: 3, + vmSkuName: "NC_G6_28_v1", + }, + initialAgentPoolConfigurations: [ + { + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, + attachedNetworkConfiguration: { + l2Networks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", + pluginType: "DPDK", + }, + ], + l3Networks: [ + { + ipamEnabled: "False", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + pluginType: "SRIOV", + }, + ], + trunkedNetworks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", + pluginType: "MACVLAN", + }, + ], + }, + availabilityZones: ["1", "2", "3"], + count: 3, + labels: [{ key: "kubernetes.label", value: "true" }], + mode: "System", + name: "SystemPool-1", + taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], + upgradeSettings: { maxSurge: "1" }, + vmSkuName: "NC_P46_224_v1", + }, + ], + kubernetesVersion: "1.XX.Y", + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, + networkConfiguration: { + attachedNetworkConfiguration: { + l2Networks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", + pluginType: "DPDK", + }, + ], + l3Networks: [ + { + ipamEnabled: "False", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + pluginType: "SRIOV", + }, + ], + trunkedNetworks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", + pluginType: "MACVLAN", + }, + ], + }, + bgpServiceLoadBalancerConfiguration: { + bgpAdvertisements: [ + { + advertiseToFabric: "True", + communities: ["64512:100"], + ipAddressPools: ["pool1"], + peers: ["peer1"], + }, + ], + bgpPeers: [ + { + bfdEnabled: "False", + bgpMultiHop: "False", + holdTime: "P300s", + keepAliveTime: "P300s", + myAsn: 64512, + name: "peer1", + peerAddress: "203.0.113.254", + peerAsn: 64497, + peerPort: 179, + }, + ], + fabricPeeringEnabled: "True", + ipAddressPools: [ + { + addresses: ["198.51.102.0/24"], + autoAssign: "True", + name: "pool1", + onlyUseHostIps: "True", + }, + ], + }, + cloudServicesNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", + cniNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + dnsServiceIp: "198.51.101.2", + podCidrs: ["198.51.100.0/24"], + serviceCidrs: ["198.51.101.0/24"], + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to create a new Kubernetes cluster or update the properties of the existing one. + * + * @summary create a new Kubernetes cluster or update the properties of the existing one. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_L2LoadBalancer_Create.json + */ +async function createOrUpdateKubernetesClusterWithALayer2LoadBalancer() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.createOrUpdate( + "resourceGroupName", + "kubernetesClusterName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + aadConfiguration: { adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"] }, + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + controlPlaneNodeConfiguration: { + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + availabilityZones: ["1", "2", "3"], + count: 3, + vmSkuName: "NC_G6_28_v1", + }, + initialAgentPoolConfigurations: [ + { + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, + attachedNetworkConfiguration: { + l2Networks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", + pluginType: "DPDK", + }, + ], + l3Networks: [ + { + ipamEnabled: "False", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + pluginType: "SRIOV", + }, + ], + trunkedNetworks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", + pluginType: "MACVLAN", + }, + ], + }, + availabilityZones: ["1", "2", "3"], + count: 3, + labels: [{ key: "kubernetes.label", value: "true" }], + mode: "System", + name: "SystemPool-1", + taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], + upgradeSettings: { maxSurge: "1" }, + vmSkuName: "NC_P46_224_v1", + }, + ], + kubernetesVersion: "1.XX.Y", + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, + networkConfiguration: { + attachedNetworkConfiguration: { + l2Networks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", + pluginType: "DPDK", + }, + ], + l3Networks: [ + { + ipamEnabled: "False", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + pluginType: "SRIOV", + }, + ], + trunkedNetworks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", + pluginType: "MACVLAN", + }, + ], + }, + cloudServicesNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", + cniNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + dnsServiceIp: "198.51.101.2", + l2ServiceLoadBalancerConfiguration: { + ipAddressPools: [ + { addresses: ["198.51.102.2-198.51.102.254"], autoAssign: "True", name: "pool1" }, + ], + }, + podCidrs: ["198.51.100.0/24"], + serviceCidrs: ["198.51.101.0/24"], + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main() { + await createOrUpdateKubernetesCluster(); + await createOrUpdateKubernetesClusterWithALayer2LoadBalancer(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersDeleteSample.js new file mode 100644 index 000000000000..b69de01fab36 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersDeleteSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the provided Kubernetes cluster. + * + * @summary delete the provided Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Delete.json + */ +async function deleteKubernetesCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.delete( + "resourceGroupName", + "kubernetesClusterName", + ); + console.log(result); +} + +async function main() { + await deleteKubernetesCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersGetSample.js new file mode 100644 index 000000000000..4d586fb599c5 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get properties of the provided the Kubernetes cluster. + * + * @summary get properties of the provided the Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Get.json + */ +async function getKubernetesCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.get("resourceGroupName", "kubernetesClusterName"); + console.log(result); +} + +async function main() { + await getKubernetesCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListByResourceGroupSample.js similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersListByResourceGroupSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListByResourceGroupSample.js index eb7f4c6ad27e..39a04f8f4807 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersListByResourceGroupSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListByResourceGroupSample.js @@ -3,24 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of Kubernetes clusters in the provided resource group. + * This sample demonstrates how to get a list of Kubernetes clusters in the provided resource group. * - * @summary Get a list of Kubernetes clusters in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_ListByResourceGroup.json + * @summary get a list of Kubernetes clusters in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_ListByResourceGroup.json */ async function listKubernetesClustersForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.kubernetesClusters.listByResourceGroup(resourceGroupName)) { + for await (const item of client.kubernetesClusters.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListBySubscriptionSample.js similarity index 61% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersListBySubscriptionSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListBySubscriptionSample.js index eda5b8b8c2c7..0a53f18908c0 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/kubernetesClustersListBySubscriptionSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListBySubscriptionSample.js @@ -3,23 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of Kubernetes clusters in the provided subscription. + * This sample demonstrates how to get a list of Kubernetes clusters in the provided subscription. * - * @summary Get a list of Kubernetes clusters in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_ListBySubscription.json + * @summary get a list of Kubernetes clusters in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_ListBySubscription.json */ async function listKubernetesClustersForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.kubernetesClusters.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersRestartNodeSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersRestartNodeSample.js new file mode 100644 index 000000000000..497ac579c24f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersRestartNodeSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to restart a targeted node of a Kubernetes cluster. + * + * @summary restart a targeted node of a Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_RestartNode.json + */ +async function restartAKubernetesClusterNode() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.restartNode( + "resourceGroupName", + "kubernetesClusterName", + { nodeName: "nodeName" }, + ); + console.log(result); +} + +async function main() { + await restartAKubernetesClusterNode(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersUpdateSample.js new file mode 100644 index 000000000000..1a8fd1a1053c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersUpdateSample.js @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Patch.json + */ +async function patchKubernetesCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.update( + "resourceGroupName", + "kubernetesClusterName", + { + kubernetesClusterUpdateParameters: { + administratorConfiguration: { + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + controlPlaneNodeConfiguration: { + administratorConfiguration: { + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + count: 3, + }, + kubernetesVersion: "1.XX.Y", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main() { + await patchKubernetesCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsCreateOrUpdateSample.js new file mode 100644 index 000000000000..c44f3ea3ec1a --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsCreateOrUpdateSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create the Kubernetes version resource or update its tags. This resource is system managed and should only be created with the name "default". + * + * @summary create the Kubernetes version resource or update its tags. This resource is system managed and should only be created with the name "default". + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Create.json + */ +async function createOrUpdateKubernetesVersions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesVersions.createOrUpdate("resourceGroupName", "default", { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }); + console.log(result); +} + +async function main() { + await createOrUpdateKubernetesVersions(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsDeleteSample.js new file mode 100644 index 000000000000..f5ec64fd264b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsDeleteSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the specified Kubernetes version resource. + * + * @summary delete the specified Kubernetes version resource. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Delete.json + */ +async function deleteKubernetesVersions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesVersions.delete("resourceGroupName", "default"); + console.log(result); +} + +async function main() { + await deleteKubernetesVersions(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsGetSample.js new file mode 100644 index 000000000000..6edc78e59f05 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * + * @summary retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Get.json + */ +async function getKubernetesVersions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesVersions.get("resourceGroupName", "default"); + console.log(result); +} + +async function main() { + await getKubernetesVersions(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsListByResourceGroupSample.js new file mode 100644 index 000000000000..7efe93493766 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsListByResourceGroupSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a list of Kubernetes version resources in the provided resource group. + * + * @summary get a list of Kubernetes version resources in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_ListByResourceGroup.json + */ +async function listKubernetesVersionsForResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.kubernetesVersions.listByResourceGroup("resourceGroupName")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await listKubernetesVersionsForResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsListBySubscriptionSample.js new file mode 100644 index 000000000000..ffd2f40e7949 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsListBySubscriptionSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a list of Kubernetes version resources in the provided subscription. + * + * @summary get a list of Kubernetes version resources in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_ListBySubscription.json + */ +async function listKubernetesVersionsForSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.kubernetesVersions.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await listKubernetesVersionsForSubscription(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsUpdateSample.js new file mode 100644 index 000000000000..0acf82e5caf4 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesVersionsUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @summary update tags associated with the Kubernetes version resource. No other properties are supported for update. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_UpdateTags.json + */ +async function patchKubernetesVersions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesVersions.update("resourceGroupName", "default", { + kubernetesVersionPatchParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); + console.log(result); +} + +async function main() { + await patchKubernetesVersions(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksCreateOrUpdateSample.js similarity index 61% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksCreateOrUpdateSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksCreateOrUpdateSample.js index 5098e7408dfe..2ce7eb078f81 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksCreateOrUpdateSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksCreateOrUpdateSample.js @@ -3,38 +3,29 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Create a new layer 2 (L2) network or update the properties of the existing network. + * This sample demonstrates how to create a new layer 2 (L2) network or update the properties of the existing network. * - * @summary Create a new layer 2 (L2) network or update the properties of the existing network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Create.json + * @summary create a new layer 2 (L2) network or update the properties of the existing network. + * x-ms-original-file: 2026-05-01-preview/L2Networks_Create.json */ async function createOrUpdateL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const l2NetworkParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l2Networks.createOrUpdate("resourceGroupName", "l2NetworkName", { extendedLocation: { name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", type: "CustomLocation", }, + location: "location", hybridAksPluginType: "DPDK", interfaceName: "eth0", l2IsolationDomainId: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", - location: "location", tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.beginCreateOrUpdateAndWait( - resourceGroupName, - l2NetworkName, - l2NetworkParameters, - ); + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksDeleteSample.js new file mode 100644 index 000000000000..7ccdd0943e40 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksDeleteSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the provided layer 2 (L2) network. + * + * @summary delete the provided layer 2 (L2) network. + * x-ms-original-file: 2026-05-01-preview/L2Networks_Delete.json + */ +async function deleteL2Network() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l2Networks.delete("resourceGroupName", "l2NetworkName"); + console.log(result); +} + +async function main() { + await deleteL2Network(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksGetSample.js new file mode 100644 index 000000000000..96d6af83390f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get properties of the provided layer 2 (L2) network. + * + * @summary get properties of the provided layer 2 (L2) network. + * x-ms-original-file: 2026-05-01-preview/L2Networks_Get.json + */ +async function getL2Network() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l2Networks.get("resourceGroupName", "l2NetworkName"); + console.log(result); +} + +async function main() { + await getL2Network(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListByResourceGroupSample.js similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksListByResourceGroupSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListByResourceGroupSample.js index 92a31e0776ca..87f215ab15fe 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksListByResourceGroupSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListByResourceGroupSample.js @@ -3,24 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of layer 2 (L2) networks in the provided resource group. + * This sample demonstrates how to get a list of layer 2 (L2) networks in the provided resource group. * - * @summary Get a list of layer 2 (L2) networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_ListByResourceGroup.json + * @summary get a list of layer 2 (L2) networks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/L2Networks_ListByResourceGroup.json */ async function listL2NetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.l2Networks.listByResourceGroup(resourceGroupName)) { + for await (const item of client.l2Networks.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListBySubscriptionSample.js similarity index 61% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksListBySubscriptionSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListBySubscriptionSample.js index efba92203761..ce8620168ee5 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l2NetworksListBySubscriptionSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListBySubscriptionSample.js @@ -3,23 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of layer 2 (L2) networks in the provided subscription. + * This sample demonstrates how to get a list of layer 2 (L2) networks in the provided subscription. * - * @summary Get a list of layer 2 (L2) networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_ListBySubscription.json + * @summary get a list of layer 2 (L2) networks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/L2Networks_ListBySubscription.json */ async function listL2NetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.l2Networks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksUpdateSample.js new file mode 100644 index 000000000000..77037892899d --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update tags associated with the provided layer 2 (L2) network. + * + * @summary update tags associated with the provided layer 2 (L2) network. + * x-ms-original-file: 2026-05-01-preview/L2Networks_Patch.json + */ +async function patchL2Network() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l2Networks.update("resourceGroupName", "l2NetworkName", { + l2NetworkUpdateParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); + console.log(result); +} + +async function main() { + await patchL2Network(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksCreateOrUpdateSample.js similarity index 63% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksCreateOrUpdateSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksCreateOrUpdateSample.js index 2baa869cad3f..1e2191100ace 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksCreateOrUpdateSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksCreateOrUpdateSample.js @@ -3,41 +3,32 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Create a new layer 3 (L3) network or update the properties of the existing network. + * This sample demonstrates how to create a new layer 3 (L3) network or update the properties of the existing network. * - * @summary Create a new layer 3 (L3) network or update the properties of the existing network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Create.json + * @summary create a new layer 3 (L3) network or update the properties of the existing network. + * x-ms-original-file: 2026-05-01-preview/L3Networks_Create.json */ async function createOrUpdateL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const l3NetworkParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l3Networks.createOrUpdate("resourceGroupName", "l3NetworkName", { extendedLocation: { name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", type: "CustomLocation", }, + location: "location", interfaceName: "eth0", ipAllocationType: "DualStack", ipv4ConnectedPrefix: "198.51.100.0/24", ipv6ConnectedPrefix: "2001:db8::/64", l3IsolationDomainId: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, vlan: 12, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.beginCreateOrUpdateAndWait( - resourceGroupName, - l3NetworkName, - l3NetworkParameters, - ); + tags: { key1: "myvalue1", key2: "myvalue2" }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksDeleteSample.js new file mode 100644 index 000000000000..d11314f62a99 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksDeleteSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the provided layer 3 (L3) network. + * + * @summary delete the provided layer 3 (L3) network. + * x-ms-original-file: 2026-05-01-preview/L3Networks_Delete.json + */ +async function deleteL3Network() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l3Networks.delete("resourceGroupName", "l3NetworkName"); + console.log(result); +} + +async function main() { + await deleteL3Network(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksGetSample.js new file mode 100644 index 000000000000..188b3db7b6ef --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get properties of the provided layer 3 (L3) network. + * + * @summary get properties of the provided layer 3 (L3) network. + * x-ms-original-file: 2026-05-01-preview/L3Networks_Get.json + */ +async function getL3Network() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l3Networks.get("resourceGroupName", "l3NetworkName"); + console.log(result); +} + +async function main() { + await getL3Network(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListByResourceGroupSample.js similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksListByResourceGroupSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListByResourceGroupSample.js index ca2e5701c8b6..3927f0555430 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksListByResourceGroupSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListByResourceGroupSample.js @@ -3,24 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of layer 3 (L3) networks in the provided resource group. + * This sample demonstrates how to get a list of layer 3 (L3) networks in the provided resource group. * - * @summary Get a list of layer 3 (L3) networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_ListByResourceGroup.json + * @summary get a list of layer 3 (L3) networks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/L3Networks_ListByResourceGroup.json */ async function listL3NetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.l3Networks.listByResourceGroup(resourceGroupName)) { + for await (const item of client.l3Networks.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListBySubscriptionSample.js similarity index 61% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksListBySubscriptionSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListBySubscriptionSample.js index acb251fceb52..c1d72b4d9711 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/l3NetworksListBySubscriptionSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListBySubscriptionSample.js @@ -3,23 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of layer 3 (L3) networks in the provided subscription. + * This sample demonstrates how to get a list of layer 3 (L3) networks in the provided subscription. * - * @summary Get a list of layer 3 (L3) networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_ListBySubscription.json + * @summary get a list of layer 3 (L3) networks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/L3Networks_ListBySubscription.json */ async function listL3NetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.l3Networks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksUpdateSample.js new file mode 100644 index 000000000000..93a39b248bc2 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update tags associated with the provided layer 3 (L3) network. + * + * @summary update tags associated with the provided layer 3 (L3) network. + * x-ms-original-file: 2026-05-01-preview/L3Networks_Patch.json + */ +async function patchL3Network() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l3Networks.update("resourceGroupName", "l3NetworkName", { + l3NetworkUpdateParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); + console.log(result); +} + +async function main() { + await patchL3Network(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsCreateOrUpdateSample.js new file mode 100644 index 000000000000..8681b8890475 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsCreateOrUpdateSample.js @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create new or update the existing metrics configuration of the provided cluster. + * + * @summary create new or update the existing metrics configuration of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Create.json + */ +async function createOrUpdateMetricsConfigurationOfCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.metricsConfigurations.createOrUpdate( + "resourceGroupName", + "clusterName", + "default", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + collectionInterval: 15, + enabledMetrics: ["metric1", "metric2"], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main() { + await createOrUpdateMetricsConfigurationOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsDeleteSample.js new file mode 100644 index 000000000000..ccfbea7958e6 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsDeleteSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the metrics configuration of the provided cluster. + * + * @summary delete the metrics configuration of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Delete.json + */ +async function deleteMetricsConfigurationOfCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.metricsConfigurations.delete( + "resourceGroupName", + "clusterName", + "default", + ); + console.log(result); +} + +async function main() { + await deleteMetricsConfigurationOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsGetSample.js new file mode 100644 index 000000000000..e63c0244f929 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsGetSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get metrics configuration of the provided cluster. + * + * @summary get metrics configuration of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Get.json + */ +async function getMetricsConfigurationOfCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.metricsConfigurations.get( + "resourceGroupName", + "clusterName", + "default", + ); + console.log(result); +} + +async function main() { + await getMetricsConfigurationOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsListByClusterSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsListByClusterSample.js similarity index 53% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsListByClusterSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsListByClusterSample.js index 2701149cfdeb..bbceca6c9842 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/metricsConfigurationsListByClusterSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsListByClusterSample.js @@ -3,28 +3,25 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of metrics configurations for the provided cluster. + * This sample demonstrates how to get a list of metrics configurations for the provided cluster. * - * @summary Get a list of metrics configurations for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_ListByCluster.json + * @summary get a list of metrics configurations for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_ListByCluster.json */ async function listMetricsConfigurationsOfTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.metricsConfigurations.listByCluster( - resourceGroupName, - clusterName, + "resourceGroupName", + "clusterName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsUpdateSample.js new file mode 100644 index 000000000000..2dea9f8b2374 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsUpdateSample.js @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. + * + * @summary patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Patch.json + */ +async function patchMetricsConfigurationOfCluster() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.metricsConfigurations.update( + "resourceGroupName", + "clusterName", + "default", + { + metricsConfigurationUpdateParameters: { + collectionInterval: 15, + enabledMetrics: ["metric1", "metric2"], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main() { + await patchMetricsConfigurationOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/operationsListSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/operationsListSample.js similarity index 52% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/operationsListSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/operationsListSample.js index 74ab0d081f2b..86988b47eeaf 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/operationsListSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/operationsListSample.js @@ -3,23 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of all available resource provider operations. It contains a URL link to get the next set of results. + * This sample demonstrates how to list the operations for the provider * - * @summary Get a list of all available resource provider operations. It contains a URL link to get the next set of results. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Operations_List.json + * @summary list the operations for the provider + * x-ms-original-file: 2026-05-01-preview/Operations_List.json */ async function listResourceProviderOperations() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.operations.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/package.json b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/package.json similarity index 76% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/package.json rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/package.json index 4ac4972f7161..bef445a6b277 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/package.json +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/package.json @@ -1,8 +1,8 @@ { - "name": "@azure-samples/arm-networkcloud-js", + "name": "@azure-samples/arm-networkcloud-js-beta", "private": true, "version": "1.0.0", - "description": " client library samples for JavaScript", + "description": "@azure/arm-networkcloud client library samples for JavaScript (Beta)", "engines": { "node": ">=20.0.0" }, @@ -14,10 +14,10 @@ "keywords": [ "node", "azure", + "cloud", "typescript", "browser", - "isomorphic", - "cloud" + "isomorphic" ], "author": "Microsoft Corporation", "license": "MIT", @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud", "dependencies": { - "@azure/arm-networkcloud": "latest", + "@azure/arm-networkcloud": "next", "dotenv": "latest", "@azure/identity": "^4.13.0" }, diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusGetSample.js new file mode 100644 index 000000000000..25eb5594f191 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the properties of the provided rack SKU. + * + * @summary get the properties of the provided rack SKU. + * x-ms-original-file: 2026-05-01-preview/RackSkus_Get.json + */ +async function getRackSKUResource() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.rackSkus.get("rackSkuName"); + console.log(result); +} + +async function main() { + await getRackSKUResource(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/rackSkusListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusListBySubscriptionSample.js similarity index 52% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/rackSkusListBySubscriptionSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusListBySubscriptionSample.js index 14e2889f9d25..d926f9b4e4a6 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/rackSkusListBySubscriptionSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusListBySubscriptionSample.js @@ -3,28 +3,27 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of rack SKUs in the provided subscription. + * This sample demonstrates how to get a list of rack SKUs in the provided subscription. * - * @summary Get a list of rack SKUs in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/RackSkus_ListBySubscription.json + * @summary get a list of rack SKUs in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/RackSkus_ListBySubscription.json */ -async function listRackSkUsForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; +async function listRackSKUsForSubscription() { const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.rackSkus.listBySubscription()) { resArray.push(item); } + console.log(resArray); } async function main() { - await listRackSkUsForSubscription(); + await listRackSKUsForSubscription(); } main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksCreateOrUpdateSample.js similarity index 65% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksCreateOrUpdateSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksCreateOrUpdateSample.js index a9f8dfd18422..1d46da2ee87f 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksCreateOrUpdateSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksCreateOrUpdateSample.js @@ -3,39 +3,30 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * This sample demonstrates how to create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. * - * @summary Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Create.json + * @summary create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/Racks_Create.json */ async function createOrUpdateRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const rackParameters = { - availabilityZone: "1", + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.racks.createOrUpdate("resourceGroupName", "rackName", { extendedLocation: { name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", type: "CustomLocation", }, location: "location", + availabilityZone: "1", rackLocation: "Rack 28", rackSerialNumber: "RACK_SERIAL_NUMBER", rackSkuId: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginCreateOrUpdateAndWait( - resourceGroupName, - rackName, - rackParameters, - ); + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksDeleteSample.js similarity index 51% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksDeleteSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksDeleteSample.js index 5d597f42c17a..57e4d0653eda 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksDeleteSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksDeleteSample.js @@ -3,22 +3,18 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * This sample demonstrates how to delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. * - * @summary Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Delete.json + * @summary delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/Racks_Delete.json */ async function deleteRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginDeleteAndWait(resourceGroupName, rackName); + const result = await client.racks.delete("resourceGroupName", "rackName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksGetSample.js new file mode 100644 index 000000000000..9ea83fdb3a3b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get properties of the provided rack. + * + * @summary get properties of the provided rack. + * x-ms-original-file: 2026-05-01-preview/Racks_Get.json + */ +async function getRack() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.racks.get("resourceGroupName", "rackName"); + console.log(result); +} + +async function main() { + await getRack(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListByResourceGroupSample.js new file mode 100644 index 000000000000..f581f160742d --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListByResourceGroupSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a list of racks in the provided resource group. + * + * @summary get a list of racks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/Racks_ListByResourceGroup.json + */ +async function listRacksForResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.racks.listByResourceGroup("resourceGroupName")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await listRacksForResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListBySubscriptionSample.js similarity index 60% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksListBySubscriptionSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListBySubscriptionSample.js index 0e0b6dbcbee0..ade1d7c8e99f 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/racksListBySubscriptionSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListBySubscriptionSample.js @@ -3,23 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of racks in the provided subscription. + * This sample demonstrates how to get a list of racks in the provided subscription. * - * @summary Get a list of racks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_ListBySubscription.json + * @summary get a list of racks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/Racks_ListBySubscription.json */ async function listRacksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.racks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksUpdateSample.js new file mode 100644 index 000000000000..cc5cde4760e6 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. + * + * @summary patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Racks_Patch.json + */ +async function patchRack() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.racks.update("resourceGroupName", "rackName", { + rackUpdateParameters: { + rackLocation: "Rack 2B", + rackSerialNumber: "RACK_SERIAL_NUMBER", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +async function main() { + await patchRack(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/sample.env b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/sample.env similarity index 100% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/sample.env rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/sample.env diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesCreateOrUpdateSample.js new file mode 100644 index 000000000000..7f531ab9a26f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesCreateOrUpdateSample.js @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * + * @summary create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Create.json + */ +async function createOrUpdateStorageAppliance() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.storageAppliances.createOrUpdate( + "resourceGroupName", + "storageApplianceName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + administratorCredentials: { password: "{password}", username: "adminUser" }, + rackId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", + rackSlot: 1, + serialNumber: "BM1219XXX", + storageApplianceSkuId: "684E-3B16-399E", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main() { + await createOrUpdateStorageAppliance(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDeleteSample.js similarity index 50% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesDeleteSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDeleteSample.js index f7188218179c..997c452c484f 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesDeleteSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDeleteSample.js @@ -3,25 +3,18 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * This sample demonstrates how to delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. * - * @summary Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Delete.json + * @summary delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Delete.json */ async function deleteStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginDeleteAndWait( - resourceGroupName, - storageApplianceName, - ); + const result = await client.storageAppliances.delete("resourceGroupName", "storageApplianceName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDisableRemoteVendorManagementSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDisableRemoteVendorManagementSample.js new file mode 100644 index 000000000000..186383151892 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDisableRemoteVendorManagementSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to disable remote vendor management of the provided storage appliance. + * + * @summary disable remote vendor management of the provided storage appliance. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_DisableRemoteVendorManagement.json + */ +async function turnOffRemoteVendorManagementForStorageAppliance() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.storageAppliances.disableRemoteVendorManagement( + "resourceGroupName", + "storageApplianceName", + ); + console.log(result); +} + +async function main() { + await turnOffRemoteVendorManagementForStorageAppliance(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesEnableRemoteVendorManagementSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesEnableRemoteVendorManagementSample.js new file mode 100644 index 000000000000..9ecdb8f7d76e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesEnableRemoteVendorManagementSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to enable remote vendor management of the provided storage appliance. + * + * @summary enable remote vendor management of the provided storage appliance. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_EnableRemoteVendorManagement.json + */ +async function turnOnRemoteVendorManagementForStorageAppliance() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.storageAppliances.enableRemoteVendorManagement( + "resourceGroupName", + "storageApplianceName", + { + storageApplianceEnableRemoteVendorManagementParameters: { supportEndpoints: ["10.0.0.0/24"] }, + }, + ); + console.log(result); +} + +async function main() { + await turnOnRemoteVendorManagementForStorageAppliance(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesGetSample.js new file mode 100644 index 000000000000..0cc5b140f1ba --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get properties of the provided storage appliance. + * + * @summary get properties of the provided storage appliance. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Get.json + */ +async function getStorageAppliance() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.storageAppliances.get("resourceGroupName", "storageApplianceName"); + console.log(result); +} + +async function main() { + await getStorageAppliance(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListByResourceGroupSample.js similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesListByResourceGroupSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListByResourceGroupSample.js index 1e453c18958d..80bf6300566c 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesListByResourceGroupSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListByResourceGroupSample.js @@ -3,24 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of storage appliances in the provided resource group. + * This sample demonstrates how to get a list of storage appliances in the provided resource group. * - * @summary Get a list of storage appliances in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_ListByResourceGroup.json + * @summary get a list of storage appliances in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_ListByResourceGroup.json */ async function listStorageAppliancesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.storageAppliances.listByResourceGroup(resourceGroupName)) { + for await (const item of client.storageAppliances.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListBySubscriptionSample.js similarity index 61% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesListBySubscriptionSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListBySubscriptionSample.js index 6a5b693388e8..c4e6903bc4dc 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/storageAppliancesListBySubscriptionSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListBySubscriptionSample.js @@ -3,23 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of storage appliances in the provided subscription. + * This sample demonstrates how to get a list of storage appliances in the provided subscription. * - * @summary Get a list of storage appliances in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_ListBySubscription.json + * @summary get a list of storage appliances in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_ListBySubscription.json */ async function listStorageAppliancesForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.storageAppliances.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesRunReadCommandsSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesRunReadCommandsSample.js new file mode 100644 index 000000000000..85bbcc262d36 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesRunReadCommandsSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to run one or more read-only commands on the provided storage appliance. + * + * @summary run one or more read-only commands on the provided storage appliance. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_RunReadCommands.json + */ +async function runAndRetrieveOutputFromReadOnlyCommandsOnStorageAppliance() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.storageAppliances.runReadCommands( + "resourceGroupName", + "storageApplianceName", + { + commands: [{ arguments: ["list", "--filter", "state='open'"], command: "purealert" }], + limitTimeSeconds: 60, + }, + ); + console.log(result); +} + +async function main() { + await runAndRetrieveOutputFromReadOnlyCommandsOnStorageAppliance(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesUpdateSample.js new file mode 100644 index 000000000000..e06d9081c461 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesUpdateSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. + * + * @summary update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Patch.json + */ +async function patchStorageAppliance() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.storageAppliances.update( + "resourceGroupName", + "storageApplianceName", + { + storageApplianceUpdateParameters: { + serialNumber: "BM1219XXX", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main() { + await patchStorageAppliance(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksCreateOrUpdateSample.js new file mode 100644 index 000000000000..9e04f1ecce7b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksCreateOrUpdateSample.js @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a new trunked network or update the properties of the existing trunked network. + * + * @summary create a new trunked network or update the properties of the existing trunked network. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Create.json + */ +async function createOrUpdateTrunkedNetwork() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.trunkedNetworks.createOrUpdate( + "resourceGroupName", + "trunkedNetworkName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + interfaceName: "eth0", + isolationDomainIds: [ + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", + ], + vlans: [12, 14], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main() { + await createOrUpdateTrunkedNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksDeleteSample.js new file mode 100644 index 000000000000..532ab3fa83e4 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksDeleteSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the provided trunked network. + * + * @summary delete the provided trunked network. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Delete.json + */ +async function deleteTrunkedNetwork() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.trunkedNetworks.delete("resourceGroupName", "trunkedNetworkName"); + console.log(result); +} + +async function main() { + await deleteTrunkedNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksGetSample.js new file mode 100644 index 000000000000..233f74b10efb --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get properties of the provided trunked network. + * + * @summary get properties of the provided trunked network. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Get.json + */ +async function getTrunkedNetwork() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.trunkedNetworks.get("resourceGroupName", "trunkedNetworkName"); + console.log(result); +} + +async function main() { + await getTrunkedNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListByResourceGroupSample.js similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksListByResourceGroupSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListByResourceGroupSample.js index c3da7155866b..9eb1f8618634 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksListByResourceGroupSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListByResourceGroupSample.js @@ -3,24 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of trunked networks in the provided resource group. + * This sample demonstrates how to get a list of trunked networks in the provided resource group. * - * @summary Get a list of trunked networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_ListByResourceGroup.json + * @summary get a list of trunked networks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_ListByResourceGroup.json */ async function listTrunkedNetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.trunkedNetworks.listByResourceGroup(resourceGroupName)) { + for await (const item of client.trunkedNetworks.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListBySubscriptionSample.js similarity index 61% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksListBySubscriptionSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListBySubscriptionSample.js index 155cea5aed71..6565acf11f24 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/trunkedNetworksListBySubscriptionSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListBySubscriptionSample.js @@ -3,23 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of trunked networks in the provided subscription. + * This sample demonstrates how to get a list of trunked networks in the provided subscription. * - * @summary Get a list of trunked networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_ListBySubscription.json + * @summary get a list of trunked networks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_ListBySubscription.json */ async function listTrunkedNetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.trunkedNetworks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksUpdateSample.js new file mode 100644 index 000000000000..5db1ced6df26 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update tags associated with the provided trunked network. + * + * @summary update tags associated with the provided trunked network. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Patch.json + */ +async function patchTrunkedNetwork() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.trunkedNetworks.update("resourceGroupName", "trunkedNetworkName", { + trunkedNetworkUpdateParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); + console.log(result); +} + +async function main() { + await patchTrunkedNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesAssignRelaySample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesAssignRelaySample.js new file mode 100644 index 000000000000..6870299a92ff --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesAssignRelaySample.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. + * + * @summary assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_AssignRelay.json + */ +async function assignRelayToTheMicrosoftHybridComputeMachineForAVirtualMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.assignRelay( + "resourceGroupName", + "virtualMachineName", + { + virtualMachineAssignRelayParameters: { + machineId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.HybridCompute/machines/machineName", + relayType: "Platform", + }, + }, + ); + console.log(result); +} + +async function main() { + await assignRelayToTheMicrosoftHybridComputeMachineForAVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesCreateOrUpdateSample.js new file mode 100644 index 000000000000..9ae25b55cc99 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesCreateOrUpdateSample.js @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a new virtual machine or update the properties of the existing virtual machine. + * + * @summary create a new virtual machine or update the properties of the existing virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Create.json + */ +async function createOrUpdateVirtualMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.createOrUpdate( + "resourceGroupName", + "virtualMachineName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + }, + }, + location: "location", + adminUsername: "username", + bootMethod: "UEFI", + cloudServicesNetworkAttachment: { + attachedNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", + ipAllocationMethod: "Dynamic", + }, + cpuCores: 2, + memorySizeGB: 8, + networkAttachments: [ + { + attachedNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + defaultGateway: "True", + ipAllocationMethod: "Dynamic", + ipv4Address: "198.51.100.1", + ipv6Address: "2001:0db8:0000:0000:0000:0000:0000:0000", + networkAttachmentName: "netAttachName01", + }, + ], + networkDataContent: "bmV0d29ya0RhdGVTYW1wbGU=", + placementHints: [ + { + hintType: "Affinity", + resourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", + schedulingExecution: "Hard", + scope: "", + }, + ], + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + storageProfile: { + osDisk: { createOption: "Ephemeral", deleteOption: "Delete", diskSizeGB: 120 }, + volumeAttachments: [ + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName", + ], + }, + userDataContent: "dXNlckRhdGVTYW1wbGU=", + vmDeviceModel: "T2", + vmImage: "myacr.azurecr.io/foobar:latest", + vmImageRepositoryCredentials: { + password: "{password}", + registryUrl: "myacr.azurecr.io", + username: "myuser", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main() { + await createOrUpdateVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesDeleteSample.js new file mode 100644 index 000000000000..8f3c6c611659 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesDeleteSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the provided virtual machine. + * + * @summary delete the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Delete.json + */ +async function deleteVirtualMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.delete("resourceGroupName", "virtualMachineName"); + console.log(result); +} + +async function main() { + await deleteVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesGetSample.js new file mode 100644 index 000000000000..c1f6a8e04477 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get properties of the provided virtual machine. + * + * @summary get properties of the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Get.json + */ +async function getVirtualMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.get("resourceGroupName", "virtualMachineName"); + console.log(result); +} + +async function main() { + await getVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListByResourceGroupSample.js similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesListByResourceGroupSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListByResourceGroupSample.js index b56e01ba7303..712b52780107 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesListByResourceGroupSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListByResourceGroupSample.js @@ -3,24 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of virtual machines in the provided resource group. + * This sample demonstrates how to get a list of virtual machines in the provided resource group. * - * @summary Get a list of virtual machines in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_ListByResourceGroup.json + * @summary get a list of virtual machines in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_ListByResourceGroup.json */ async function listVirtualMachinesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualMachines.listByResourceGroup(resourceGroupName)) { + for await (const item of client.virtualMachines.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListBySubscriptionSample.js similarity index 61% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesListBySubscriptionSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListBySubscriptionSample.js index a1710053c094..0c01643d60e5 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/virtualMachinesListBySubscriptionSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListBySubscriptionSample.js @@ -3,23 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of virtual machines in the provided subscription. + * This sample demonstrates how to get a list of virtual machines in the provided subscription. * - * @summary Get a list of virtual machines in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_ListBySubscription.json + * @summary get a list of virtual machines in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_ListBySubscription.json */ async function listVirtualMachinesForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.virtualMachines.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesPowerOffSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesPowerOffSample.js new file mode 100644 index 000000000000..96fb56c5476a --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesPowerOffSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to power off the provided virtual machine. + * + * @summary power off the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_PowerOff.json + */ +async function powerOffVirtualMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.powerOff("resourceGroupName", "virtualMachineName", { + virtualMachinePowerOffParameters: { skipShutdown: "True" }, + }); + console.log(result); +} + +async function main() { + await powerOffVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesReimageSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesReimageSample.js new file mode 100644 index 000000000000..e149cfea3f2d --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesReimageSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to reimage the provided virtual machine. + * + * @summary reimage the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Reimage.json + */ +async function reimageVirtualMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.reimage("resourceGroupName", "virtualMachineName"); + console.log(result); +} + +async function main() { + await reimageVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesRestartSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesRestartSample.js new file mode 100644 index 000000000000..f5360e640f7a --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesRestartSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to restart the provided virtual machine. + * + * @summary restart the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Restart.json + */ +async function restartVirtualMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.restart("resourceGroupName", "virtualMachineName"); + console.log(result); +} + +async function main() { + await restartVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesStartSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesStartSample.js new file mode 100644 index 000000000000..690fa2db9e7f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesStartSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to start the provided virtual machine. + * + * @summary start the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Start.json + */ +async function startVirtualMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.start("resourceGroupName", "virtualMachineName"); + console.log(result); +} + +async function main() { + await startVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesUpdateSample.js new file mode 100644 index 000000000000..6ca9b296d343 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesUpdateSample.js @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to 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. + * + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Patch.json + */ +async function patchVirtualMachine() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.update("resourceGroupName", "virtualMachineName", { + virtualMachineUpdateParameters: { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + }, + }, + vmImageRepositoryCredentials: { + password: "{password}", + registryUrl: "myacr.azurecr.io", + username: "myuser", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +async function main() { + await patchVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesCreateOrUpdateSample.js similarity index 56% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesCreateOrUpdateSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesCreateOrUpdateSample.js index 258879775c36..31d13db06135 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesCreateOrUpdateSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesCreateOrUpdateSample.js @@ -3,20 +3,18 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Create a new volume or update the properties of the existing one. + * This sample demonstrates how to create a new volume or update the properties of the existing one. * - * @summary Create a new volume or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Create.json + * @summary create a new volume or update the properties of the existing one. + * x-ms-original-file: 2026-05-01-preview/Volumes_Create.json */ async function createOrUpdateVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const volumeParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.volumes.createOrUpdate("resourceGroupName", "volumeName", { extendedLocation: { name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", type: "CustomLocation", @@ -24,16 +22,9 @@ async function createOrUpdateVolume() { location: "location", sizeMiB: 1048576, storageApplianceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName", + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName", tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.beginCreateOrUpdateAndWait( - resourceGroupName, - volumeName, - volumeParameters, - ); + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesDeleteSample.js new file mode 100644 index 000000000000..2c857bda4d57 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesDeleteSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete the provided volume. + * + * @summary delete the provided volume. + * x-ms-original-file: 2026-05-01-preview/Volumes_Delete.json + */ +async function deleteVolume() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.volumes.delete("resourceGroupName", "volumeName"); + console.log(result); +} + +async function main() { + await deleteVolume(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesGetSample.js new file mode 100644 index 000000000000..3990d2da758b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get properties of the provided volume. + * + * @summary get properties of the provided volume. + * x-ms-original-file: 2026-05-01-preview/Volumes_Get.json + */ +async function getVolume() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.volumes.get("resourceGroupName", "volumeName"); + console.log(result); +} + +async function main() { + await getVolume(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListByResourceGroupSample.js new file mode 100644 index 000000000000..5965f6bd4983 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListByResourceGroupSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a list of volumes in the provided resource group. + * + * @summary get a list of volumes in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/Volumes_ListByResourceGroup.json + */ +async function listVolumesForResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.volumes.listByResourceGroup("resourceGroupName")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await listVolumesForResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListBySubscriptionSample.js similarity index 60% rename from sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesListBySubscriptionSample.js rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListBySubscriptionSample.js index 3f8b7e49e132..1d690a4a1889 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/javascript/volumesListBySubscriptionSample.js +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListBySubscriptionSample.js @@ -3,23 +3,22 @@ const { NetworkCloud } = require("@azure/arm-networkcloud"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); /** - * This sample demonstrates how to Get a list of volumes in the provided subscription. + * This sample demonstrates how to get a list of volumes in the provided subscription. * - * @summary Get a list of volumes in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_ListBySubscription.json + * @summary get a list of volumes in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/Volumes_ListBySubscription.json */ async function listVolumeForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.volumes.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesUpdateSample.js new file mode 100644 index 000000000000..6ebc347eda7a --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { NetworkCloud } = require("@azure/arm-networkcloud"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update tags associated with the provided volume. + * + * @summary update tags associated with the provided volume. + * x-ms-original-file: 2026-05-01-preview/Volumes_Patch.json + */ +async function patchVolume() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.volumes.update("resourceGroupName", "volumeName", { + volumeUpdateParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); + console.log(result); +} + +async function main() { + await patchVolume(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/README.md b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/README.md new file mode 100644 index 000000000000..256bbb418514 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/README.md @@ -0,0 +1,349 @@ +# @azure/arm-networkcloud client library samples for TypeScript (Beta) + +These sample programs show how to use the TypeScript client libraries for @azure/arm-networkcloud in some common scenarios. + +| **File Name** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [accessBridgesCreateOrUpdateSample.ts][accessbridgescreateorupdatesample] | create a new access bridge or update the properties of the existing access bridge. x-ms-original-file: 2026-05-01-preview/AccessBridges_CreateOrUpdate.json | +| [accessBridgesDeleteSample.ts][accessbridgesdeletesample] | delete the specified access bridge. x-ms-original-file: 2026-05-01-preview/AccessBridges_Delete.json | +| [accessBridgesGetSample.ts][accessbridgesgetsample] | get the properties of the provided access bridge. x-ms-original-file: 2026-05-01-preview/AccessBridges_Get.json | +| [accessBridgesListByResourceGroupSample.ts][accessbridgeslistbyresourcegroupsample] | get a list of access bridges in the provided resource group. x-ms-original-file: 2026-05-01-preview/AccessBridges_ListByResourceGroup.json | +| [accessBridgesListBySubscriptionSample.ts][accessbridgeslistbysubscriptionsample] | get a list of access bridges in the provided subscription. x-ms-original-file: 2026-05-01-preview/AccessBridges_ListBySubscription.json | +| [accessBridgesUpdateSample.ts][accessbridgesupdatesample] | update properties of the provided access bridge, or update tags associated with the access bridge. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/AccessBridges_Patch.json | +| [agentPoolsCreateOrUpdateSample.ts][agentpoolscreateorupdatesample] | create a new Kubernetes cluster agent pool or update the properties of the existing one. x-ms-original-file: 2026-05-01-preview/AgentPools_Create.json | +| [agentPoolsDeleteSample.ts][agentpoolsdeletesample] | delete the provided Kubernetes cluster agent pool. x-ms-original-file: 2026-05-01-preview/AgentPools_Delete.json | +| [agentPoolsGetSample.ts][agentpoolsgetsample] | get properties of the provided Kubernetes cluster agent pool. x-ms-original-file: 2026-05-01-preview/AgentPools_Get.json | +| [agentPoolsListByKubernetesClusterSample.ts][agentpoolslistbykubernetesclustersample] | get a list of agent pools for the provided Kubernetes cluster. x-ms-original-file: 2026-05-01-preview/AgentPools_ListByKubernetesCluster.json | +| [agentPoolsUpdateSample.ts][agentpoolsupdatesample] | 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. x-ms-original-file: 2026-05-01-preview/AgentPools_Patch.json | +| [bareMetalMachineKeySetsCreateOrUpdateSample.ts][baremetalmachinekeysetscreateorupdatesample] | create a new bare metal machine key set or update the existing one for the provided cluster. x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Create.json | +| [bareMetalMachineKeySetsDeleteSample.ts][baremetalmachinekeysetsdeletesample] | delete the bare metal machine key set of the provided cluster. x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Delete.json | +| [bareMetalMachineKeySetsGetSample.ts][baremetalmachinekeysetsgetsample] | get bare metal machine key set of the provided cluster. x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Get.json | +| [bareMetalMachineKeySetsListByClusterSample.ts][baremetalmachinekeysetslistbyclustersample] | get a list of bare metal machine key sets for the provided cluster. x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_ListByCluster.json | +| [bareMetalMachineKeySetsUpdateSample.ts][baremetalmachinekeysetsupdatesample] | 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. x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Patch.json | +| [bareMetalMachinesCordonSample.ts][baremetalmachinescordonsample] | cordon the provided bare metal machine's Kubernetes node. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Cordon.json | +| [bareMetalMachinesCreateOrUpdateSample.ts][baremetalmachinescreateorupdatesample] | create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Create.json | +| [bareMetalMachinesDeleteSample.ts][baremetalmachinesdeletesample] | delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Delete.json | +| [bareMetalMachinesGetSample.ts][baremetalmachinesgetsample] | get properties of the provided bare metal machine. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Get.json | +| [bareMetalMachinesListByResourceGroupSample.ts][baremetalmachineslistbyresourcegroupsample] | get a list of bare metal machines in the provided resource group. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_ListByResourceGroup.json | +| [bareMetalMachinesListBySubscriptionSample.ts][baremetalmachineslistbysubscriptionsample] | get a list of bare metal machines in the provided subscription. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_ListBySubscription.json | +| [bareMetalMachinesPowerOffSample.ts][baremetalmachinespoweroffsample] | power off the provided bare metal machine. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_PowerOff.json | +| [bareMetalMachinesReimageSample.ts][baremetalmachinesreimagesample] | reimage the provided bare metal machine. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Reimage.json | +| [bareMetalMachinesReplaceSample.ts][baremetalmachinesreplacesample] | replace the provided bare metal machine. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Replace.json | +| [bareMetalMachinesRestartSample.ts][baremetalmachinesrestartsample] | restart the provided bare metal machine. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Restart.json | +| [bareMetalMachinesRunCommandSample.ts][baremetalmachinesruncommandsample] | run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunCommand.json | +| [bareMetalMachinesRunDataExtractsRestrictedSample.ts][baremetalmachinesrundataextractsrestrictedsample] | run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunDataExtractsRestricted.json | +| [bareMetalMachinesRunDataExtractsSample.ts][baremetalmachinesrundataextractssample] | run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunDataExtracts.json | +| [bareMetalMachinesRunReadCommandsSample.ts][baremetalmachinesrunreadcommandssample] | run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunReadCommands_Hostname.json | +| [bareMetalMachinesStartSample.ts][baremetalmachinesstartsample] | start the provided bare metal machine. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Start.json | +| [bareMetalMachinesUncordonSample.ts][baremetalmachinesuncordonsample] | uncordon the provided bare metal machine's Kubernetes node. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Uncordon.json | +| [bareMetalMachinesUpdateSample.ts][baremetalmachinesupdatesample] | patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Patch.json | +| [bmcKeySetsCreateOrUpdateSample.ts][bmckeysetscreateorupdatesample] | create a new baseboard management controller key set or update the existing one for the provided cluster. x-ms-original-file: 2026-05-01-preview/BmcKeySets_Create.json | +| [bmcKeySetsDeleteSample.ts][bmckeysetsdeletesample] | delete the baseboard management controller key set of the provided cluster. x-ms-original-file: 2026-05-01-preview/BmcKeySets_Delete.json | +| [bmcKeySetsGetSample.ts][bmckeysetsgetsample] | get baseboard management controller key set of the provided cluster. x-ms-original-file: 2026-05-01-preview/BmcKeySets_Get.json | +| [bmcKeySetsListByClusterSample.ts][bmckeysetslistbyclustersample] | get a list of baseboard management controller key sets for the provided cluster. x-ms-original-file: 2026-05-01-preview/BmcKeySets_ListByCluster.json | +| [bmcKeySetsUpdateSample.ts][bmckeysetsupdatesample] | 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. x-ms-original-file: 2026-05-01-preview/BmcKeySets_Patch.json | +| [cloudServicesNetworksCreateOrUpdateSample.ts][cloudservicesnetworkscreateorupdatesample] | create a new cloud services network or update the properties of the existing cloud services network. x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Create.json | +| [cloudServicesNetworksDeleteSample.ts][cloudservicesnetworksdeletesample] | delete the provided cloud services network. x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Delete.json | +| [cloudServicesNetworksGetSample.ts][cloudservicesnetworksgetsample] | get properties of the provided cloud services network. x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Get.json | +| [cloudServicesNetworksListByResourceGroupSample.ts][cloudservicesnetworkslistbyresourcegroupsample] | get a list of cloud services networks in the provided resource group. x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_ListByResourceGroup.json | +| [cloudServicesNetworksListBySubscriptionSample.ts][cloudservicesnetworkslistbysubscriptionsample] | get a list of cloud services networks in the provided subscription. x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_ListBySubscription.json | +| [cloudServicesNetworksUpdateSample.ts][cloudservicesnetworksupdatesample] | update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Patch.json | +| [clusterManagersCreateOrUpdateSample.ts][clustermanagerscreateorupdatesample] | create a new cluster manager or update properties of the cluster manager if it exists. x-ms-original-file: 2026-05-01-preview/ClusterManagers_Create.json | +| [clusterManagersDeleteSample.ts][clustermanagersdeletesample] | delete the provided cluster manager. x-ms-original-file: 2026-05-01-preview/ClusterManagers_Delete.json | +| [clusterManagersGetSample.ts][clustermanagersgetsample] | get the properties of the provided cluster manager. x-ms-original-file: 2026-05-01-preview/ClusterManagers_Get.json | +| [clusterManagersListByResourceGroupSample.ts][clustermanagerslistbyresourcegroupsample] | get a list of cluster managers in the provided resource group. x-ms-original-file: 2026-05-01-preview/ClusterManagers_ListByResourceGroup.json | +| [clusterManagersListBySubscriptionSample.ts][clustermanagerslistbysubscriptionsample] | get a list of cluster managers in the provided subscription. x-ms-original-file: 2026-05-01-preview/ClusterManagers_ListBySubscription.json | +| [clusterManagersUpdateRelayPrivateEndpointConnectionSample.ts][clustermanagersupdaterelayprivateendpointconnectionsample] | update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. x-ms-original-file: 2026-05-01-preview/ClusterManagers_UpdateRelayPrivateEndpointConnection_Approve.json | +| [clusterManagersUpdateSample.ts][clustermanagersupdatesample] | patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/ClusterManagers_Patch.json | +| [clustersContinueUpdateVersionSample.ts][clusterscontinueupdateversionsample] | trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. x-ms-original-file: 2026-05-01-preview/Clusters_ContinueUpdateVersion.json | +| [clustersCreateOrUpdateSample.ts][clusterscreateorupdatesample] | create a new cluster or update the properties of the cluster if it exists. x-ms-original-file: 2026-05-01-preview/Clusters_Create.json | +| [clustersDeleteSample.ts][clustersdeletesample] | delete the provided cluster. x-ms-original-file: 2026-05-01-preview/Clusters_Delete.json | +| [clustersDeploySample.ts][clustersdeploysample] | deploy the cluster using the rack configuration provided during creation. x-ms-original-file: 2026-05-01-preview/Clusters_Deploy.json | +| [clustersGetSample.ts][clustersgetsample] | get properties of the provided cluster. x-ms-original-file: 2026-05-01-preview/Clusters_Get.json | +| [clustersInspectSample.ts][clustersinspectsample] | trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied additional actions and filters. x-ms-original-file: 2026-05-01-preview/Clusters_Inspect.json | +| [clustersListByResourceGroupSample.ts][clusterslistbyresourcegroupsample] | get a list of clusters in the provided resource group. x-ms-original-file: 2026-05-01-preview/Clusters_ListByResourceGroup.json | +| [clustersListBySubscriptionSample.ts][clusterslistbysubscriptionsample] | get a list of clusters in the provided subscription. x-ms-original-file: 2026-05-01-preview/Clusters_ListBySubscription.json | +| [clustersRotateCredentialSample.ts][clustersrotatecredentialsample] | rotate the specified cluster credential. x-ms-original-file: 2026-05-01-preview/Clusters_RotateCredential.json | +| [clustersScanRuntimeSample.ts][clustersscanruntimesample] | triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. x-ms-original-file: 2026-05-01-preview/Clusters_ScanRuntime.json | +| [clustersUpdateSample.ts][clustersupdatesample] | patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/Clusters_Patch_AggregatorOrSingleRackDefinition.json | +| [clustersUpdateVersionSample.ts][clustersupdateversionsample] | update the version of the provided cluster to one of the available supported versions. x-ms-original-file: 2026-05-01-preview/Clusters_UpdateVersion.json | +| [consolesCreateOrUpdateSample.ts][consolescreateorupdatesample] | create a new virtual machine console or update the properties of the existing virtual machine console. x-ms-original-file: 2026-05-01-preview/Consoles_Create.json | +| [consolesDeleteSample.ts][consolesdeletesample] | delete the provided virtual machine console. x-ms-original-file: 2026-05-01-preview/Consoles_Delete.json | +| [consolesGetSample.ts][consolesgetsample] | get properties of the provided virtual machine console. x-ms-original-file: 2026-05-01-preview/Consoles_Get.json | +| [consolesListByVirtualMachineSample.ts][consoleslistbyvirtualmachinesample] | get a list of consoles for the provided virtual machine. x-ms-original-file: 2026-05-01-preview/Consoles_ListByVirtualMachine.json | +| [consolesUpdateSample.ts][consolesupdatesample] | 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. x-ms-original-file: 2026-05-01-preview/Consoles_Patch.json | +| [kubernetesClusterFeaturesCreateOrUpdateSample.ts][kubernetesclusterfeaturescreateorupdatesample] | create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Create.json | +| [kubernetesClusterFeaturesDeleteSample.ts][kubernetesclusterfeaturesdeletesample] | delete the provided Kubernetes cluster feature. x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Delete.json | +| [kubernetesClusterFeaturesGetSample.ts][kubernetesclusterfeaturesgetsample] | get properties of the provided the Kubernetes cluster feature. x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Get.json | +| [kubernetesClusterFeaturesListByKubernetesClusterSample.ts][kubernetesclusterfeatureslistbykubernetesclustersample] | get a list of features for the provided Kubernetes cluster. x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_ListByKubernetesCluster.json | +| [kubernetesClusterFeaturesUpdateSample.ts][kubernetesclusterfeaturesupdatesample] | patch properties of the provided Kubernetes cluster feature. x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Patch.json | +| [kubernetesClustersCreateOrUpdateSample.ts][kubernetesclusterscreateorupdatesample] | create a new Kubernetes cluster or update the properties of the existing one. x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Create.json | +| [kubernetesClustersDeleteSample.ts][kubernetesclustersdeletesample] | delete the provided Kubernetes cluster. x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Delete.json | +| [kubernetesClustersGetSample.ts][kubernetesclustersgetsample] | get properties of the provided the Kubernetes cluster. x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Get.json | +| [kubernetesClustersListByResourceGroupSample.ts][kubernetesclusterslistbyresourcegroupsample] | get a list of Kubernetes clusters in the provided resource group. x-ms-original-file: 2026-05-01-preview/KubernetesClusters_ListByResourceGroup.json | +| [kubernetesClustersListBySubscriptionSample.ts][kubernetesclusterslistbysubscriptionsample] | get a list of Kubernetes clusters in the provided subscription. x-ms-original-file: 2026-05-01-preview/KubernetesClusters_ListBySubscription.json | +| [kubernetesClustersRestartNodeSample.ts][kubernetesclustersrestartnodesample] | restart a targeted node of a Kubernetes cluster. x-ms-original-file: 2026-05-01-preview/KubernetesClusters_RestartNode.json | +| [kubernetesClustersUpdateSample.ts][kubernetesclustersupdatesample] | patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Patch.json | +| [kubernetesVersionsCreateOrUpdateSample.ts][kubernetesversionscreateorupdatesample] | create the Kubernetes version resource or update its tags. This resource is system managed and should only be created with the name "default". x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Create.json | +| [kubernetesVersionsDeleteSample.ts][kubernetesversionsdeletesample] | delete the specified Kubernetes version resource. x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Delete.json | +| [kubernetesVersionsGetSample.ts][kubernetesversionsgetsample] | retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Get.json | +| [kubernetesVersionsListByResourceGroupSample.ts][kubernetesversionslistbyresourcegroupsample] | get a list of Kubernetes version resources in the provided resource group. x-ms-original-file: 2026-05-01-preview/KubernetesVersions_ListByResourceGroup.json | +| [kubernetesVersionsListBySubscriptionSample.ts][kubernetesversionslistbysubscriptionsample] | get a list of Kubernetes version resources in the provided subscription. x-ms-original-file: 2026-05-01-preview/KubernetesVersions_ListBySubscription.json | +| [kubernetesVersionsUpdateSample.ts][kubernetesversionsupdatesample] | update tags associated with the Kubernetes version resource. No other properties are supported for update. x-ms-original-file: 2026-05-01-preview/KubernetesVersions_UpdateTags.json | +| [l2NetworksCreateOrUpdateSample.ts][l2networkscreateorupdatesample] | create a new layer 2 (L2) network or update the properties of the existing network. x-ms-original-file: 2026-05-01-preview/L2Networks_Create.json | +| [l2NetworksDeleteSample.ts][l2networksdeletesample] | delete the provided layer 2 (L2) network. x-ms-original-file: 2026-05-01-preview/L2Networks_Delete.json | +| [l2NetworksGetSample.ts][l2networksgetsample] | get properties of the provided layer 2 (L2) network. x-ms-original-file: 2026-05-01-preview/L2Networks_Get.json | +| [l2NetworksListByResourceGroupSample.ts][l2networkslistbyresourcegroupsample] | get a list of layer 2 (L2) networks in the provided resource group. x-ms-original-file: 2026-05-01-preview/L2Networks_ListByResourceGroup.json | +| [l2NetworksListBySubscriptionSample.ts][l2networkslistbysubscriptionsample] | get a list of layer 2 (L2) networks in the provided subscription. x-ms-original-file: 2026-05-01-preview/L2Networks_ListBySubscription.json | +| [l2NetworksUpdateSample.ts][l2networksupdatesample] | update tags associated with the provided layer 2 (L2) network. x-ms-original-file: 2026-05-01-preview/L2Networks_Patch.json | +| [l3NetworksCreateOrUpdateSample.ts][l3networkscreateorupdatesample] | create a new layer 3 (L3) network or update the properties of the existing network. x-ms-original-file: 2026-05-01-preview/L3Networks_Create.json | +| [l3NetworksDeleteSample.ts][l3networksdeletesample] | delete the provided layer 3 (L3) network. x-ms-original-file: 2026-05-01-preview/L3Networks_Delete.json | +| [l3NetworksGetSample.ts][l3networksgetsample] | get properties of the provided layer 3 (L3) network. x-ms-original-file: 2026-05-01-preview/L3Networks_Get.json | +| [l3NetworksListByResourceGroupSample.ts][l3networkslistbyresourcegroupsample] | get a list of layer 3 (L3) networks in the provided resource group. x-ms-original-file: 2026-05-01-preview/L3Networks_ListByResourceGroup.json | +| [l3NetworksListBySubscriptionSample.ts][l3networkslistbysubscriptionsample] | get a list of layer 3 (L3) networks in the provided subscription. x-ms-original-file: 2026-05-01-preview/L3Networks_ListBySubscription.json | +| [l3NetworksUpdateSample.ts][l3networksupdatesample] | update tags associated with the provided layer 3 (L3) network. x-ms-original-file: 2026-05-01-preview/L3Networks_Patch.json | +| [metricsConfigurationsCreateOrUpdateSample.ts][metricsconfigurationscreateorupdatesample] | create new or update the existing metrics configuration of the provided cluster. x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Create.json | +| [metricsConfigurationsDeleteSample.ts][metricsconfigurationsdeletesample] | delete the metrics configuration of the provided cluster. x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Delete.json | +| [metricsConfigurationsGetSample.ts][metricsconfigurationsgetsample] | get metrics configuration of the provided cluster. x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Get.json | +| [metricsConfigurationsListByClusterSample.ts][metricsconfigurationslistbyclustersample] | get a list of metrics configurations for the provided cluster. x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_ListByCluster.json | +| [metricsConfigurationsUpdateSample.ts][metricsconfigurationsupdatesample] | patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Patch.json | +| [operationsListSample.ts][operationslistsample] | list the operations for the provider x-ms-original-file: 2026-05-01-preview/Operations_List.json | +| [rackSkusGetSample.ts][rackskusgetsample] | get the properties of the provided rack SKU. x-ms-original-file: 2026-05-01-preview/RackSkus_Get.json | +| [rackSkusListBySubscriptionSample.ts][rackskuslistbysubscriptionsample] | get a list of rack SKUs in the provided subscription. x-ms-original-file: 2026-05-01-preview/RackSkus_ListBySubscription.json | +| [racksCreateOrUpdateSample.ts][rackscreateorupdatesample] | create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: 2026-05-01-preview/Racks_Create.json | +| [racksDeleteSample.ts][racksdeletesample] | delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: 2026-05-01-preview/Racks_Delete.json | +| [racksGetSample.ts][racksgetsample] | get properties of the provided rack. x-ms-original-file: 2026-05-01-preview/Racks_Get.json | +| [racksListByResourceGroupSample.ts][rackslistbyresourcegroupsample] | get a list of racks in the provided resource group. x-ms-original-file: 2026-05-01-preview/Racks_ListByResourceGroup.json | +| [racksListBySubscriptionSample.ts][rackslistbysubscriptionsample] | get a list of racks in the provided subscription. x-ms-original-file: 2026-05-01-preview/Racks_ListBySubscription.json | +| [racksUpdateSample.ts][racksupdatesample] | patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/Racks_Patch.json | +| [storageAppliancesCreateOrUpdateSample.ts][storageappliancescreateorupdatesample] | create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: 2026-05-01-preview/StorageAppliances_Create.json | +| [storageAppliancesDeleteSample.ts][storageappliancesdeletesample] | delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: 2026-05-01-preview/StorageAppliances_Delete.json | +| [storageAppliancesDisableRemoteVendorManagementSample.ts][storageappliancesdisableremotevendormanagementsample] | disable remote vendor management of the provided storage appliance. x-ms-original-file: 2026-05-01-preview/StorageAppliances_DisableRemoteVendorManagement.json | +| [storageAppliancesEnableRemoteVendorManagementSample.ts][storageappliancesenableremotevendormanagementsample] | enable remote vendor management of the provided storage appliance. x-ms-original-file: 2026-05-01-preview/StorageAppliances_EnableRemoteVendorManagement.json | +| [storageAppliancesGetSample.ts][storageappliancesgetsample] | get properties of the provided storage appliance. x-ms-original-file: 2026-05-01-preview/StorageAppliances_Get.json | +| [storageAppliancesListByResourceGroupSample.ts][storageapplianceslistbyresourcegroupsample] | get a list of storage appliances in the provided resource group. x-ms-original-file: 2026-05-01-preview/StorageAppliances_ListByResourceGroup.json | +| [storageAppliancesListBySubscriptionSample.ts][storageapplianceslistbysubscriptionsample] | get a list of storage appliances in the provided subscription. x-ms-original-file: 2026-05-01-preview/StorageAppliances_ListBySubscription.json | +| [storageAppliancesRunReadCommandsSample.ts][storageappliancesrunreadcommandssample] | run one or more read-only commands on the provided storage appliance. x-ms-original-file: 2026-05-01-preview/StorageAppliances_RunReadCommands.json | +| [storageAppliancesUpdateSample.ts][storageappliancesupdatesample] | update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. x-ms-original-file: 2026-05-01-preview/StorageAppliances_Patch.json | +| [trunkedNetworksCreateOrUpdateSample.ts][trunkednetworkscreateorupdatesample] | create a new trunked network or update the properties of the existing trunked network. x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Create.json | +| [trunkedNetworksDeleteSample.ts][trunkednetworksdeletesample] | delete the provided trunked network. x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Delete.json | +| [trunkedNetworksGetSample.ts][trunkednetworksgetsample] | get properties of the provided trunked network. x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Get.json | +| [trunkedNetworksListByResourceGroupSample.ts][trunkednetworkslistbyresourcegroupsample] | get a list of trunked networks in the provided resource group. x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_ListByResourceGroup.json | +| [trunkedNetworksListBySubscriptionSample.ts][trunkednetworkslistbysubscriptionsample] | get a list of trunked networks in the provided subscription. x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_ListBySubscription.json | +| [trunkedNetworksUpdateSample.ts][trunkednetworksupdatesample] | update tags associated with the provided trunked network. x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Patch.json | +| [virtualMachinesAssignRelaySample.ts][virtualmachinesassignrelaysample] | assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_AssignRelay.json | +| [virtualMachinesCreateOrUpdateSample.ts][virtualmachinescreateorupdatesample] | create a new virtual machine or update the properties of the existing virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_Create.json | +| [virtualMachinesDeleteSample.ts][virtualmachinesdeletesample] | delete the provided virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_Delete.json | +| [virtualMachinesGetSample.ts][virtualmachinesgetsample] | get properties of the provided virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_Get.json | +| [virtualMachinesListByResourceGroupSample.ts][virtualmachineslistbyresourcegroupsample] | get a list of virtual machines in the provided resource group. x-ms-original-file: 2026-05-01-preview/VirtualMachines_ListByResourceGroup.json | +| [virtualMachinesListBySubscriptionSample.ts][virtualmachineslistbysubscriptionsample] | get a list of virtual machines in the provided subscription. x-ms-original-file: 2026-05-01-preview/VirtualMachines_ListBySubscription.json | +| [virtualMachinesPowerOffSample.ts][virtualmachinespoweroffsample] | power off the provided virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_PowerOff.json | +| [virtualMachinesReimageSample.ts][virtualmachinesreimagesample] | reimage the provided virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_Reimage.json | +| [virtualMachinesRestartSample.ts][virtualmachinesrestartsample] | restart the provided virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_Restart.json | +| [virtualMachinesStartSample.ts][virtualmachinesstartsample] | start the provided virtual machine. x-ms-original-file: 2026-05-01-preview/VirtualMachines_Start.json | +| [virtualMachinesUpdateSample.ts][virtualmachinesupdatesample] | 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. x-ms-original-file: 2026-05-01-preview/VirtualMachines_Patch.json | +| [volumesCreateOrUpdateSample.ts][volumescreateorupdatesample] | create a new volume or update the properties of the existing one. x-ms-original-file: 2026-05-01-preview/Volumes_Create.json | +| [volumesDeleteSample.ts][volumesdeletesample] | delete the provided volume. x-ms-original-file: 2026-05-01-preview/Volumes_Delete.json | +| [volumesGetSample.ts][volumesgetsample] | get properties of the provided volume. x-ms-original-file: 2026-05-01-preview/Volumes_Get.json | +| [volumesListByResourceGroupSample.ts][volumeslistbyresourcegroupsample] | get a list of volumes in the provided resource group. x-ms-original-file: 2026-05-01-preview/Volumes_ListByResourceGroup.json | +| [volumesListBySubscriptionSample.ts][volumeslistbysubscriptionsample] | get a list of volumes in the provided subscription. x-ms-original-file: 2026-05-01-preview/Volumes_ListBySubscription.json | +| [volumesUpdateSample.ts][volumesupdatesample] | update tags associated with the provided volume. x-ms-original-file: 2026-05-01-preview/Volumes_Patch.json | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: + +```bash +npm install -g typescript +``` + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Compile the samples: + +```bash +npm run build +``` + +3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +4. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node dist/accessBridgesCreateOrUpdateSample.js +``` + +Alternatively, run a single sample with the required environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +node dist/accessBridgesCreateOrUpdateSample.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[accessbridgescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesCreateOrUpdateSample.ts +[accessbridgesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesDeleteSample.ts +[accessbridgesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesGetSample.ts +[accessbridgeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesListByResourceGroupSample.ts +[accessbridgeslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesListBySubscriptionSample.ts +[accessbridgesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesUpdateSample.ts +[agentpoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsCreateOrUpdateSample.ts +[agentpoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsDeleteSample.ts +[agentpoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsGetSample.ts +[agentpoolslistbykubernetesclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsListByKubernetesClusterSample.ts +[agentpoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsUpdateSample.ts +[baremetalmachinekeysetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsCreateOrUpdateSample.ts +[baremetalmachinekeysetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsDeleteSample.ts +[baremetalmachinekeysetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsGetSample.ts +[baremetalmachinekeysetslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsListByClusterSample.ts +[baremetalmachinekeysetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsUpdateSample.ts +[baremetalmachinescordonsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCordonSample.ts +[baremetalmachinescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCreateOrUpdateSample.ts +[baremetalmachinesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesDeleteSample.ts +[baremetalmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesGetSample.ts +[baremetalmachineslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListByResourceGroupSample.ts +[baremetalmachineslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListBySubscriptionSample.ts +[baremetalmachinespoweroffsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesPowerOffSample.ts +[baremetalmachinesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReimageSample.ts +[baremetalmachinesreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReplaceSample.ts +[baremetalmachinesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRestartSample.ts +[baremetalmachinesruncommandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunCommandSample.ts +[baremetalmachinesrundataextractsrestrictedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunDataExtractsRestrictedSample.ts +[baremetalmachinesrundataextractssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunDataExtractsSample.ts +[baremetalmachinesrunreadcommandssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunReadCommandsSample.ts +[baremetalmachinesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesStartSample.ts +[baremetalmachinesuncordonsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUncordonSample.ts +[baremetalmachinesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUpdateSample.ts +[bmckeysetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsCreateOrUpdateSample.ts +[bmckeysetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsDeleteSample.ts +[bmckeysetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsGetSample.ts +[bmckeysetslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsListByClusterSample.ts +[bmckeysetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsUpdateSample.ts +[cloudservicesnetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksCreateOrUpdateSample.ts +[cloudservicesnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksDeleteSample.ts +[cloudservicesnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksGetSample.ts +[cloudservicesnetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListByResourceGroupSample.ts +[cloudservicesnetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListBySubscriptionSample.ts +[cloudservicesnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksUpdateSample.ts +[clustermanagerscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersCreateOrUpdateSample.ts +[clustermanagersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersDeleteSample.ts +[clustermanagersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersGetSample.ts +[clustermanagerslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListByResourceGroupSample.ts +[clustermanagerslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListBySubscriptionSample.ts +[clustermanagersupdaterelayprivateendpointconnectionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersUpdateRelayPrivateEndpointConnectionSample.ts +[clustermanagersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersUpdateSample.ts +[clusterscontinueupdateversionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersContinueUpdateVersionSample.ts +[clusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersCreateOrUpdateSample.ts +[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeleteSample.ts +[clustersdeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeploySample.ts +[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersGetSample.ts +[clustersinspectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersInspectSample.ts +[clusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListByResourceGroupSample.ts +[clusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListBySubscriptionSample.ts +[clustersrotatecredentialsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersRotateCredentialSample.ts +[clustersscanruntimesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersScanRuntimeSample.ts +[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateSample.ts +[clustersupdateversionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateVersionSample.ts +[consolescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesCreateOrUpdateSample.ts +[consolesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesDeleteSample.ts +[consolesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesGetSample.ts +[consoleslistbyvirtualmachinesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesListByVirtualMachineSample.ts +[consolesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesUpdateSample.ts +[kubernetesclusterfeaturescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesCreateOrUpdateSample.ts +[kubernetesclusterfeaturesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesDeleteSample.ts +[kubernetesclusterfeaturesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesGetSample.ts +[kubernetesclusterfeatureslistbykubernetesclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesListByKubernetesClusterSample.ts +[kubernetesclusterfeaturesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesUpdateSample.ts +[kubernetesclusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersCreateOrUpdateSample.ts +[kubernetesclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersDeleteSample.ts +[kubernetesclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersGetSample.ts +[kubernetesclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListByResourceGroupSample.ts +[kubernetesclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListBySubscriptionSample.ts +[kubernetesclustersrestartnodesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersRestartNodeSample.ts +[kubernetesclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersUpdateSample.ts +[kubernetesversionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsCreateOrUpdateSample.ts +[kubernetesversionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsDeleteSample.ts +[kubernetesversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsGetSample.ts +[kubernetesversionslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsListByResourceGroupSample.ts +[kubernetesversionslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsListBySubscriptionSample.ts +[kubernetesversionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsUpdateSample.ts +[l2networkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksCreateOrUpdateSample.ts +[l2networksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksDeleteSample.ts +[l2networksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksGetSample.ts +[l2networkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListByResourceGroupSample.ts +[l2networkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListBySubscriptionSample.ts +[l2networksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksUpdateSample.ts +[l3networkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksCreateOrUpdateSample.ts +[l3networksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksDeleteSample.ts +[l3networksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksGetSample.ts +[l3networkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListByResourceGroupSample.ts +[l3networkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListBySubscriptionSample.ts +[l3networksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksUpdateSample.ts +[metricsconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsCreateOrUpdateSample.ts +[metricsconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsDeleteSample.ts +[metricsconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsGetSample.ts +[metricsconfigurationslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsListByClusterSample.ts +[metricsconfigurationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsUpdateSample.ts +[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/operationsListSample.ts +[rackskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusGetSample.ts +[rackskuslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusListBySubscriptionSample.ts +[rackscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksCreateOrUpdateSample.ts +[racksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksDeleteSample.ts +[racksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksGetSample.ts +[rackslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListByResourceGroupSample.ts +[rackslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListBySubscriptionSample.ts +[racksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksUpdateSample.ts +[storageappliancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesCreateOrUpdateSample.ts +[storageappliancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDeleteSample.ts +[storageappliancesdisableremotevendormanagementsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDisableRemoteVendorManagementSample.ts +[storageappliancesenableremotevendormanagementsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesEnableRemoteVendorManagementSample.ts +[storageappliancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesGetSample.ts +[storageapplianceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListByResourceGroupSample.ts +[storageapplianceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListBySubscriptionSample.ts +[storageappliancesrunreadcommandssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesRunReadCommandsSample.ts +[storageappliancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesUpdateSample.ts +[trunkednetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksCreateOrUpdateSample.ts +[trunkednetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksDeleteSample.ts +[trunkednetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksGetSample.ts +[trunkednetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListByResourceGroupSample.ts +[trunkednetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListBySubscriptionSample.ts +[trunkednetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksUpdateSample.ts +[virtualmachinesassignrelaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesAssignRelaySample.ts +[virtualmachinescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesCreateOrUpdateSample.ts +[virtualmachinesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesDeleteSample.ts +[virtualmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesGetSample.ts +[virtualmachineslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListByResourceGroupSample.ts +[virtualmachineslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListBySubscriptionSample.ts +[virtualmachinespoweroffsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesPowerOffSample.ts +[virtualmachinesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesReimageSample.ts +[virtualmachinesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesRestartSample.ts +[virtualmachinesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesStartSample.ts +[virtualmachinesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesUpdateSample.ts +[volumescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesCreateOrUpdateSample.ts +[volumesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesDeleteSample.ts +[volumesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesGetSample.ts +[volumeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListByResourceGroupSample.ts +[volumeslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListBySubscriptionSample.ts +[volumesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesUpdateSample.ts +[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-networkcloud?view=azure-node-preview +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud/README.md +[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/package.json b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/package.json similarity index 77% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/package.json rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/package.json index 9322a6f31a62..c8b2d98acb02 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/package.json +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/package.json @@ -1,8 +1,8 @@ { - "name": "@azure-samples/arm-networkcloud-ts", + "name": "@azure-samples/arm-networkcloud-ts-beta", "private": true, "version": "1.0.0", - "description": " client library samples for TypeScript", + "description": "@azure/arm-networkcloud client library samples for TypeScript (Beta)", "engines": { "node": ">=20.0.0" }, @@ -18,10 +18,10 @@ "keywords": [ "node", "azure", + "cloud", "typescript", "browser", - "isomorphic", - "cloud" + "isomorphic" ], "author": "Microsoft Corporation", "license": "MIT", @@ -30,7 +30,7 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud", "dependencies": { - "@azure/arm-networkcloud": "latest", + "@azure/arm-networkcloud": "next", "dotenv": "latest", "@azure/identity": "^4.13.0" }, @@ -38,6 +38,6 @@ "@types/node": "^20.0.0", "cross-env": "latest", "rimraf": "latest", - "typescript": "~5.9.3" + "typescript": "~6.0.2" } } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/sample.env b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/sample.env similarity index 100% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/sample.env rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/sample.env diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..9ddbfb295035 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesCreateOrUpdateSample.ts @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a new access bridge or update the properties of the existing access bridge. + * + * @summary create a new access bridge or update the properties of the existing access bridge. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_CreateOrUpdate.json + */ +async function createOrUpdateAccessBridge(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.accessBridges.createOrUpdate("resourceGroupName", "Bastion", { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + ipv4ConnectedPrefix: "198.51.100.0/24", + ipv6ConnectedPrefix: "2001:db8::/64", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName/internalNetworks/internalNetworkName", + securityRules: [ + { + description: "Allow management plane egress", + direction: "Outbound", + ipv4Addresses: ["10.10.20.10-10.10.20.20"], + ipv6Addresses: ["2001:db8:abcd:12::1000-2001:db8:abcd:12::1fff"], + port: "24562-24570", + }, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateAccessBridge(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesDeleteSample.ts new file mode 100644 index 000000000000..8b74bad57d3e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesDeleteSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the specified access bridge. + * + * @summary delete the specified access bridge. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Delete.json + */ +async function deleteAccessBridge(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.accessBridges.delete("resourceGroupName", "Bastion"); + console.log(result); +} + +async function main(): Promise { + await deleteAccessBridge(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesGetSample.ts new file mode 100644 index 000000000000..67d5fb4e1d48 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the properties of the provided access bridge. + * + * @summary get the properties of the provided access bridge. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Get.json + */ +async function getAccessBridge(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.accessBridges.get("resourceGroupName", "Bastion"); + console.log(result); +} + +async function main(): Promise { + await getAccessBridge(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesListByResourceGroupSample.ts new file mode 100644 index 000000000000..bd625c046ee1 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesListByResourceGroupSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a list of access bridges in the provided resource group. + * + * @summary get a list of access bridges in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_ListByResourceGroup.json + */ +async function listAccessBridgesForResourceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.accessBridges.listByResourceGroup("resourceGroupName")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listAccessBridgesForResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesListBySubscriptionSample.ts new file mode 100644 index 000000000000..8e927aa5dab7 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesListBySubscriptionSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a list of access bridges in the provided subscription. + * + * @summary get a list of access bridges in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_ListBySubscription.json + */ +async function listAccessBridgesForSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.accessBridges.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listAccessBridgesForSubscription(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesUpdateSample.ts new file mode 100644 index 000000000000..dd15b2066a08 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/accessBridgesUpdateSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update properties of the provided access bridge, or update tags associated with the access bridge. Properties and tag updates can be done independently. + * + * @summary update properties of the provided access bridge, or update tags associated with the access bridge. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/AccessBridges_Patch.json + */ +async function patchAccessBridge(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.accessBridges.update("resourceGroupName", "Bastion", { + accessBridgeUpdateParameters: { + properties: { + securityRules: [ + { + description: "Allow management plane egress", + direction: "Outbound", + ipv4Addresses: ["10.10.20.10-10.10.20.20"], + ipv6Addresses: ["2001:db8:abcd:12::1000-2001:db8:abcd:12::1fff"], + port: "24562-24570", + }, + ], + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +async function main(): Promise { + await patchAccessBridge(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..8cbe340dd5f5 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsCreateOrUpdateSample.ts @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a new Kubernetes cluster agent pool or update the properties of the existing one. + * + * @summary create a new Kubernetes cluster agent pool or update the properties of the existing one. + * x-ms-original-file: 2026-05-01-preview/AgentPools_Create.json + */ +async function createOrUpdateKubernetesClusterAgentPool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.agentPools.createOrUpdate( + "resourceGroupName", + "kubernetesClusterName", + "agentPoolName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, + attachedNetworkConfiguration: { + l2Networks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", + pluginType: "DPDK", + }, + ], + l3Networks: [ + { + ipamEnabled: "False", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + pluginType: "SRIOV", + }, + ], + trunkedNetworks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", + pluginType: "MACVLAN", + }, + ], + }, + availabilityZones: ["1", "2", "3"], + count: 3, + labels: [{ key: "kubernetes.label", value: "true" }], + mode: "System", + taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], + upgradeSettings: { maxSurge: "1" }, + vmSkuName: "NC_P46_224_v1", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateKubernetesClusterAgentPool(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsDeleteSample.ts new file mode 100644 index 000000000000..edc28afd3745 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsDeleteSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the provided Kubernetes cluster agent pool. + * + * @summary delete the provided Kubernetes cluster agent pool. + * x-ms-original-file: 2026-05-01-preview/AgentPools_Delete.json + */ +async function deleteKubernetesClusterAgentPool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.agentPools.delete( + "resourceGroupName", + "kubernetesClusterName", + "agentPoolName", + ); + console.log(result); +} + +async function main(): Promise { + await deleteKubernetesClusterAgentPool(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsGetSample.ts new file mode 100644 index 000000000000..ad6f80957e34 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsGetSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get properties of the provided Kubernetes cluster agent pool. + * + * @summary get properties of the provided Kubernetes cluster agent pool. + * x-ms-original-file: 2026-05-01-preview/AgentPools_Get.json + */ +async function getKubernetesClusterAgentPool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.agentPools.get( + "resourceGroupName", + "kubernetesClusterName", + "agentPoolName", + ); + console.log(result); +} + +async function main(): Promise { + await getKubernetesClusterAgentPool(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsListByKubernetesClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsListByKubernetesClusterSample.ts similarity index 53% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsListByKubernetesClusterSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsListByKubernetesClusterSample.ts index a245e9204481..6ce7cc87ec6d 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/agentPoolsListByKubernetesClusterSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsListByKubernetesClusterSample.ts @@ -3,30 +3,25 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of agent pools for the provided Kubernetes cluster. + * This sample demonstrates how to get a list of agent pools for the provided Kubernetes cluster. * - * @summary Get a list of agent pools for the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/AgentPools_ListByKubernetesCluster.json + * @summary get a list of agent pools for the provided Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/AgentPools_ListByKubernetesCluster.json */ async function listAgentPoolsOfTheKubernetesCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.agentPools.listByKubernetesCluster( - resourceGroupName, - kubernetesClusterName, + "resourceGroupName", + "kubernetesClusterName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsUpdateSample.ts new file mode 100644 index 000000000000..a7ce37d2e10c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsUpdateSample.ts @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to 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. + * + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/AgentPools_Patch.json + */ +async function patchKubernetesClusterAgentPool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.agentPools.update( + "resourceGroupName", + "kubernetesClusterName", + "agentPoolName", + { + agentPoolUpdateParameters: { + administratorConfiguration: { + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + count: 3, + upgradeSettings: { drainTimeout: 1800, maxSurge: "1", maxUnavailable: "0" }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await patchKubernetesClusterAgentPool(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..4b006818a149 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsCreateOrUpdateSample.ts @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a new bare metal machine key set or update the existing one for the provided cluster. + * + * @summary create a new bare metal machine key set or update the existing one for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Create.json + */ +async function createOrUpdateBareMetalMachineKeySetOfCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachineKeySets.createOrUpdate( + "resourceGroupName", + "clusterName", + "bareMetalMachineKeySetName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", + expiration: new Date("2022-12-31T23:59:59.008Z"), + jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], + osGroupName: "standardAccessGroup", + privilegeLevel: "Other", + privilegeLevelName: "SecurityScanner", + userList: [ + { + azureUserName: "userABC", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + { + azureUserName: "userXYZ", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateBareMetalMachineKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsDeleteSample.ts new file mode 100644 index 000000000000..2032c6cfae57 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsDeleteSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the bare metal machine key set of the provided cluster. + * + * @summary delete the bare metal machine key set of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Delete.json + */ +async function deleteBareMetalMachineKeySetOfCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachineKeySets.delete( + "resourceGroupName", + "clusterName", + "bareMetalMachineKeySetName", + ); + console.log(result); +} + +async function main(): Promise { + await deleteBareMetalMachineKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsGetSample.ts new file mode 100644 index 000000000000..31e0f70ded05 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsGetSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get bare metal machine key set of the provided cluster. + * + * @summary get bare metal machine key set of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Get.json + */ +async function getBareMetalMachineKeySetOfCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachineKeySets.get( + "resourceGroupName", + "clusterName", + "bareMetalMachineKeySetName", + ); + console.log(result); +} + +async function main(): Promise { + await getBareMetalMachineKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsListByClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsListByClusterSample.ts similarity index 54% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsListByClusterSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsListByClusterSample.ts index 5fd2e89c155f..3790457bce5e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachineKeySetsListByClusterSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsListByClusterSample.ts @@ -3,30 +3,25 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of bare metal machine key sets for the provided cluster. + * This sample demonstrates how to get a list of bare metal machine key sets for the provided cluster. * - * @summary Get a list of bare metal machine key sets for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachineKeySets_ListByCluster.json + * @summary get a list of bare metal machine key sets for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_ListByCluster.json */ async function listBareMetalMachineKeySetsOfTheCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.bareMetalMachineKeySets.listByCluster( - resourceGroupName, - clusterName, + "resourceGroupName", + "clusterName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsUpdateSample.ts new file mode 100644 index 000000000000..210a5721f426 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsUpdateSample.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to 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. + * + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachineKeySets_Patch.json + */ +async function patchBareMetalMachineKeySetOfCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachineKeySets.update( + "resourceGroupName", + "clusterName", + "bareMetalMachineKeySetName", + { + bareMetalMachineKeySetUpdateParameters: { + expiration: new Date("2022-12-31T23:59:59.008Z"), + jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], + userList: [ + { + azureUserName: "userABC", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + { + azureUserName: "userXYZ", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await patchBareMetalMachineKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCordonSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCordonSample.ts new file mode 100644 index 000000000000..9af97a71566a --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCordonSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to cordon the provided bare metal machine's Kubernetes node. + * + * @summary cordon the provided bare metal machine's Kubernetes node. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Cordon.json + */ +async function cordonBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.cordon( + "resourceGroupName", + "bareMetalMachineName", + { bareMetalMachineCordonParameters: { evacuate: "True" } }, + ); + console.log(result); +} + +async function main(): Promise { + await cordonBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..6be49bfb3beb --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCreateOrUpdateSample.ts @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * + * @summary create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Create.json + */ +async function createOrUpdateBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.createOrUpdate( + "resourceGroupName", + "bareMetalMachineName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + bmcConnectionString: "redfish+https://10.10.10.16/redfish/v1/Systems/System.Embedded.1", + bmcCredentials: { password: "{password}", username: "bmcuser" }, + bmcMacAddress: "00:00:4f:00:57:00", + bootMacAddress: "00:00:4e:00:58:af", + machineDetails: "User-provided machine details.", + machineName: "r01c001", + machineSkuId: "684E-3B16-399E", + rackId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", + rackSlot: 1, + serialNumber: "BM1219XXX", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesDeleteSample.ts similarity index 50% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesDeleteSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesDeleteSample.ts index 9d293ccf317c..5c47fbe6fa90 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * This sample demonstrates how to delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. * - * @summary Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_Delete.json + * @summary delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Delete.json */ async function deleteBareMetalMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginDeleteAndWait( - resourceGroupName, - bareMetalMachineName, - ); + const result = await client.bareMetalMachines.delete("resourceGroupName", "bareMetalMachineName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesGetSample.ts new file mode 100644 index 000000000000..f04c36e79813 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get properties of the provided bare metal machine. + * + * @summary get properties of the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Get.json + */ +async function getBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.get("resourceGroupName", "bareMetalMachineName"); + console.log(result); +} + +async function main(): Promise { + await getBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListByResourceGroupSample.ts similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesListByResourceGroupSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListByResourceGroupSample.ts index e441cdfec343..743f26701d94 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of bare metal machines in the provided resource group. + * This sample demonstrates how to get a list of bare metal machines in the provided resource group. * - * @summary Get a list of bare metal machines in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_ListByResourceGroup.json + * @summary get a list of bare metal machines in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_ListByResourceGroup.json */ async function listBareMetalMachinesForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.bareMetalMachines.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.bareMetalMachines.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListBySubscriptionSample.ts similarity index 62% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesListBySubscriptionSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListBySubscriptionSample.ts index fd29cd9fcb12..d10ef3eda883 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bareMetalMachinesListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of bare metal machines in the provided subscription. + * This sample demonstrates how to get a list of bare metal machines in the provided subscription. * - * @summary Get a list of bare metal machines in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BareMetalMachines_ListBySubscription.json + * @summary get a list of bare metal machines in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_ListBySubscription.json */ async function listBareMetalMachinesForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.bareMetalMachines.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesPowerOffSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesPowerOffSample.ts new file mode 100644 index 000000000000..9346a3e923c3 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesPowerOffSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to power off the provided bare metal machine. + * + * @summary power off the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_PowerOff.json + */ +async function powerOffBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.powerOff( + "resourceGroupName", + "bareMetalMachineName", + { bareMetalMachinePowerOffParameters: { skipShutdown: "True" } }, + ); + console.log(result); +} + +async function main(): Promise { + await powerOffBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReimageSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReimageSample.ts new file mode 100644 index 000000000000..c0c5e2954f38 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReimageSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to reimage the provided bare metal machine. + * + * @summary reimage the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Reimage.json + */ +async function reimageBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.reimage( + "resourceGroupName", + "bareMetalMachineName", + { body: { safeguardMode: "All" } }, + ); + console.log(result); +} + +async function main(): Promise { + await reimageBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReplaceSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReplaceSample.ts new file mode 100644 index 000000000000..f280f389103d --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReplaceSample.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to replace the provided bare metal machine. + * + * @summary replace the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Replace.json + */ +async function replaceBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.replace( + "resourceGroupName", + "bareMetalMachineName", + { + bareMetalMachineReplaceParameters: { + bmcCredentials: { + password: "https://keyvaultname.vault.azure.net/secrets/secretName", + username: "bmcuser", + }, + bmcMacAddress: "00:00:4f:00:57:ad", + bootMacAddress: "00:00:4e:00:58:af", + machineName: "name", + safeguardMode: "All", + serialNumber: "BM1219XXX", + storagePolicy: "DiscardAll", + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await replaceBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRestartSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRestartSample.ts new file mode 100644 index 000000000000..9da87964693e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRestartSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to restart the provided bare metal machine. + * + * @summary restart the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Restart.json + */ +async function restartBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.restart( + "resourceGroupName", + "bareMetalMachineName", + ); + console.log(result); +} + +async function main(): Promise { + await restartBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunCommandSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunCommandSample.ts new file mode 100644 index 000000000000..378992ecd53d --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunCommandSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * + * @summary run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunCommand.json + */ +async function runCommandOnBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.runCommand( + "resourceGroupName", + "bareMetalMachineName", + { arguments: ["--argument1", "argument2"], limitTimeSeconds: 60, script: "cHdkCg==" }, + ); + console.log(result); +} + +async function main(): Promise { + await runCommandOnBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunDataExtractsRestrictedSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunDataExtractsRestrictedSample.ts new file mode 100644 index 000000000000..1a0ac364488f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunDataExtractsRestrictedSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * + * @summary run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunDataExtractsRestricted.json + */ +async function runRestrictedDataExtractionOnBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.runDataExtractsRestricted( + "resourceGroupName", + "bareMetalMachineName", + { + commands: [{ arguments: ["--min-severity=8"], command: "cluster-cve-report" }], + limitTimeSeconds: 60, + }, + ); + console.log(result); +} + +async function main(): Promise { + await runRestrictedDataExtractionOnBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunDataExtractsSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunDataExtractsSample.ts new file mode 100644 index 000000000000..41369e4ada52 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunDataExtractsSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * + * @summary run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunDataExtracts.json + */ +async function runDataExtractionOnBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.runDataExtracts( + "resourceGroupName", + "bareMetalMachineName", + { + commands: [{ arguments: ["SysInfo", "TTYLog"], command: "hardware-support-data-collection" }], + limitTimeSeconds: 60, + }, + ); + console.log(result); +} + +async function main(): Promise { + await runDataExtractionOnBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunReadCommandsSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunReadCommandsSample.ts new file mode 100644 index 000000000000..ea2d23d92c72 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunReadCommandsSample.ts @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * + * @summary run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunReadCommands_Hostname.json + */ +async function runAndRetrieveOutputFromASingleReadOnlyCommandOnBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.runReadCommands( + "resourceGroupName", + "bareMetalMachineName", + { commands: [{ command: "hostname" }], limitTimeSeconds: 60 }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * + * @summary run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_RunReadCommands_Multiple.json + */ +async function runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.runReadCommands( + "resourceGroupName", + "bareMetalMachineName", + { + commands: [ + { arguments: ["pods", "-A"], command: "kubectl get" }, + { arguments: ["192.168.0.99", "-c", "3"], command: "ping" }, + ], + limitTimeSeconds: 60, + }, + ); + console.log(result); +} + +async function main(): Promise { + await runAndRetrieveOutputFromASingleReadOnlyCommandOnBareMetalMachine(); + await runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesStartSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesStartSample.ts new file mode 100644 index 000000000000..003f47b5b594 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesStartSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to start the provided bare metal machine. + * + * @summary start the provided bare metal machine. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Start.json + */ +async function startBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.start("resourceGroupName", "bareMetalMachineName"); + console.log(result); +} + +async function main(): Promise { + await startBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUncordonSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUncordonSample.ts new file mode 100644 index 000000000000..76babf603f67 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUncordonSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to uncordon the provided bare metal machine's Kubernetes node. + * + * @summary uncordon the provided bare metal machine's Kubernetes node. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Uncordon.json + */ +async function uncordonBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.uncordon( + "resourceGroupName", + "bareMetalMachineName", + ); + console.log(result); +} + +async function main(): Promise { + await uncordonBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUpdateSample.ts new file mode 100644 index 000000000000..e5e128d75d25 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUpdateSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. + * + * @summary patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/BareMetalMachines_Patch.json + */ +async function patchBareMetalMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bareMetalMachines.update( + "resourceGroupName", + "bareMetalMachineName", + { + bareMetalMachineUpdateParameters: { + machineDetails: "machinedetails", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await patchBareMetalMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..5b4ffb3dd40d --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsCreateOrUpdateSample.ts @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a new baseboard management controller key set or update the existing one for the provided cluster. + * + * @summary create a new baseboard management controller key set or update the existing one for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Create.json + */ +async function createOrUpdateBaseboardManagementControllerKeySetOfCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bmcKeySets.createOrUpdate( + "resourceGroupName", + "clusterName", + "bmcKeySetName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", + expiration: new Date("2022-12-31T23:59:59.008Z"), + privilegeLevel: "Administrator", + userList: [ + { + azureUserName: "userABC", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + { + azureUserName: "userXYZ", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateBaseboardManagementControllerKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsDeleteSample.ts new file mode 100644 index 000000000000..7047485bafb3 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsDeleteSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the baseboard management controller key set of the provided cluster. + * + * @summary delete the baseboard management controller key set of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Delete.json + */ +async function deleteBaseboardManagementControllerKeySetOfCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bmcKeySets.delete( + "resourceGroupName", + "clusterName", + "bmcKeySetName", + ); + console.log(result); +} + +async function main(): Promise { + await deleteBaseboardManagementControllerKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsGetSample.ts new file mode 100644 index 000000000000..9d842de00761 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get baseboard management controller key set of the provided cluster. + * + * @summary get baseboard management controller key set of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Get.json + */ +async function getBaseboardManagementControllerKeySetOfCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bmcKeySets.get("resourceGroupName", "clusterName", "bmcKeySetName"); + console.log(result); +} + +async function main(): Promise { + await getBaseboardManagementControllerKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsListByClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsListByClusterSample.ts similarity index 51% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsListByClusterSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsListByClusterSample.ts index 05dfa8b783dd..62ea4760dfee 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/bmcKeySetsListByClusterSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsListByClusterSample.ts @@ -3,30 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of baseboard management controller key sets for the provided cluster. + * This sample demonstrates how to get a list of baseboard management controller key sets for the provided cluster. * - * @summary Get a list of baseboard management controller key sets for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/BmcKeySets_ListByCluster.json + * @summary get a list of baseboard management controller key sets for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_ListByCluster.json */ async function listBaseboardManagementControllerKeySetsOfTheCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.bmcKeySets.listByCluster( - resourceGroupName, - clusterName, - )) { + for await (const item of client.bmcKeySets.listByCluster("resourceGroupName", "clusterName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsUpdateSample.ts new file mode 100644 index 000000000000..39e10854986e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsUpdateSample.ts @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to 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. + * + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/BmcKeySets_Patch.json + */ +async function patchBaseboardManagementControllerKeySetOfCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.bmcKeySets.update( + "resourceGroupName", + "clusterName", + "bmcKeySetName", + { + bmcKeySetUpdateParameters: { + expiration: new Date("2022-12-31T23:59:59.008Z"), + userList: [ + { + azureUserName: "userABC", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + { + azureUserName: "userXYZ", + description: "Needs access for troubleshooting as a part of the support team", + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + userPrincipalName: "userABC@contoso.com", + }, + ], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await patchBaseboardManagementControllerKeySetOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksCreateOrUpdateSample.ts new file mode 100644 index 000000000000..7f495bf85cc9 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksCreateOrUpdateSample.ts @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a new cloud services network or update the properties of the existing cloud services network. + * + * @summary create a new cloud services network or update the properties of the existing cloud services network. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Create.json + */ +async function createOrUpdateCloudServicesNetwork(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.cloudServicesNetworks.createOrUpdate( + "resourceGroupName", + "cloudServicesNetworkName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + additionalEgressEndpoints: [ + { + category: "azure-resource-management", + endpoints: [{ domainName: "storageaccountex.blob.core.windows.net", port: 443 }], + }, + ], + enableDefaultEgressEndpoints: "False", + storageOptions: { + mode: "Standard", + sizeMiB: 1048576, + storageApplianceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateCloudServicesNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksDeleteSample.ts new file mode 100644 index 000000000000..9e5fe4195d18 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksDeleteSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the provided cloud services network. + * + * @summary delete the provided cloud services network. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Delete.json + */ +async function deleteCloudServicesNetwork(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.cloudServicesNetworks.delete( + "resourceGroupName", + "cloudServicesNetworkName", + ); + console.log(result); +} + +async function main(): Promise { + await deleteCloudServicesNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksGetSample.ts new file mode 100644 index 000000000000..7e1dc40b19bc --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksGetSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get properties of the provided cloud services network. + * + * @summary get properties of the provided cloud services network. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Get.json + */ +async function getCloudServicesNetwork(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.cloudServicesNetworks.get( + "resourceGroupName", + "cloudServicesNetworkName", + ); + console.log(result); +} + +async function main(): Promise { + await getCloudServicesNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListByResourceGroupSample.ts similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksListByResourceGroupSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListByResourceGroupSample.ts index 1299ddb92510..8eb92bba6911 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of cloud services networks in the provided resource group. + * This sample demonstrates how to get a list of cloud services networks in the provided resource group. * - * @summary Get a list of cloud services networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_ListByResourceGroup.json + * @summary get a list of cloud services networks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_ListByResourceGroup.json */ async function listCloudServicesNetworksForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.cloudServicesNetworks.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.cloudServicesNetworks.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListBySubscriptionSample.ts similarity index 62% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksListBySubscriptionSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListBySubscriptionSample.ts index 7514c2a4917f..e7b6bfdede6b 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/cloudServicesNetworksListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of cloud services networks in the provided subscription. + * This sample demonstrates how to get a list of cloud services networks in the provided subscription. * - * @summary Get a list of cloud services networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/CloudServicesNetworks_ListBySubscription.json + * @summary get a list of cloud services networks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_ListBySubscription.json */ async function listCloudServicesNetworksForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.cloudServicesNetworks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksUpdateSample.ts new file mode 100644 index 000000000000..8a1d3ab51a33 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksUpdateSample.ts @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. + * + * @summary update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/CloudServicesNetworks_Patch.json + */ +async function patchCloudServicesNetwork(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.cloudServicesNetworks.update( + "resourceGroupName", + "cloudServicesNetworkName", + { + cloudServicesNetworkUpdateParameters: { + additionalEgressEndpoints: [ + { + category: "azure-resource-management", + endpoints: [{ domainName: "storageaccountex.blob.core.windows.net", port: 443 }], + }, + ], + enableDefaultEgressEndpoints: "False", + storageOptions: { + mode: "Standard", + sizeMiB: 1048576, + storageApplianceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await patchCloudServicesNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersCreateOrUpdateSample.ts new file mode 100644 index 000000000000..fe1adddaa0ba --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersCreateOrUpdateSample.ts @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a new cluster manager or update properties of the cluster manager if it exists. + * + * @summary create a new cluster manager or update properties of the cluster manager if it exists. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Create.json + */ +async function createOrUpdateClusterManager(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.createOrUpdate( + "resourceGroupName", + "clusterManagerName", + { + identity: { type: "SystemAssigned" }, + kind: "AzureLocal", + location: "location", + analyticsWorkspaceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName", + fabricControllerId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to create a new cluster manager or update properties of the cluster manager if it exists. + * + * @summary create a new cluster manager or update properties of the cluster manager if it exists. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Create_Uami.json + */ +async function createOrUpdateClusterManagerWithUserAssignedIdentity(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.createOrUpdate( + "resourceGroupName", + "clusterManagerName", + { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + }, + }, + kind: "AzureLocal", + location: "location", + analyticsWorkspaceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName", + fabricControllerId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateClusterManager(); + await createOrUpdateClusterManagerWithUserAssignedIdentity(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersDeleteSample.ts new file mode 100644 index 000000000000..ce82c7c85f4e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersDeleteSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the provided cluster manager. + * + * @summary delete the provided cluster manager. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Delete.json + */ +async function deleteClusterManager(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.delete("resourceGroupName", "clusterManagerName"); + console.log(result); +} + +async function main(): Promise { + await deleteClusterManager(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersGetSample.ts new file mode 100644 index 000000000000..d188fb959e8b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the properties of the provided cluster manager. + * + * @summary get the properties of the provided cluster manager. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Get.json + */ +async function getClusterManager(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.get("resourceGroupName", "clusterManagerName"); + console.log(result); +} + +async function main(): Promise { + await getClusterManager(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListByResourceGroupSample.ts similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersListByResourceGroupSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListByResourceGroupSample.ts index d2d298c69ec0..8ec189b4c469 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of cluster managers in the provided resource group. + * This sample demonstrates how to get a list of cluster managers in the provided resource group. * - * @summary Get a list of cluster managers in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_ListByResourceGroup.json + * @summary get a list of cluster managers in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_ListByResourceGroup.json */ async function listClusterManagersForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.clusterManagers.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.clusterManagers.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListBySubscriptionSample.ts similarity index 62% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersListBySubscriptionSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListBySubscriptionSample.ts index ff1fdb40ac3f..0c33ef1d186e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clusterManagersListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of cluster managers in the provided subscription. + * This sample demonstrates how to get a list of cluster managers in the provided subscription. * - * @summary Get a list of cluster managers in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterManagers_ListBySubscription.json + * @summary get a list of cluster managers in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_ListBySubscription.json */ async function listClusterManagersForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.clusterManagers.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersUpdateRelayPrivateEndpointConnectionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersUpdateRelayPrivateEndpointConnectionSample.ts new file mode 100644 index 000000000000..692148a7214c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersUpdateRelayPrivateEndpointConnectionSample.ts @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. + * + * @summary update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_UpdateRelayPrivateEndpointConnection_Approve.json + */ +async function approvePrivateEndpointConnection(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.updateRelayPrivateEndpointConnection( + "resourceGroupName", + "clusterManagerName", + { + clusterManagerUpdateRelayPrivateEndpointConnectionParameters: { + connectionState: "Approved", + description: "Approving private endpoint connection", + privateEndpointResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. + * + * @summary update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_UpdateRelayPrivateEndpointConnection_Reject.json + */ +async function rejectPrivateEndpointConnection(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.updateRelayPrivateEndpointConnection( + "resourceGroupName", + "clusterManagerName", + { + clusterManagerUpdateRelayPrivateEndpointConnectionParameters: { + connectionState: "Rejected", + description: "Rejecting private endpoint connection", + privateEndpointResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await approvePrivateEndpointConnection(); + await rejectPrivateEndpointConnection(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersUpdateSample.ts new file mode 100644 index 000000000000..da4331968a68 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersUpdateSample.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. + * + * @summary patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/ClusterManagers_Patch.json + */ +async function patchClusterManager(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusterManagers.update("resourceGroupName", "clusterManagerName", { + clusterManagerUpdateParameters: { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": + {}, + }, + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +async function main(): Promise { + await patchClusterManager(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersContinueUpdateVersionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersContinueUpdateVersionSample.ts new file mode 100644 index 000000000000..94786718314f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersContinueUpdateVersionSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. + * + * @summary trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. + * x-ms-original-file: 2026-05-01-preview/Clusters_ContinueUpdateVersion.json + */ +async function continueUpdateClusterVersion(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.continueUpdateVersion("resourceGroupName", "clusterName", { + machineGroupTargetingMode: "AlphaByRack", + safeguardMode: "All", + }); + console.log(result); +} + +async function main(): Promise { + await continueUpdateClusterVersion(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersCreateOrUpdateSample.ts similarity index 77% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersCreateOrUpdateSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersCreateOrUpdateSample.ts index 9de5a8c19211..c5f827b9fe0c 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersCreateOrUpdateSample.ts @@ -1,25 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { Cluster} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new cluster or update the properties of the cluster if it exists. + * This sample demonstrates how to create a new cluster or update the properties of the cluster if it exists. * - * @summary Create a new cluster or update the properties of the cluster if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_Create.json + * @summary create a new cluster or update the properties of the cluster if it exists. + * x-ms-original-file: 2026-05-01-preview/Clusters_Create.json */ async function createOrUpdateCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterParameters: Cluster = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.createOrUpdate("resourceGroupName", "clusterName", { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", + type: "CustomLocation", + }, + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + }, + }, + kind: "AzureLocal", + location: "location", aggregatorOrSingleRackDefinition: { bareMetalMachineConfigurationData: [ { @@ -67,7 +75,7 @@ async function createOrUpdateCluster(): Promise { }, analyticsOutputSettings: { analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName", associatedIdentity: { identityType: "UserAssignedIdentity", userAssignedIdentityResourceId: @@ -83,8 +91,7 @@ async function createOrUpdateCluster(): Promise { userAssignedIdentityResourceId: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", }, - containerUrl: - "https://myaccount.blob.core.windows.net/mycontainer?restype=container", + containerUrl: "https://myaccount.blob.core.windows.net/mycontainer?restype=container", overrides: [ { associatedIdentity: { @@ -93,23 +100,17 @@ async function createOrUpdateCluster(): Promise { "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", }, commandOutputType: "StorageRunReadCommands", - containerUrl: - "https://myaccount.blob.core.windows.net/myContainer2?restype=container", + containerUrl: "https://myaccount.blob.core.windows.net/myContainer2?restype=container", }, ], }, - computeDeploymentThreshold: { - type: "PercentSuccess", - grouping: "PerCluster", - value: 90, - }, + computeDeploymentThreshold: { grouping: "PerCluster", type: "PercentSuccess", value: 90 }, computeRackDefinitions: [ { bareMetalMachineConfigurationData: [ { bmcCredentials: { - password: - "https://keyvaultname.vault.azure.net/secrets/secretName", + password: "https://keyvaultname.vault.azure.net/secrets/secretName", username: "username", }, bmcMacAddress: "AA:BB:CC:DD:EE:FF", @@ -121,8 +122,7 @@ async function createOrUpdateCluster(): Promise { }, { bmcCredentials: { - password: - "https://keyvaultname.vault.azure.net/secrets/secretName", + password: "https://keyvaultname.vault.azure.net/secrets/secretName", username: "username", }, bmcMacAddress: "AA:BB:CC:DD:EE:00", @@ -142,8 +142,7 @@ async function createOrUpdateCluster(): Promise { storageApplianceConfigurationData: [ { adminCredentials: { - password: - "https://keyvaultname.vault.azure.net/secrets/secretName", + password: "https://keyvaultname.vault.azure.net/secrets/secretName", username: "username", }, rackSlot: 1, @@ -153,25 +152,10 @@ async function createOrUpdateCluster(): Promise { ], }, ], - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", - type: "CustomLocation", - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, networkFabricId: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName", - runtimeProtectionConfiguration: { enforcementLevel: "OnDemand" }, + runtimeProtectionConfiguration: { definitionUpdateMode: "None", enforcementLevel: "OnDemand" }, secretArchiveSettings: { associatedIdentity: { identityType: "UserAssignedIdentity", @@ -180,7 +164,6 @@ async function createOrUpdateCluster(): Promise { }, vaultUri: "https://keyvaultname.vault.azure.net/", }, - tags: { key1: "myvalue1", key2: "myvalue2" }, updateStrategy: { maxUnavailable: 4, strategyType: "Rack", @@ -189,14 +172,8 @@ async function createOrUpdateCluster(): Promise { waitTimeMinutes: 10, }, vulnerabilityScanningSettings: { containerScan: "Enabled" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - clusterParameters, - ); + tags: { key1: "myvalue1", key2: "myvalue2" }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeleteSample.ts new file mode 100644 index 000000000000..61edd2d16ef8 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeleteSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the provided cluster. + * + * @summary delete the provided cluster. + * x-ms-original-file: 2026-05-01-preview/Clusters_Delete.json + */ +async function deleteCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.delete("resourceGroupName", "clusterName"); + console.log(result); +} + +async function main(): Promise { + await deleteCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeploySample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeploySample.ts new file mode 100644 index 000000000000..ddc838a803be --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeploySample.ts @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deploy the cluster using the rack configuration provided during creation. + * + * @summary deploy the cluster using the rack configuration provided during creation. + * x-ms-original-file: 2026-05-01-preview/Clusters_Deploy.json + */ +async function deployCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.deploy("resourceGroupName", "clusterName", { + clusterDeployParameters: {}, + }); + console.log(result); +} + +/** + * This sample demonstrates how to deploy the cluster using the rack configuration provided during creation. + * + * @summary deploy the cluster using the rack configuration provided during creation. + * x-ms-original-file: 2026-05-01-preview/Clusters_Deploy_SkipValidation.json + */ +async function deployClusterSkippingValidation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.deploy("resourceGroupName", "clusterName", { + clusterDeployParameters: { skipValidationsForMachines: ["bmmName1"] }, + }); + console.log(result); +} + +async function main(): Promise { + await deployCluster(); + await deployClusterSkippingValidation(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersGetSample.ts new file mode 100644 index 000000000000..9a1617843a94 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get properties of the provided cluster. + * + * @summary get properties of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/Clusters_Get.json + */ +async function getCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.get("resourceGroupName", "clusterName"); + console.log(result); +} + +async function main(): Promise { + await getCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersInspectSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersInspectSample.ts new file mode 100644 index 000000000000..33a9f7ffe675 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersInspectSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied additional actions and filters. + * + * @summary trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied additional actions and filters. + * x-ms-original-file: 2026-05-01-preview/Clusters_Inspect.json + */ +async function inspectCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.inspect("resourceGroupName", "clusterName", { + clusterInspectParameters: { + additionalActions: ["ResetHardware"], + filterDevices: { bareMetalMachineNames: ["machine1", "machine2"], rackNames: ["rack1"] }, + }, + }); + console.log(result); +} + +async function main(): Promise { + await inspectCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListByResourceGroupSample.ts new file mode 100644 index 000000000000..05dc4e6cb34e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListByResourceGroupSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a list of clusters in the provided resource group. + * + * @summary get a list of clusters in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/Clusters_ListByResourceGroup.json + */ +async function listClustersForResourceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.clusters.listByResourceGroup("resourceGroupName")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listClustersForResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListBySubscriptionSample.ts similarity index 61% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersListBySubscriptionSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListBySubscriptionSample.ts index 69b128daf617..ff4ab14e854e 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/clustersListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of clusters in the provided subscription. + * This sample demonstrates how to get a list of clusters in the provided subscription. * - * @summary Get a list of clusters in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Clusters_ListBySubscription.json + * @summary get a list of clusters in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/Clusters_ListBySubscription.json */ async function listClustersForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.clusters.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersRotateCredentialSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersRotateCredentialSample.ts new file mode 100644 index 000000000000..5024603cba13 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersRotateCredentialSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to rotate the specified cluster credential. + * + * @summary rotate the specified cluster credential. + * x-ms-original-file: 2026-05-01-preview/Clusters_RotateCredential.json + */ +async function rotateOneOrMoreManagedCredentials(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.rotateCredential("resourceGroupName", "clusterName", { + credentials: ["BMC Credential"], + }); + console.log(result); +} + +async function main(): Promise { + await rotateOneOrMoreManagedCredentials(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersScanRuntimeSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersScanRuntimeSample.ts new file mode 100644 index 000000000000..b30a26145d93 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersScanRuntimeSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. + * + * @summary triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. + * x-ms-original-file: 2026-05-01-preview/Clusters_ScanRuntime.json + */ +async function executeARuntimeProtectionScanOnTheCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.scanRuntime("resourceGroupName", "clusterName", { + clusterScanRuntimeParameters: { scanActivity: "Scan" }, + }); + console.log(result); +} + +async function main(): Promise { + await executeARuntimeProtectionScanOnTheCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateSample.ts new file mode 100644 index 000000000000..8a7ba68dfa25 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateSample.ts @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_AggregatorOrSingleRackDefinition.json + */ +async function patchClusterAggregatorOrSingleRackDefinition(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + aggregatorOrSingleRackDefinition: { + bareMetalMachineConfigurationData: [ + { + bmcCredentials: { password: "{password}", username: "username" }, + bmcMacAddress: "AA:BB:CC:DD:EE:FF", + bootMacAddress: "00:BB:CC:DD:EE:FF", + machineDetails: "extraDetails", + machineName: "bmmName1", + rackSlot: 1, + serialNumber: "BM1219XXX", + }, + { + bmcCredentials: { password: "{password}", username: "username" }, + bmcMacAddress: "AA:BB:CC:DD:EE:00", + bootMacAddress: "00:BB:CC:DD:EE:00", + machineDetails: "extraDetails", + machineName: "bmmName2", + rackSlot: 2, + serialNumber: "BM1219YYY", + }, + ], + networkRackId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", + rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", + rackSerialNumber: "newSerialNumber", + rackSkuId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", + storageApplianceConfigurationData: [ + { + adminCredentials: { password: "{password}", username: "username" }, + rackSlot: 1, + serialNumber: "BM1219XXX", + storageApplianceName: "vmName", + }, + ], + }, + computeDeploymentThreshold: { grouping: "PerCluster", type: "PercentSuccess", value: 90 }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_AnalyticsOutput.json + */ +async function patchClusterAnalyticsOutput(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": + {}, + }, + }, + analyticsOutputSettings: { + analyticsWorkspaceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.OperationalInsights/workspaces/logAnalyticsWorkspaceName", + associatedIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", + }, + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_CommandOutput.json + */ +async function patchClusterCommandOutput(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2": + {}, + }, + }, + commandOutputSettings: { + associatedIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", + }, + containerUrl: "https://myaccount.blob.core.windows.net/mycontainer?restype=container", + overrides: [ + { + associatedIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", + }, + commandOutputType: "StorageRunReadCommands", + containerUrl: "https://myaccount.blob.core.windows.net/myContainer2?restype=container", + }, + ], + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_Location.json + */ +async function patchClusterLocation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + clusterLocation: "Foo Street, 3rd Floor, row 9", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_RuntimeProtectionConfiguration.json + */ +async function patchRuntimeProtectionConfiguration(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + runtimeProtectionConfiguration: { + definitionUpdateMode: "Automatic", + enforcementLevel: "OnDemand", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_SecretArchive.json + */ +async function patchSecretArchive(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + secretArchiveSettings: { + associatedIdentity: { + identityType: "UserAssignedIdentity", + userAssignedIdentityResourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", + }, + vaultUri: "https://keyvaultname.vault.azure.net/", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_UpdateStrategy.json + */ +async function patchUpdateStrategy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + updateStrategy: { + maxUnavailable: 4, + strategyType: "Rack", + thresholdType: "CountSuccess", + thresholdValue: 4, + waitTimeMinutes: 10, + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Clusters_Patch_VulnerabilityScanning.json + */ +async function patchVulnerabilityScanning(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.update("resourceGroupName", "clusterName", { + clusterUpdateParameters: { + vulnerabilityScanningSettings: { containerScan: "Enabled" }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +async function main(): Promise { + await patchClusterAggregatorOrSingleRackDefinition(); + await patchClusterAnalyticsOutput(); + await patchClusterCommandOutput(); + await patchClusterLocation(); + await patchRuntimeProtectionConfiguration(); + await patchSecretArchive(); + await patchUpdateStrategy(); + await patchVulnerabilityScanning(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateVersionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateVersionSample.ts new file mode 100644 index 000000000000..fb4a5a252f03 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateVersionSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update the version of the provided cluster to one of the available supported versions. + * + * @summary update the version of the provided cluster to one of the available supported versions. + * x-ms-original-file: 2026-05-01-preview/Clusters_UpdateVersion.json + */ +async function updateClusterVersion(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.clusters.updateVersion("resourceGroupName", "clusterName", { + safeguardMode: "All", + targetClusterVersion: "2.0", + }); + console.log(result); +} + +async function main(): Promise { + await updateClusterVersion(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..ab07a9c541bf --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesCreateOrUpdateSample.ts @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a new virtual machine console or update the properties of the existing virtual machine console. + * + * @summary create a new virtual machine console or update the properties of the existing virtual machine console. + * x-ms-original-file: 2026-05-01-preview/Consoles_Create.json + */ +async function createOrUpdateVirtualMachineConsole(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.consoles.createOrUpdate( + "resourceGroupName", + "virtualMachineName", + "default", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + enabled: "True", + expiration: new Date("2022-06-01T01:27:03.008Z"), + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateVirtualMachineConsole(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesDeleteSample.ts new file mode 100644 index 000000000000..175cfcac0e77 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesDeleteSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the provided virtual machine console. + * + * @summary delete the provided virtual machine console. + * x-ms-original-file: 2026-05-01-preview/Consoles_Delete.json + */ +async function deleteVirtualMachineConsole(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.consoles.delete("resourceGroupName", "virtualMachineName", "default"); + console.log(result); +} + +async function main(): Promise { + await deleteVirtualMachineConsole(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesGetSample.ts new file mode 100644 index 000000000000..f7ea0695310b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get properties of the provided virtual machine console. + * + * @summary get properties of the provided virtual machine console. + * x-ms-original-file: 2026-05-01-preview/Consoles_Get.json + */ +async function getVirtualMachineConsole(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.consoles.get("resourceGroupName", "virtualMachineName", "default"); + console.log(result); +} + +async function main(): Promise { + await getVirtualMachineConsole(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesListByVirtualMachineSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesListByVirtualMachineSample.ts similarity index 52% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesListByVirtualMachineSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesListByVirtualMachineSample.ts index 8566660ad349..96f4e075fb52 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/consolesListByVirtualMachineSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesListByVirtualMachineSample.ts @@ -3,30 +3,25 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of consoles for the provided virtual machine. + * This sample demonstrates how to get a list of consoles for the provided virtual machine. * - * @summary Get a list of consoles for the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Consoles_ListByVirtualMachine.json + * @summary get a list of consoles for the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/Consoles_ListByVirtualMachine.json */ async function listConsolesOfTheVirtualMachine(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.consoles.listByVirtualMachine( - resourceGroupName, - virtualMachineName, + "resourceGroupName", + "virtualMachineName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesUpdateSample.ts new file mode 100644 index 000000000000..d43afa0a860c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesUpdateSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to 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. + * + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/Consoles_Patch.json + */ +async function patchVirtualMachineConsole(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.consoles.update( + "resourceGroupName", + "virtualMachineName", + "default", + { + consoleUpdateParameters: { + enabled: "True", + expiration: new Date("2022-06-01T01:27:03.008Z"), + sshPublicKey: { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await patchVirtualMachineConsole(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..9e0a75347fba --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesCreateOrUpdateSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. + * + * @summary create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Create.json + */ +async function createOrUpdateKubernetesClusterFeature(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusterFeatures.createOrUpdate( + "resourceGroupName", + "kubernetesClusterName", + "featureName", + { + location: "location", + options: [{ key: "featureOptionName", value: "featureOptionValue" }], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateKubernetesClusterFeature(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesDeleteSample.ts new file mode 100644 index 000000000000..db31c3dec65c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesDeleteSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the provided Kubernetes cluster feature. + * + * @summary delete the provided Kubernetes cluster feature. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Delete.json + */ +async function deleteKubernetesClusterFeature(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusterFeatures.delete( + "resourceGroupName", + "kubernetesClusterName", + "featureName", + ); + console.log(result); +} + +async function main(): Promise { + await deleteKubernetesClusterFeature(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesGetSample.ts new file mode 100644 index 000000000000..cc5e013fa806 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesGetSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get properties of the provided the Kubernetes cluster feature. + * + * @summary get properties of the provided the Kubernetes cluster feature. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Get.json + */ +async function getKubernetesClusterFeature(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusterFeatures.get( + "resourceGroupName", + "kubernetesClusterName", + "featureName", + ); + console.log(result); +} + +async function main(): Promise { + await getKubernetesClusterFeature(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesListByKubernetesClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesListByKubernetesClusterSample.ts similarity index 52% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesListByKubernetesClusterSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesListByKubernetesClusterSample.ts index 81e6f7533aee..0788fb7b2696 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClusterFeaturesListByKubernetesClusterSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesListByKubernetesClusterSample.ts @@ -3,30 +3,25 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of features for the provided Kubernetes cluster. + * This sample demonstrates how to get a list of features for the provided Kubernetes cluster. * - * @summary Get a list of features for the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusterFeatures_ListByKubernetesCluster.json + * @summary get a list of features for the provided Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_ListByKubernetesCluster.json */ async function listFeaturesForTheKubernetesCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.kubernetesClusterFeatures.listByKubernetesCluster( - resourceGroupName, - kubernetesClusterName, + "resourceGroupName", + "kubernetesClusterName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesUpdateSample.ts new file mode 100644 index 000000000000..8c21a4be6e64 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesUpdateSample.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to patch properties of the provided Kubernetes cluster feature. + * + * @summary patch properties of the provided Kubernetes cluster feature. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusterFeatures_Patch.json + */ +async function patchKubernetesClusterFeature(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusterFeatures.update( + "resourceGroupName", + "kubernetesClusterName", + "featureName", + { + kubernetesClusterFeatureUpdateParameters: { + options: [{ key: "featureOptionName", value: "featureOptionValue" }], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await patchKubernetesClusterFeature(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersCreateOrUpdateSample.ts new file mode 100644 index 000000000000..6083c3d8108d --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersCreateOrUpdateSample.ts @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a new Kubernetes cluster or update the properties of the existing one. + * + * @summary create a new Kubernetes cluster or update the properties of the existing one. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Create.json + */ +async function createOrUpdateKubernetesCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.createOrUpdate( + "resourceGroupName", + "kubernetesClusterName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + aadConfiguration: { adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"] }, + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + controlPlaneNodeConfiguration: { + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + availabilityZones: ["1", "2", "3"], + count: 3, + vmSkuName: "NC_G6_28_v1", + }, + initialAgentPoolConfigurations: [ + { + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, + attachedNetworkConfiguration: { + l2Networks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", + pluginType: "DPDK", + }, + ], + l3Networks: [ + { + ipamEnabled: "False", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + pluginType: "SRIOV", + }, + ], + trunkedNetworks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", + pluginType: "MACVLAN", + }, + ], + }, + availabilityZones: ["1", "2", "3"], + count: 3, + labels: [{ key: "kubernetes.label", value: "true" }], + mode: "System", + name: "SystemPool-1", + taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], + upgradeSettings: { maxSurge: "1" }, + vmSkuName: "NC_P46_224_v1", + }, + ], + kubernetesVersion: "1.XX.Y", + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, + networkConfiguration: { + attachedNetworkConfiguration: { + l2Networks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", + pluginType: "DPDK", + }, + ], + l3Networks: [ + { + ipamEnabled: "False", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + pluginType: "SRIOV", + }, + ], + trunkedNetworks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", + pluginType: "MACVLAN", + }, + ], + }, + bgpServiceLoadBalancerConfiguration: { + bgpAdvertisements: [ + { + advertiseToFabric: "True", + communities: ["64512:100"], + ipAddressPools: ["pool1"], + peers: ["peer1"], + }, + ], + bgpPeers: [ + { + bfdEnabled: "False", + bgpMultiHop: "False", + holdTime: "P300s", + keepAliveTime: "P300s", + myAsn: 64512, + name: "peer1", + peerAddress: "203.0.113.254", + peerAsn: 64497, + peerPort: 179, + }, + ], + fabricPeeringEnabled: "True", + ipAddressPools: [ + { + addresses: ["198.51.102.0/24"], + autoAssign: "True", + name: "pool1", + onlyUseHostIps: "True", + }, + ], + }, + cloudServicesNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", + cniNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + dnsServiceIp: "198.51.101.2", + podCidrs: ["198.51.100.0/24"], + serviceCidrs: ["198.51.101.0/24"], + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to create a new Kubernetes cluster or update the properties of the existing one. + * + * @summary create a new Kubernetes cluster or update the properties of the existing one. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_L2LoadBalancer_Create.json + */ +async function createOrUpdateKubernetesClusterWithALayer2LoadBalancer(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.createOrUpdate( + "resourceGroupName", + "kubernetesClusterName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + aadConfiguration: { adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"] }, + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + controlPlaneNodeConfiguration: { + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + availabilityZones: ["1", "2", "3"], + count: 3, + vmSkuName: "NC_G6_28_v1", + }, + initialAgentPoolConfigurations: [ + { + administratorConfiguration: { + adminUsername: "azure", + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, + attachedNetworkConfiguration: { + l2Networks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", + pluginType: "DPDK", + }, + ], + l3Networks: [ + { + ipamEnabled: "False", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + pluginType: "SRIOV", + }, + ], + trunkedNetworks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", + pluginType: "MACVLAN", + }, + ], + }, + availabilityZones: ["1", "2", "3"], + count: 3, + labels: [{ key: "kubernetes.label", value: "true" }], + mode: "System", + name: "SystemPool-1", + taints: [{ key: "kubernetes.taint", value: "true:NoSchedule" }], + upgradeSettings: { maxSurge: "1" }, + vmSkuName: "NC_P46_224_v1", + }, + ], + kubernetesVersion: "1.XX.Y", + managedResourceGroupConfiguration: { location: "East US", name: "my-managed-rg" }, + networkConfiguration: { + attachedNetworkConfiguration: { + l2Networks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", + pluginType: "DPDK", + }, + ], + l3Networks: [ + { + ipamEnabled: "False", + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + pluginType: "SRIOV", + }, + ], + trunkedNetworks: [ + { + networkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", + pluginType: "MACVLAN", + }, + ], + }, + cloudServicesNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", + cniNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + dnsServiceIp: "198.51.101.2", + l2ServiceLoadBalancerConfiguration: { + ipAddressPools: [ + { addresses: ["198.51.102.2-198.51.102.254"], autoAssign: "True", name: "pool1" }, + ], + }, + podCidrs: ["198.51.100.0/24"], + serviceCidrs: ["198.51.101.0/24"], + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateKubernetesCluster(); + await createOrUpdateKubernetesClusterWithALayer2LoadBalancer(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersDeleteSample.ts new file mode 100644 index 000000000000..ea51b0db0752 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersDeleteSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the provided Kubernetes cluster. + * + * @summary delete the provided Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Delete.json + */ +async function deleteKubernetesCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.delete( + "resourceGroupName", + "kubernetesClusterName", + ); + console.log(result); +} + +async function main(): Promise { + await deleteKubernetesCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersGetSample.ts new file mode 100644 index 000000000000..949a1b12a59c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get properties of the provided the Kubernetes cluster. + * + * @summary get properties of the provided the Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Get.json + */ +async function getKubernetesCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.get("resourceGroupName", "kubernetesClusterName"); + console.log(result); +} + +async function main(): Promise { + await getKubernetesCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListByResourceGroupSample.ts similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersListByResourceGroupSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListByResourceGroupSample.ts index 0b95b46c6a75..25461f5a0b8b 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of Kubernetes clusters in the provided resource group. + * This sample demonstrates how to get a list of Kubernetes clusters in the provided resource group. * - * @summary Get a list of Kubernetes clusters in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_ListByResourceGroup.json + * @summary get a list of Kubernetes clusters in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_ListByResourceGroup.json */ async function listKubernetesClustersForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.kubernetesClusters.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.kubernetesClusters.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListBySubscriptionSample.ts similarity index 62% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersListBySubscriptionSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListBySubscriptionSample.ts index 16d2837bfcf3..5a5de5bce360 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/kubernetesClustersListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of Kubernetes clusters in the provided subscription. + * This sample demonstrates how to get a list of Kubernetes clusters in the provided subscription. * - * @summary Get a list of Kubernetes clusters in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/KubernetesClusters_ListBySubscription.json + * @summary get a list of Kubernetes clusters in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_ListBySubscription.json */ async function listKubernetesClustersForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.kubernetesClusters.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersRestartNodeSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersRestartNodeSample.ts new file mode 100644 index 000000000000..e779e82666a1 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersRestartNodeSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to restart a targeted node of a Kubernetes cluster. + * + * @summary restart a targeted node of a Kubernetes cluster. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_RestartNode.json + */ +async function restartAKubernetesClusterNode(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.restartNode( + "resourceGroupName", + "kubernetesClusterName", + { nodeName: "nodeName" }, + ); + console.log(result); +} + +async function main(): Promise { + await restartAKubernetesClusterNode(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersUpdateSample.ts new file mode 100644 index 000000000000..096443d9a9b3 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersUpdateSample.ts @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. + * + * @summary patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/KubernetesClusters_Patch.json + */ +async function patchKubernetesCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesClusters.update( + "resourceGroupName", + "kubernetesClusterName", + { + kubernetesClusterUpdateParameters: { + administratorConfiguration: { + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + controlPlaneNodeConfiguration: { + administratorConfiguration: { + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + }, + count: 3, + }, + kubernetesVersion: "1.XX.Y", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await patchKubernetesCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..a9f67a097916 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsCreateOrUpdateSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create the Kubernetes version resource or update its tags. This resource is system managed and should only be created with the name "default". + * + * @summary create the Kubernetes version resource or update its tags. This resource is system managed and should only be created with the name "default". + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Create.json + */ +async function createOrUpdateKubernetesVersions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesVersions.createOrUpdate("resourceGroupName", "default", { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateKubernetesVersions(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsDeleteSample.ts new file mode 100644 index 000000000000..2f67e0b0a34c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsDeleteSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the specified Kubernetes version resource. + * + * @summary delete the specified Kubernetes version resource. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Delete.json + */ +async function deleteKubernetesVersions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesVersions.delete("resourceGroupName", "default"); + console.log(result); +} + +async function main(): Promise { + await deleteKubernetesVersions(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsGetSample.ts new file mode 100644 index 000000000000..cbda1313e927 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * + * @summary retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_Get.json + */ +async function getKubernetesVersions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesVersions.get("resourceGroupName", "default"); + console.log(result); +} + +async function main(): Promise { + await getKubernetesVersions(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsListByResourceGroupSample.ts new file mode 100644 index 000000000000..233191848258 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsListByResourceGroupSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a list of Kubernetes version resources in the provided resource group. + * + * @summary get a list of Kubernetes version resources in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_ListByResourceGroup.json + */ +async function listKubernetesVersionsForResourceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.kubernetesVersions.listByResourceGroup("resourceGroupName")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listKubernetesVersionsForResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsListBySubscriptionSample.ts new file mode 100644 index 000000000000..91e0f54ebed5 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsListBySubscriptionSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a list of Kubernetes version resources in the provided subscription. + * + * @summary get a list of Kubernetes version resources in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_ListBySubscription.json + */ +async function listKubernetesVersionsForSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.kubernetesVersions.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listKubernetesVersionsForSubscription(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsUpdateSample.ts new file mode 100644 index 000000000000..6729f6ec39d3 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesVersionsUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update tags associated with the Kubernetes version resource. No other properties are supported for update. + * + * @summary update tags associated with the Kubernetes version resource. No other properties are supported for update. + * x-ms-original-file: 2026-05-01-preview/KubernetesVersions_UpdateTags.json + */ +async function patchKubernetesVersions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.kubernetesVersions.update("resourceGroupName", "default", { + kubernetesVersionPatchParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); + console.log(result); +} + +async function main(): Promise { + await patchKubernetesVersions(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksCreateOrUpdateSample.ts similarity index 59% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksCreateOrUpdateSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksCreateOrUpdateSample.ts index 77b018112c3e..718b259ee364 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksCreateOrUpdateSample.ts @@ -1,43 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { L2Network} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new layer 2 (L2) network or update the properties of the existing network. + * This sample demonstrates how to create a new layer 2 (L2) network or update the properties of the existing network. * - * @summary Create a new layer 2 (L2) network or update the properties of the existing network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_Create.json + * @summary create a new layer 2 (L2) network or update the properties of the existing network. + * x-ms-original-file: 2026-05-01-preview/L2Networks_Create.json */ async function createOrUpdateL2Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const l2NetworkParameters: L2Network = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l2Networks.createOrUpdate("resourceGroupName", "l2NetworkName", { extendedLocation: { name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", type: "CustomLocation", }, + location: "location", hybridAksPluginType: "DPDK", interfaceName: "eth0", l2IsolationDomainId: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", - location: "location", tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.beginCreateOrUpdateAndWait( - resourceGroupName, - l2NetworkName, - l2NetworkParameters, - ); + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksDeleteSample.ts new file mode 100644 index 000000000000..18c831552d18 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksDeleteSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the provided layer 2 (L2) network. + * + * @summary delete the provided layer 2 (L2) network. + * x-ms-original-file: 2026-05-01-preview/L2Networks_Delete.json + */ +async function deleteL2Network(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l2Networks.delete("resourceGroupName", "l2NetworkName"); + console.log(result); +} + +async function main(): Promise { + await deleteL2Network(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksGetSample.ts new file mode 100644 index 000000000000..355a6b99eefb --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get properties of the provided layer 2 (L2) network. + * + * @summary get properties of the provided layer 2 (L2) network. + * x-ms-original-file: 2026-05-01-preview/L2Networks_Get.json + */ +async function getL2Network(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l2Networks.get("resourceGroupName", "l2NetworkName"); + console.log(result); +} + +async function main(): Promise { + await getL2Network(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListByResourceGroupSample.ts similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksListByResourceGroupSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListByResourceGroupSample.ts index 9aabf24dee47..a1988a4ba226 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of layer 2 (L2) networks in the provided resource group. + * This sample demonstrates how to get a list of layer 2 (L2) networks in the provided resource group. * - * @summary Get a list of layer 2 (L2) networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_ListByResourceGroup.json + * @summary get a list of layer 2 (L2) networks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/L2Networks_ListByResourceGroup.json */ async function listL2NetworksForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.l2Networks.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.l2Networks.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListBySubscriptionSample.ts similarity index 62% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksListBySubscriptionSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListBySubscriptionSample.ts index fd71dc952a9f..a6545e56ff25 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l2NetworksListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of layer 2 (L2) networks in the provided subscription. + * This sample demonstrates how to get a list of layer 2 (L2) networks in the provided subscription. * - * @summary Get a list of layer 2 (L2) networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L2Networks_ListBySubscription.json + * @summary get a list of layer 2 (L2) networks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/L2Networks_ListBySubscription.json */ async function listL2NetworksForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.l2Networks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksUpdateSample.ts new file mode 100644 index 000000000000..065330f3f7c1 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update tags associated with the provided layer 2 (L2) network. + * + * @summary update tags associated with the provided layer 2 (L2) network. + * x-ms-original-file: 2026-05-01-preview/L2Networks_Patch.json + */ +async function patchL2Network(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l2Networks.update("resourceGroupName", "l2NetworkName", { + l2NetworkUpdateParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); + console.log(result); +} + +async function main(): Promise { + await patchL2Network(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksCreateOrUpdateSample.ts similarity index 61% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksCreateOrUpdateSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksCreateOrUpdateSample.ts index 618734e7cc21..98ac7d05ed42 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksCreateOrUpdateSample.ts @@ -1,46 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { L3Network} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new layer 3 (L3) network or update the properties of the existing network. + * This sample demonstrates how to create a new layer 3 (L3) network or update the properties of the existing network. * - * @summary Create a new layer 3 (L3) network or update the properties of the existing network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_Create.json + * @summary create a new layer 3 (L3) network or update the properties of the existing network. + * x-ms-original-file: 2026-05-01-preview/L3Networks_Create.json */ async function createOrUpdateL3Network(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const l3NetworkParameters: L3Network = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l3Networks.createOrUpdate("resourceGroupName", "l3NetworkName", { extendedLocation: { name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", type: "CustomLocation", }, + location: "location", interfaceName: "eth0", ipAllocationType: "DualStack", ipv4ConnectedPrefix: "198.51.100.0/24", ipv6ConnectedPrefix: "2001:db8::/64", l3IsolationDomainId: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, vlan: 12, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.beginCreateOrUpdateAndWait( - resourceGroupName, - l3NetworkName, - l3NetworkParameters, - ); + tags: { key1: "myvalue1", key2: "myvalue2" }, + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksDeleteSample.ts new file mode 100644 index 000000000000..792bed3f4005 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksDeleteSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the provided layer 3 (L3) network. + * + * @summary delete the provided layer 3 (L3) network. + * x-ms-original-file: 2026-05-01-preview/L3Networks_Delete.json + */ +async function deleteL3Network(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l3Networks.delete("resourceGroupName", "l3NetworkName"); + console.log(result); +} + +async function main(): Promise { + await deleteL3Network(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksGetSample.ts new file mode 100644 index 000000000000..6fe90107ecbd --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get properties of the provided layer 3 (L3) network. + * + * @summary get properties of the provided layer 3 (L3) network. + * x-ms-original-file: 2026-05-01-preview/L3Networks_Get.json + */ +async function getL3Network(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l3Networks.get("resourceGroupName", "l3NetworkName"); + console.log(result); +} + +async function main(): Promise { + await getL3Network(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListByResourceGroupSample.ts similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksListByResourceGroupSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListByResourceGroupSample.ts index 2231fe0a8ed2..8ccb44851361 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of layer 3 (L3) networks in the provided resource group. + * This sample demonstrates how to get a list of layer 3 (L3) networks in the provided resource group. * - * @summary Get a list of layer 3 (L3) networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_ListByResourceGroup.json + * @summary get a list of layer 3 (L3) networks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/L3Networks_ListByResourceGroup.json */ async function listL3NetworksForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.l3Networks.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.l3Networks.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListBySubscriptionSample.ts similarity index 62% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksListBySubscriptionSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListBySubscriptionSample.ts index 59461dc60787..9bf5c2453976 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/l3NetworksListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of layer 3 (L3) networks in the provided subscription. + * This sample demonstrates how to get a list of layer 3 (L3) networks in the provided subscription. * - * @summary Get a list of layer 3 (L3) networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/L3Networks_ListBySubscription.json + * @summary get a list of layer 3 (L3) networks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/L3Networks_ListBySubscription.json */ async function listL3NetworksForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.l3Networks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksUpdateSample.ts new file mode 100644 index 000000000000..5a6d9659bfa3 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update tags associated with the provided layer 3 (L3) network. + * + * @summary update tags associated with the provided layer 3 (L3) network. + * x-ms-original-file: 2026-05-01-preview/L3Networks_Patch.json + */ +async function patchL3Network(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.l3Networks.update("resourceGroupName", "l3NetworkName", { + l3NetworkUpdateParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); + console.log(result); +} + +async function main(): Promise { + await patchL3Network(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..b6359cc6023e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsCreateOrUpdateSample.ts @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create new or update the existing metrics configuration of the provided cluster. + * + * @summary create new or update the existing metrics configuration of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Create.json + */ +async function createOrUpdateMetricsConfigurationOfCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.metricsConfigurations.createOrUpdate( + "resourceGroupName", + "clusterName", + "default", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + collectionInterval: 15, + enabledMetrics: ["metric1", "metric2"], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateMetricsConfigurationOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsDeleteSample.ts new file mode 100644 index 000000000000..de450ae5aa9f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsDeleteSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the metrics configuration of the provided cluster. + * + * @summary delete the metrics configuration of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Delete.json + */ +async function deleteMetricsConfigurationOfCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.metricsConfigurations.delete( + "resourceGroupName", + "clusterName", + "default", + ); + console.log(result); +} + +async function main(): Promise { + await deleteMetricsConfigurationOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsGetSample.ts new file mode 100644 index 000000000000..1c6786ae421d --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsGetSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get metrics configuration of the provided cluster. + * + * @summary get metrics configuration of the provided cluster. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Get.json + */ +async function getMetricsConfigurationOfCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.metricsConfigurations.get( + "resourceGroupName", + "clusterName", + "default", + ); + console.log(result); +} + +async function main(): Promise { + await getMetricsConfigurationOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsListByClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsListByClusterSample.ts similarity index 54% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsListByClusterSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsListByClusterSample.ts index 5553dc3315fc..3af267d23200 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/metricsConfigurationsListByClusterSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsListByClusterSample.ts @@ -3,30 +3,25 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of metrics configurations for the provided cluster. + * This sample demonstrates how to get a list of metrics configurations for the provided cluster. * - * @summary Get a list of metrics configurations for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/ClusterMetricsConfigurations_ListByCluster.json + * @summary get a list of metrics configurations for the provided cluster. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_ListByCluster.json */ async function listMetricsConfigurationsOfTheCluster(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.metricsConfigurations.listByCluster( - resourceGroupName, - clusterName, + "resourceGroupName", + "clusterName", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsUpdateSample.ts new file mode 100644 index 000000000000..7c532bc00cd7 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsUpdateSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. + * + * @summary patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/ClusterMetricsConfigurations_Patch.json + */ +async function patchMetricsConfigurationOfCluster(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.metricsConfigurations.update( + "resourceGroupName", + "clusterName", + "default", + { + metricsConfigurationUpdateParameters: { + collectionInterval: 15, + enabledMetrics: ["metric1", "metric2"], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await patchMetricsConfigurationOfCluster(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/operationsListSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/operationsListSample.ts similarity index 53% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/operationsListSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/operationsListSample.ts index 80d3e84ced11..48b1fc1325d1 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/operationsListSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/operationsListSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of all available resource provider operations. It contains a URL link to get the next set of results. + * This sample demonstrates how to list the operations for the provider * - * @summary Get a list of all available resource provider operations. It contains a URL link to get the next set of results. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Operations_List.json + * @summary list the operations for the provider + * x-ms-original-file: 2026-05-01-preview/Operations_List.json */ async function listResourceProviderOperations(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.operations.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusGetSample.ts new file mode 100644 index 000000000000..900e7ec7d930 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the properties of the provided rack SKU. + * + * @summary get the properties of the provided rack SKU. + * x-ms-original-file: 2026-05-01-preview/RackSkus_Get.json + */ +async function getRackSKUResource(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.rackSkus.get("rackSkuName"); + console.log(result); +} + +async function main(): Promise { + await getRackSKUResource(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/rackSkusListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusListBySubscriptionSample.ts similarity index 52% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/rackSkusListBySubscriptionSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusListBySubscriptionSample.ts index 4d6cd3596a0e..f68241ad55ce 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/rackSkusListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusListBySubscriptionSample.ts @@ -3,29 +3,27 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of rack SKUs in the provided subscription. + * This sample demonstrates how to get a list of rack SKUs in the provided subscription. * - * @summary Get a list of rack SKUs in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/RackSkus_ListBySubscription.json + * @summary get a list of rack SKUs in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/RackSkus_ListBySubscription.json */ -async function listRackSkUsForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; +async function listRackSKUsForSubscription(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.rackSkus.listBySubscription()) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await listRackSkUsForSubscription(); + await listRackSKUsForSubscription(); } main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksCreateOrUpdateSample.ts similarity index 63% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksCreateOrUpdateSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksCreateOrUpdateSample.ts index 8db6de5a4ed3..5ef7759e12bb 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksCreateOrUpdateSample.ts @@ -1,44 +1,32 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { Rack} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * This sample demonstrates how to create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. * - * @summary Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Create.json + * @summary create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/Racks_Create.json */ async function createOrUpdateRack(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const rackParameters: Rack = { - availabilityZone: "1", + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.racks.createOrUpdate("resourceGroupName", "rackName", { extendedLocation: { name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", type: "CustomLocation", }, location: "location", + availabilityZone: "1", rackLocation: "Rack 28", rackSerialNumber: "RACK_SERIAL_NUMBER", rackSkuId: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginCreateOrUpdateAndWait( - resourceGroupName, - rackName, - rackParameters, - ); + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksDeleteSample.ts similarity index 51% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksDeleteSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksDeleteSample.ts index dc19d9b27f61..160c2b343a3f 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * This sample demonstrates how to delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. * - * @summary Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_Delete.json + * @summary delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/Racks_Delete.json */ async function deleteRack(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginDeleteAndWait( - resourceGroupName, - rackName, - ); + const result = await client.racks.delete("resourceGroupName", "rackName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksGetSample.ts new file mode 100644 index 000000000000..4403eebfd4df --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get properties of the provided rack. + * + * @summary get properties of the provided rack. + * x-ms-original-file: 2026-05-01-preview/Racks_Get.json + */ +async function getRack(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.racks.get("resourceGroupName", "rackName"); + console.log(result); +} + +async function main(): Promise { + await getRack(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListByResourceGroupSample.ts new file mode 100644 index 000000000000..1cb255126dbf --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListByResourceGroupSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a list of racks in the provided resource group. + * + * @summary get a list of racks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/Racks_ListByResourceGroup.json + */ +async function listRacksForResourceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.racks.listByResourceGroup("resourceGroupName")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listRacksForResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListBySubscriptionSample.ts similarity index 61% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksListBySubscriptionSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListBySubscriptionSample.ts index 9d77d4579a40..2832922f9efa 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/racksListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of racks in the provided subscription. + * This sample demonstrates how to get a list of racks in the provided subscription. * - * @summary Get a list of racks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Racks_ListBySubscription.json + * @summary get a list of racks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/Racks_ListBySubscription.json */ async function listRacksForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.racks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksUpdateSample.ts new file mode 100644 index 000000000000..0193d70459e8 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. + * + * @summary patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/Racks_Patch.json + */ +async function patchRack(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.racks.update("resourceGroupName", "rackName", { + rackUpdateParameters: { + rackLocation: "Rack 2B", + rackSerialNumber: "RACK_SERIAL_NUMBER", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +async function main(): Promise { + await patchRack(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..c3923183212e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesCreateOrUpdateSample.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * + * @summary create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Create.json + */ +async function createOrUpdateStorageAppliance(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.storageAppliances.createOrUpdate( + "resourceGroupName", + "storageApplianceName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + administratorCredentials: { password: "{password}", username: "adminUser" }, + rackId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", + rackSlot: 1, + serialNumber: "BM1219XXX", + storageApplianceSkuId: "684E-3B16-399E", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateStorageAppliance(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDeleteSample.ts similarity index 50% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesDeleteSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDeleteSample.ts index f57ca4d3e344..6c74013a79e7 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesDeleteSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDeleteSample.ts @@ -3,27 +3,18 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * This sample demonstrates how to delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. * - * @summary Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_Delete.json + * @summary delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Delete.json */ async function deleteStorageAppliance(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginDeleteAndWait( - resourceGroupName, - storageApplianceName, - ); + const result = await client.storageAppliances.delete("resourceGroupName", "storageApplianceName"); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDisableRemoteVendorManagementSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDisableRemoteVendorManagementSample.ts new file mode 100644 index 000000000000..758c1c22d334 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDisableRemoteVendorManagementSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to disable remote vendor management of the provided storage appliance. + * + * @summary disable remote vendor management of the provided storage appliance. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_DisableRemoteVendorManagement.json + */ +async function turnOffRemoteVendorManagementForStorageAppliance(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.storageAppliances.disableRemoteVendorManagement( + "resourceGroupName", + "storageApplianceName", + ); + console.log(result); +} + +async function main(): Promise { + await turnOffRemoteVendorManagementForStorageAppliance(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesEnableRemoteVendorManagementSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesEnableRemoteVendorManagementSample.ts new file mode 100644 index 000000000000..a6a014b1b59e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesEnableRemoteVendorManagementSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to enable remote vendor management of the provided storage appliance. + * + * @summary enable remote vendor management of the provided storage appliance. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_EnableRemoteVendorManagement.json + */ +async function turnOnRemoteVendorManagementForStorageAppliance(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.storageAppliances.enableRemoteVendorManagement( + "resourceGroupName", + "storageApplianceName", + { + storageApplianceEnableRemoteVendorManagementParameters: { supportEndpoints: ["10.0.0.0/24"] }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await turnOnRemoteVendorManagementForStorageAppliance(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesGetSample.ts new file mode 100644 index 000000000000..a3a0868ecff3 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get properties of the provided storage appliance. + * + * @summary get properties of the provided storage appliance. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Get.json + */ +async function getStorageAppliance(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.storageAppliances.get("resourceGroupName", "storageApplianceName"); + console.log(result); +} + +async function main(): Promise { + await getStorageAppliance(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListByResourceGroupSample.ts similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesListByResourceGroupSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListByResourceGroupSample.ts index a1618fc429c4..9083a4ef75d9 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of storage appliances in the provided resource group. + * This sample demonstrates how to get a list of storage appliances in the provided resource group. * - * @summary Get a list of storage appliances in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_ListByResourceGroup.json + * @summary get a list of storage appliances in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_ListByResourceGroup.json */ async function listStorageAppliancesForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.storageAppliances.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.storageAppliances.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListBySubscriptionSample.ts similarity index 62% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesListBySubscriptionSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListBySubscriptionSample.ts index 5bf07998a8cd..64ded566095d 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/storageAppliancesListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of storage appliances in the provided subscription. + * This sample demonstrates how to get a list of storage appliances in the provided subscription. * - * @summary Get a list of storage appliances in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/StorageAppliances_ListBySubscription.json + * @summary get a list of storage appliances in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_ListBySubscription.json */ async function listStorageAppliancesForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.storageAppliances.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesRunReadCommandsSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesRunReadCommandsSample.ts new file mode 100644 index 000000000000..a5c0ff54468a --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesRunReadCommandsSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to run one or more read-only commands on the provided storage appliance. + * + * @summary run one or more read-only commands on the provided storage appliance. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_RunReadCommands.json + */ +async function runAndRetrieveOutputFromReadOnlyCommandsOnStorageAppliance(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.storageAppliances.runReadCommands( + "resourceGroupName", + "storageApplianceName", + { + commands: [{ arguments: ["list", "--filter", "state='open'"], command: "purealert" }], + limitTimeSeconds: 60, + }, + ); + console.log(result); +} + +async function main(): Promise { + await runAndRetrieveOutputFromReadOnlyCommandsOnStorageAppliance(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesUpdateSample.ts new file mode 100644 index 000000000000..6f198c9dfdf1 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesUpdateSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. + * + * @summary update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. + * x-ms-original-file: 2026-05-01-preview/StorageAppliances_Patch.json + */ +async function patchStorageAppliance(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.storageAppliances.update( + "resourceGroupName", + "storageApplianceName", + { + storageApplianceUpdateParameters: { + serialNumber: "BM1219XXX", + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await patchStorageAppliance(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksCreateOrUpdateSample.ts new file mode 100644 index 000000000000..0007a0fad270 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksCreateOrUpdateSample.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a new trunked network or update the properties of the existing trunked network. + * + * @summary create a new trunked network or update the properties of the existing trunked network. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Create.json + */ +async function createOrUpdateTrunkedNetwork(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.trunkedNetworks.createOrUpdate( + "resourceGroupName", + "trunkedNetworkName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + location: "location", + interfaceName: "eth0", + isolationDomainIds: [ + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", + ], + vlans: [12, 14], + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateTrunkedNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksDeleteSample.ts new file mode 100644 index 000000000000..15fdbe48e5bb --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksDeleteSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the provided trunked network. + * + * @summary delete the provided trunked network. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Delete.json + */ +async function deleteTrunkedNetwork(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.trunkedNetworks.delete("resourceGroupName", "trunkedNetworkName"); + console.log(result); +} + +async function main(): Promise { + await deleteTrunkedNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksGetSample.ts new file mode 100644 index 000000000000..cac1e40a6d3c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get properties of the provided trunked network. + * + * @summary get properties of the provided trunked network. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Get.json + */ +async function getTrunkedNetwork(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.trunkedNetworks.get("resourceGroupName", "trunkedNetworkName"); + console.log(result); +} + +async function main(): Promise { + await getTrunkedNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListByResourceGroupSample.ts similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksListByResourceGroupSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListByResourceGroupSample.ts index 801dc49a7421..9e25e194f910 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of trunked networks in the provided resource group. + * This sample demonstrates how to get a list of trunked networks in the provided resource group. * - * @summary Get a list of trunked networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_ListByResourceGroup.json + * @summary get a list of trunked networks in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_ListByResourceGroup.json */ async function listTrunkedNetworksForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.trunkedNetworks.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.trunkedNetworks.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListBySubscriptionSample.ts similarity index 62% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksListBySubscriptionSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListBySubscriptionSample.ts index 34edfd280514..d8d0dd798836 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/trunkedNetworksListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of trunked networks in the provided subscription. + * This sample demonstrates how to get a list of trunked networks in the provided subscription. * - * @summary Get a list of trunked networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/TrunkedNetworks_ListBySubscription.json + * @summary get a list of trunked networks in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_ListBySubscription.json */ async function listTrunkedNetworksForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.trunkedNetworks.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksUpdateSample.ts new file mode 100644 index 000000000000..0dcd5b530eaa --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update tags associated with the provided trunked network. + * + * @summary update tags associated with the provided trunked network. + * x-ms-original-file: 2026-05-01-preview/TrunkedNetworks_Patch.json + */ +async function patchTrunkedNetwork(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.trunkedNetworks.update("resourceGroupName", "trunkedNetworkName", { + trunkedNetworkUpdateParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); + console.log(result); +} + +async function main(): Promise { + await patchTrunkedNetwork(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesAssignRelaySample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesAssignRelaySample.ts new file mode 100644 index 000000000000..930d26255d3e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesAssignRelaySample.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. + * + * @summary assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_AssignRelay.json + */ +async function assignRelayToTheMicrosoftHybridComputeMachineForAVirtualMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.assignRelay( + "resourceGroupName", + "virtualMachineName", + { + virtualMachineAssignRelayParameters: { + machineId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.HybridCompute/machines/machineName", + relayType: "Platform", + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await assignRelayToTheMicrosoftHybridComputeMachineForAVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesCreateOrUpdateSample.ts new file mode 100644 index 000000000000..c8d81143cada --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesCreateOrUpdateSample.ts @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create a new virtual machine or update the properties of the existing virtual machine. + * + * @summary create a new virtual machine or update the properties of the existing virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Create.json + */ +async function createOrUpdateVirtualMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.createOrUpdate( + "resourceGroupName", + "virtualMachineName", + { + extendedLocation: { + name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", + type: "CustomLocation", + }, + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + }, + }, + location: "location", + adminUsername: "username", + bootMethod: "UEFI", + cloudServicesNetworkAttachment: { + attachedNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", + ipAllocationMethod: "Dynamic", + }, + cpuCores: 2, + memorySizeGB: 8, + networkAttachments: [ + { + attachedNetworkId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", + defaultGateway: "True", + ipAllocationMethod: "Dynamic", + ipv4Address: "198.51.100.1", + ipv6Address: "2001:0db8:0000:0000:0000:0000:0000:0000", + networkAttachmentName: "netAttachName01", + }, + ], + networkDataContent: "bmV0d29ya0RhdGVTYW1wbGU=", + placementHints: [ + { + hintType: "Affinity", + resourceId: + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", + schedulingExecution: "Hard", + scope: "", + }, + ], + sshPublicKeys: [ + { + keyData: + "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", + }, + ], + storageProfile: { + osDisk: { createOption: "Ephemeral", deleteOption: "Delete", diskSizeGB: 120 }, + volumeAttachments: [ + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName", + ], + }, + userDataContent: "dXNlckRhdGVTYW1wbGU=", + vmDeviceModel: "T2", + vmImage: "myacr.azurecr.io/foobar:latest", + vmImageRepositoryCredentials: { + password: "{password}", + registryUrl: "myacr.azurecr.io", + username: "myuser", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await createOrUpdateVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesDeleteSample.ts new file mode 100644 index 000000000000..4da589bc5903 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesDeleteSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the provided virtual machine. + * + * @summary delete the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Delete.json + */ +async function deleteVirtualMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.delete("resourceGroupName", "virtualMachineName"); + console.log(result); +} + +async function main(): Promise { + await deleteVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesGetSample.ts new file mode 100644 index 000000000000..defea4835113 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get properties of the provided virtual machine. + * + * @summary get properties of the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Get.json + */ +async function getVirtualMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.get("resourceGroupName", "virtualMachineName"); + console.log(result); +} + +async function main(): Promise { + await getVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListByResourceGroupSample.ts similarity index 55% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesListByResourceGroupSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListByResourceGroupSample.ts index ab8b11f70219..b3211e4a70da 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesListByResourceGroupSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListByResourceGroupSample.ts @@ -3,28 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of virtual machines in the provided resource group. + * This sample demonstrates how to get a list of virtual machines in the provided resource group. * - * @summary Get a list of virtual machines in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_ListByResourceGroup.json + * @summary get a list of virtual machines in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_ListByResourceGroup.json */ async function listVirtualMachinesForResourceGroup(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.virtualMachines.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.virtualMachines.listByResourceGroup("resourceGroupName")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListBySubscriptionSample.ts similarity index 62% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesListBySubscriptionSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListBySubscriptionSample.ts index d371d6804330..2192fdadca4f 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/virtualMachinesListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of virtual machines in the provided subscription. + * This sample demonstrates how to get a list of virtual machines in the provided subscription. * - * @summary Get a list of virtual machines in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/VirtualMachines_ListBySubscription.json + * @summary get a list of virtual machines in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_ListBySubscription.json */ async function listVirtualMachinesForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.virtualMachines.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesPowerOffSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesPowerOffSample.ts new file mode 100644 index 000000000000..e4241a795c97 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesPowerOffSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to power off the provided virtual machine. + * + * @summary power off the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_PowerOff.json + */ +async function powerOffVirtualMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.powerOff("resourceGroupName", "virtualMachineName", { + virtualMachinePowerOffParameters: { skipShutdown: "True" }, + }); + console.log(result); +} + +async function main(): Promise { + await powerOffVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesReimageSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesReimageSample.ts new file mode 100644 index 000000000000..e6f830320d3c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesReimageSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to reimage the provided virtual machine. + * + * @summary reimage the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Reimage.json + */ +async function reimageVirtualMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.reimage("resourceGroupName", "virtualMachineName"); + console.log(result); +} + +async function main(): Promise { + await reimageVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesRestartSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesRestartSample.ts new file mode 100644 index 000000000000..f8228bda48ca --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesRestartSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to restart the provided virtual machine. + * + * @summary restart the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Restart.json + */ +async function restartVirtualMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.restart("resourceGroupName", "virtualMachineName"); + console.log(result); +} + +async function main(): Promise { + await restartVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesStartSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesStartSample.ts new file mode 100644 index 000000000000..128b32f4cae9 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesStartSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to start the provided virtual machine. + * + * @summary start the provided virtual machine. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Start.json + */ +async function startVirtualMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.start("resourceGroupName", "virtualMachineName"); + console.log(result); +} + +async function main(): Promise { + await startVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesUpdateSample.ts new file mode 100644 index 000000000000..bdea6add8d0b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesUpdateSample.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to 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. + * + * @summary 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. + * x-ms-original-file: 2026-05-01-preview/VirtualMachines_Patch.json + */ +async function patchVirtualMachine(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.virtualMachines.update("resourceGroupName", "virtualMachineName", { + virtualMachineUpdateParameters: { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1": + {}, + }, + }, + vmImageRepositoryCredentials: { + password: "{password}", + registryUrl: "myacr.azurecr.io", + username: "myuser", + }, + tags: { key1: "myvalue1", key2: "myvalue2" }, + }, + }); + console.log(result); +} + +async function main(): Promise { + await patchVirtualMachine(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesCreateOrUpdateSample.ts similarity index 54% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesCreateOrUpdateSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesCreateOrUpdateSample.ts index 35201771d498..334569695105 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesCreateOrUpdateSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesCreateOrUpdateSample.ts @@ -1,25 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { Volume} from "@azure/arm-networkcloud"; import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Create a new volume or update the properties of the existing one. + * This sample demonstrates how to create a new volume or update the properties of the existing one. * - * @summary Create a new volume or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_Create.json + * @summary create a new volume or update the properties of the existing one. + * x-ms-original-file: 2026-05-01-preview/Volumes_Create.json */ async function createOrUpdateVolume(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const volumeParameters: Volume = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.volumes.createOrUpdate("resourceGroupName", "volumeName", { extendedLocation: { name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", type: "CustomLocation", @@ -27,16 +22,9 @@ async function createOrUpdateVolume(): Promise { location: "location", sizeMiB: 1048576, storageApplianceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/StorageAppliances/storageApplianceName", + "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/storageAppliances/storageApplianceName", tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.beginCreateOrUpdateAndWait( - resourceGroupName, - volumeName, - volumeParameters, - ); + }); console.log(result); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesDeleteSample.ts new file mode 100644 index 000000000000..bddd2cb1097e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesDeleteSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete the provided volume. + * + * @summary delete the provided volume. + * x-ms-original-file: 2026-05-01-preview/Volumes_Delete.json + */ +async function deleteVolume(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.volumes.delete("resourceGroupName", "volumeName"); + console.log(result); +} + +async function main(): Promise { + await deleteVolume(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesGetSample.ts new file mode 100644 index 000000000000..baa7f93d5dc6 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get properties of the provided volume. + * + * @summary get properties of the provided volume. + * x-ms-original-file: 2026-05-01-preview/Volumes_Get.json + */ +async function getVolume(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.volumes.get("resourceGroupName", "volumeName"); + console.log(result); +} + +async function main(): Promise { + await getVolume(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListByResourceGroupSample.ts new file mode 100644 index 000000000000..a6cd0cd208cc --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListByResourceGroupSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get a list of volumes in the provided resource group. + * + * @summary get a list of volumes in the provided resource group. + * x-ms-original-file: 2026-05-01-preview/Volumes_ListByResourceGroup.json + */ +async function listVolumesForResourceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.volumes.listByResourceGroup("resourceGroupName")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listVolumesForResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListBySubscriptionSample.ts similarity index 61% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesListBySubscriptionSample.ts rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListBySubscriptionSample.ts index 5906d8a9ca4c..773a16c2b918 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/src/volumesListBySubscriptionSample.ts +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListBySubscriptionSample.ts @@ -3,24 +3,22 @@ import { NetworkCloud } from "@azure/arm-networkcloud"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; /** - * This sample demonstrates how to Get a list of volumes in the provided subscription. + * This sample demonstrates how to get a list of volumes in the provided subscription. * - * @summary Get a list of volumes in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/examples/Volumes_ListBySubscription.json + * @summary get a list of volumes in the provided subscription. + * x-ms-original-file: 2026-05-01-preview/Volumes_ListBySubscription.json */ async function listVolumeForSubscription(): Promise { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; const client = new NetworkCloud(credential, subscriptionId); const resArray = new Array(); for await (const item of client.volumes.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesUpdateSample.ts new file mode 100644 index 000000000000..8fefce6625fb --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "@azure/arm-networkcloud"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update tags associated with the provided volume. + * + * @summary update tags associated with the provided volume. + * x-ms-original-file: 2026-05-01-preview/Volumes_Patch.json + */ +async function patchVolume(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "123e4567-e89b-12d3-a456-426655440000"; + const client = new NetworkCloud(credential, subscriptionId); + const result = await client.volumes.update("resourceGroupName", "volumeName", { + volumeUpdateParameters: { tags: { key1: "myvalue1", key2: "myvalue2" } }, + }); + console.log(result); +} + +async function main(): Promise { + await patchVolume(); +} + +main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/tsconfig.json b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/tsconfig.json similarity index 68% rename from sdk/networkcloud/arm-networkcloud/samples/v1/typescript/tsconfig.json rename to sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/tsconfig.json index 400db87cf648..9827716ed8f9 100644 --- a/sdk/networkcloud/arm-networkcloud/samples/v1/typescript/tsconfig.json +++ b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/tsconfig.json @@ -2,17 +2,20 @@ "compilerOptions": { "target": "ES2023", "module": "commonjs", - "lib": [], + "lib": [ + "ESNext" + ], "importHelpers": true, - "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, - "moduleResolution": "node10", - "esModuleInterop": true, + "types": [ + "node" + ], "outDir": "./dist", - "resolveJsonModule": true + "resolveJsonModule": true, + "moduleResolution": "node10" }, "include": [ "./src" diff --git a/sdk/networkcloud/arm-networkcloud/src/api/accessBridges/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/accessBridges/index.ts new file mode 100644 index 000000000000..8c84e6ca99fa --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/accessBridges/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + AccessBridgesListBySubscriptionOptionalParams, + AccessBridgesListByResourceGroupOptionalParams, + AccessBridgesDeleteOptionalParams, + AccessBridgesUpdateOptionalParams, + AccessBridgesCreateOrUpdateOptionalParams, + AccessBridgesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/accessBridges/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/accessBridges/operations.ts new file mode 100644 index 000000000000..f9ee6228543c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/accessBridges/operations.ts @@ -0,0 +1,373 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + AccessBridge, + accessBridgeSerializer, + accessBridgeDeserializer, + AccessBridgeAllowedName, + accessBridgePatchParametersSerializer, + OperationStatusResult, + operationStatusResultDeserializer, + _AccessBridgeList, + _accessBridgeListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + AccessBridgesListBySubscriptionOptionalParams, + AccessBridgesListByResourceGroupOptionalParams, + AccessBridgesDeleteOptionalParams, + AccessBridgesUpdateOptionalParams, + AccessBridgesCreateOrUpdateOptionalParams, + AccessBridgesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listBySubscriptionSend( + context: Client, + options: AccessBridgesListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/accessBridges{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_AccessBridgeList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _accessBridgeListDeserializer(result.body); +} + +/** Get a list of access bridges in the provided subscription. */ +export function listBySubscription( + context: Client, + options: AccessBridgesListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: AccessBridgesListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_AccessBridgeList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _accessBridgeListDeserializer(result.body); +} + +/** Get a list of access bridges in the provided resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: AccessBridgesListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options: AccessBridgesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + accessBridgeName: accessBridgeName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the specified access bridge. */ +export function $delete( + context: Client, + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options: AccessBridgesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, accessBridgeName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options: AccessBridgesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + accessBridgeName: accessBridgeName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["accessBridgeUpdateParameters"] + ? options["accessBridgeUpdateParameters"] + : accessBridgePatchParametersSerializer(options["accessBridgeUpdateParameters"]), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return accessBridgeDeserializer(result.body); +} + +/** Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and tag updates can be done independently. */ +export function update( + context: Client, + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options: AccessBridgesUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, AccessBridge> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _updateSend(context, resourceGroupName, accessBridgeName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, AccessBridge>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + accessBridge: AccessBridge, + options: AccessBridgesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + accessBridgeName: accessBridgeName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: accessBridgeSerializer(accessBridge), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return accessBridgeDeserializer(result.body); +} + +/** Create a new access bridge or update the properties of the existing access bridge. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + accessBridge: AccessBridge, + options: AccessBridgesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, AccessBridge> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, accessBridgeName, accessBridge, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, AccessBridge>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options: AccessBridgesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + accessBridgeName: accessBridgeName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return accessBridgeDeserializer(result.body); +} + +/** Get the properties of the provided access bridge. */ +export async function get( + context: Client, + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options: AccessBridgesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, accessBridgeName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/accessBridges/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/accessBridges/options.ts new file mode 100644 index 000000000000..6c2460b6f881 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/accessBridges/options.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AccessBridgePatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AccessBridgesListBySubscriptionOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface AccessBridgesListByResourceGroupOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface AccessBridgesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface AccessBridgesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + accessBridgeUpdateParameters?: AccessBridgePatchParameters; +} + +/** Optional parameters. */ +export interface AccessBridgesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface AccessBridgesGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/agentPools/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/agentPools/index.ts new file mode 100644 index 000000000000..16f72cda4c8b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/agentPools/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByKubernetesCluster, $delete, update, createOrUpdate, get } from "./operations.js"; +export type { + AgentPoolsListByKubernetesClusterOptionalParams, + AgentPoolsDeleteOptionalParams, + AgentPoolsUpdateOptionalParams, + AgentPoolsCreateOrUpdateOptionalParams, + AgentPoolsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/agentPools/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/agentPools/operations.ts new file mode 100644 index 000000000000..d4a061cbe479 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/agentPools/operations.ts @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + AgentPool, + agentPoolSerializer, + agentPoolDeserializer, + agentPoolPatchParametersSerializer, + _AgentPoolList, + _agentPoolListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + AgentPoolsListByKubernetesClusterOptionalParams, + AgentPoolsDeleteOptionalParams, + AgentPoolsUpdateOptionalParams, + AgentPoolsCreateOrUpdateOptionalParams, + AgentPoolsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByKubernetesClusterSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + options: AgentPoolsListByKubernetesClusterOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByKubernetesClusterDeserialize( + result: PathUncheckedResponse, +): Promise<_AgentPoolList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _agentPoolListDeserializer(result.body); +} + +/** Get a list of agent pools for the provided Kubernetes cluster. */ +export function listByKubernetesCluster( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + options: AgentPoolsListByKubernetesClusterOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByKubernetesClusterSend(context, resourceGroupName, kubernetesClusterName, options), + _listByKubernetesClusterDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options: AgentPoolsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + agentPoolName: agentPoolName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided Kubernetes cluster agent pool. */ +export function $delete( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options: AgentPoolsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, kubernetesClusterName, agentPoolName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options: AgentPoolsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + agentPoolName: agentPoolName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["agentPoolUpdateParameters"] + ? options["agentPoolUpdateParameters"] + : agentPoolPatchParametersSerializer(options["agentPoolUpdateParameters"]), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return agentPoolDeserializer(result.body); +} + +/** 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. */ +export function update( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options: AgentPoolsUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, AgentPool> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, kubernetesClusterName, agentPoolName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, AgentPool>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + agentPoolParameters: AgentPool, + options: AgentPoolsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + agentPoolName: agentPoolName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: agentPoolSerializer(agentPoolParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return agentPoolDeserializer(result.body); +} + +/** Create a new Kubernetes cluster agent pool or update the properties of the existing one. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + agentPoolParameters: AgentPool, + options: AgentPoolsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, AgentPool> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + kubernetesClusterName, + agentPoolName, + agentPoolParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, AgentPool>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options: AgentPoolsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + agentPoolName: agentPoolName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return agentPoolDeserializer(result.body); +} + +/** Get properties of the provided Kubernetes cluster agent pool. */ +export async function get( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options: AgentPoolsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + kubernetesClusterName, + agentPoolName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/agentPools/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/agentPools/options.ts new file mode 100644 index 000000000000..79fe9f8fe2d4 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/agentPools/options.ts @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AgentPoolPatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AgentPoolsListByKubernetesClusterOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface AgentPoolsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface AgentPoolsUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + agentPoolUpdateParameters?: AgentPoolPatchParameters; +} + +/** Optional parameters. */ +export interface AgentPoolsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface AgentPoolsGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachineKeySets/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachineKeySets/index.ts new file mode 100644 index 000000000000..6c62975c8dd1 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachineKeySets/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByCluster, $delete, update, createOrUpdate, get } from "./operations.js"; +export type { + BareMetalMachineKeySetsListByClusterOptionalParams, + BareMetalMachineKeySetsDeleteOptionalParams, + BareMetalMachineKeySetsUpdateOptionalParams, + BareMetalMachineKeySetsCreateOrUpdateOptionalParams, + BareMetalMachineKeySetsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachineKeySets/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachineKeySets/operations.ts new file mode 100644 index 000000000000..a00216a73a92 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachineKeySets/operations.ts @@ -0,0 +1,358 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + BareMetalMachineKeySet, + bareMetalMachineKeySetSerializer, + bareMetalMachineKeySetDeserializer, + bareMetalMachineKeySetPatchParametersSerializer, + _BareMetalMachineKeySetList, + _bareMetalMachineKeySetListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + BareMetalMachineKeySetsListByClusterOptionalParams, + BareMetalMachineKeySetsDeleteOptionalParams, + BareMetalMachineKeySetsUpdateOptionalParams, + BareMetalMachineKeySetsCreateOrUpdateOptionalParams, + BareMetalMachineKeySetsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByClusterSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: BareMetalMachineKeySetsListByClusterOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByClusterDeserialize( + result: PathUncheckedResponse, +): Promise<_BareMetalMachineKeySetList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _bareMetalMachineKeySetListDeserializer(result.body); +} + +/** Get a list of bare metal machine key sets for the provided cluster. */ +export function listByCluster( + context: Client, + resourceGroupName: string, + clusterName: string, + options: BareMetalMachineKeySetsListByClusterOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByClusterSend(context, resourceGroupName, clusterName, options), + _listByClusterDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options: BareMetalMachineKeySetsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + bareMetalMachineKeySetName: bareMetalMachineKeySetName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the bare metal machine key set of the provided cluster. */ +export function $delete( + context: Client, + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options: BareMetalMachineKeySetsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, clusterName, bareMetalMachineKeySetName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options: BareMetalMachineKeySetsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + bareMetalMachineKeySetName: bareMetalMachineKeySetName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["bareMetalMachineKeySetUpdateParameters"] + ? options["bareMetalMachineKeySetUpdateParameters"] + : bareMetalMachineKeySetPatchParametersSerializer( + options["bareMetalMachineKeySetUpdateParameters"], + ), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return bareMetalMachineKeySetDeserializer(result.body); +} + +/** 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. */ +export function update( + context: Client, + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options: BareMetalMachineKeySetsUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, BareMetalMachineKeySet> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, clusterName, bareMetalMachineKeySetName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, BareMetalMachineKeySet>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + bareMetalMachineKeySetParameters: BareMetalMachineKeySet, + options: BareMetalMachineKeySetsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + bareMetalMachineKeySetName: bareMetalMachineKeySetName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: bareMetalMachineKeySetSerializer(bareMetalMachineKeySetParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return bareMetalMachineKeySetDeserializer(result.body); +} + +/** Create a new bare metal machine key set or update the existing one for the provided cluster. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + bareMetalMachineKeySetParameters: BareMetalMachineKeySet, + options: BareMetalMachineKeySetsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, BareMetalMachineKeySet> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + clusterName, + bareMetalMachineKeySetName, + bareMetalMachineKeySetParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, BareMetalMachineKeySet>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options: BareMetalMachineKeySetsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + bareMetalMachineKeySetName: bareMetalMachineKeySetName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return bareMetalMachineKeySetDeserializer(result.body); +} + +/** Get bare metal machine key set of the provided cluster. */ +export async function get( + context: Client, + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options: BareMetalMachineKeySetsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + clusterName, + bareMetalMachineKeySetName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachineKeySets/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachineKeySets/options.ts new file mode 100644 index 000000000000..375521c28d4d --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachineKeySets/options.ts @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { BareMetalMachineKeySetPatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface BareMetalMachineKeySetsListByClusterOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface BareMetalMachineKeySetsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface BareMetalMachineKeySetsUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + bareMetalMachineKeySetUpdateParameters?: BareMetalMachineKeySetPatchParameters; +} + +/** Optional parameters. */ +export interface BareMetalMachineKeySetsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface BareMetalMachineKeySetsGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachines/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachines/index.ts new file mode 100644 index 000000000000..0118519d980a --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachines/index.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + uncordon, + start, + runReadCommands, + runDataExtractsRestricted, + runDataExtracts, + runCommand, + restart, + replace, + reimage, + powerOff, + cordon, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + BareMetalMachinesUncordonOptionalParams, + BareMetalMachinesStartOptionalParams, + BareMetalMachinesRunReadCommandsOptionalParams, + BareMetalMachinesRunDataExtractsRestrictedOptionalParams, + BareMetalMachinesRunDataExtractsOptionalParams, + BareMetalMachinesRunCommandOptionalParams, + BareMetalMachinesRestartOptionalParams, + BareMetalMachinesReplaceOptionalParams, + BareMetalMachinesReimageOptionalParams, + BareMetalMachinesPowerOffOptionalParams, + BareMetalMachinesCordonOptionalParams, + BareMetalMachinesListBySubscriptionOptionalParams, + BareMetalMachinesListByResourceGroupOptionalParams, + BareMetalMachinesDeleteOptionalParams, + BareMetalMachinesUpdateOptionalParams, + BareMetalMachinesCreateOrUpdateOptionalParams, + BareMetalMachinesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachines/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachines/operations.ts new file mode 100644 index 000000000000..f8bfe64f7b37 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachines/operations.ts @@ -0,0 +1,1060 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + BareMetalMachine, + bareMetalMachineSerializer, + bareMetalMachineDeserializer, + bareMetalMachinePatchParametersSerializer, + _BareMetalMachineList, + _bareMetalMachineListDeserializer, + bareMetalMachineCordonParametersSerializer, + bareMetalMachinePowerOffParametersSerializer, + bareMetalMachineReimageParametersSerializer, + bareMetalMachineReplaceParametersSerializer, + BareMetalMachineRunCommandParameters, + bareMetalMachineRunCommandParametersSerializer, + BareMetalMachineRunDataExtractsParameters, + bareMetalMachineRunDataExtractsParametersSerializer, + BareMetalMachineRunReadCommandsParameters, + bareMetalMachineRunReadCommandsParametersSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + BareMetalMachinesUncordonOptionalParams, + BareMetalMachinesStartOptionalParams, + BareMetalMachinesRunReadCommandsOptionalParams, + BareMetalMachinesRunDataExtractsRestrictedOptionalParams, + BareMetalMachinesRunDataExtractsOptionalParams, + BareMetalMachinesRunCommandOptionalParams, + BareMetalMachinesRestartOptionalParams, + BareMetalMachinesReplaceOptionalParams, + BareMetalMachinesReimageOptionalParams, + BareMetalMachinesPowerOffOptionalParams, + BareMetalMachinesCordonOptionalParams, + BareMetalMachinesListBySubscriptionOptionalParams, + BareMetalMachinesListByResourceGroupOptionalParams, + BareMetalMachinesDeleteOptionalParams, + BareMetalMachinesUpdateOptionalParams, + BareMetalMachinesCreateOrUpdateOptionalParams, + BareMetalMachinesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _uncordonSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesUncordonOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/uncordon{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _uncordonDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Uncordon the provided bare metal machine's Kubernetes node. */ +export function uncordon( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesUncordonOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _uncordonDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _uncordonSend(context, resourceGroupName, bareMetalMachineName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _startSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesStartOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/start{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _startDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Start the provided bare metal machine. */ +export function start( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesStartOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _startDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _startSend(context, resourceGroupName, bareMetalMachineName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _runReadCommandsSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, + options: BareMetalMachinesRunReadCommandsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runReadCommands{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: bareMetalMachineRunReadCommandsParametersSerializer( + bareMetalMachineRunReadCommandsParameters, + ), + }); +} + +export async function _runReadCommandsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. */ +export function runReadCommands( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, + options: BareMetalMachinesRunReadCommandsOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _runReadCommandsDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _runReadCommandsSend( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunReadCommandsParameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _runDataExtractsRestrictedSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, + options: BareMetalMachinesRunDataExtractsRestrictedOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runDataExtractsRestricted{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: bareMetalMachineRunDataExtractsParametersSerializer( + bareMetalMachineRunDataExtractsRestrictedParameters, + ), + }); +} + +export async function _runDataExtractsRestrictedDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. */ +export function runDataExtractsRestricted( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, + options: BareMetalMachinesRunDataExtractsRestrictedOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller( + context, + _runDataExtractsRestrictedDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _runDataExtractsRestrictedSend( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunDataExtractsRestrictedParameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ) as PollerLike, OperationStatusResult>; +} + +export function _runDataExtractsSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, + options: BareMetalMachinesRunDataExtractsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runDataExtracts{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: bareMetalMachineRunDataExtractsParametersSerializer( + bareMetalMachineRunDataExtractsParameters, + ), + }); +} + +export async function _runDataExtractsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. */ +export function runDataExtracts( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, + options: BareMetalMachinesRunDataExtractsOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _runDataExtractsDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _runDataExtractsSend( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunDataExtractsParameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _runCommandSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, + options: BareMetalMachinesRunCommandOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runCommand{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: bareMetalMachineRunCommandParametersSerializer(bareMetalMachineRunCommandParameters), + }); +} + +export async function _runCommandDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. */ +export function runCommand( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, + options: BareMetalMachinesRunCommandOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _runCommandDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _runCommandSend( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunCommandParameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _restartSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesRestartOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/restart{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _restartDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Restart the provided bare metal machine. */ +export function restart( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesRestartOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _restartDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _restartSend(context, resourceGroupName, bareMetalMachineName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _replaceSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesReplaceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/replace{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: !options["bareMetalMachineReplaceParameters"] + ? options["bareMetalMachineReplaceParameters"] + : bareMetalMachineReplaceParametersSerializer(options["bareMetalMachineReplaceParameters"]), + }); +} + +export async function _replaceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Replace the provided bare metal machine. */ +export function replace( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesReplaceOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _replaceDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _replaceSend(context, resourceGroupName, bareMetalMachineName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _reimageSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesReimageOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/reimage{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: !options["body"] + ? options["body"] + : bareMetalMachineReimageParametersSerializer(options["body"]), + }); +} + +export async function _reimageDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Reimage the provided bare metal machine. */ +export function reimage( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesReimageOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _reimageDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _reimageSend(context, resourceGroupName, bareMetalMachineName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _powerOffSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesPowerOffOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/powerOff{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: !options["bareMetalMachinePowerOffParameters"] + ? options["bareMetalMachinePowerOffParameters"] + : bareMetalMachinePowerOffParametersSerializer(options["bareMetalMachinePowerOffParameters"]), + }); +} + +export async function _powerOffDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Power off the provided bare metal machine. */ +export function powerOff( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesPowerOffOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _powerOffDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _powerOffSend(context, resourceGroupName, bareMetalMachineName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _cordonSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesCordonOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/cordon{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: !options["bareMetalMachineCordonParameters"] + ? options["bareMetalMachineCordonParameters"] + : bareMetalMachineCordonParametersSerializer(options["bareMetalMachineCordonParameters"]), + }); +} + +export async function _cordonDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Cordon the provided bare metal machine's Kubernetes node. */ +export function cordon( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesCordonOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _cordonDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _cordonSend(context, resourceGroupName, bareMetalMachineName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _listBySubscriptionSend( + context: Client, + options: BareMetalMachinesListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/bareMetalMachines{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_BareMetalMachineList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _bareMetalMachineListDeserializer(result.body); +} + +/** Get a list of bare metal machines in the provided subscription. */ +export function listBySubscription( + context: Client, + options: BareMetalMachinesListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: BareMetalMachinesListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_BareMetalMachineList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _bareMetalMachineListDeserializer(result.body); +} + +/** Get a list of bare metal machines in the provided resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: BareMetalMachinesListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. */ +export function $delete( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, bareMetalMachineName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["bareMetalMachineUpdateParameters"] + ? options["bareMetalMachineUpdateParameters"] + : bareMetalMachinePatchParametersSerializer(options["bareMetalMachineUpdateParameters"]), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return bareMetalMachineDeserializer(result.body); +} + +/** Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. */ +export function update( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, BareMetalMachine> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, bareMetalMachineName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, BareMetalMachine>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineParameters: BareMetalMachine, + options: BareMetalMachinesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: bareMetalMachineSerializer(bareMetalMachineParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return bareMetalMachineDeserializer(result.body); +} + +/** Create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineParameters: BareMetalMachine, + options: BareMetalMachinesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, BareMetalMachine> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, BareMetalMachine>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + bareMetalMachineName: bareMetalMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return bareMetalMachineDeserializer(result.body); +} + +/** Get properties of the provided bare metal machine. */ +export async function get( + context: Client, + resourceGroupName: string, + bareMetalMachineName: string, + options: BareMetalMachinesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, bareMetalMachineName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachines/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachines/options.ts new file mode 100644 index 000000000000..3bb63f31c70b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/bareMetalMachines/options.ts @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + BareMetalMachinePatchParameters, + BareMetalMachineCordonParameters, + BareMetalMachinePowerOffParameters, + BareMetalMachineReimageParameters, + BareMetalMachineReplaceParameters, +} from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface BareMetalMachinesUncordonOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface BareMetalMachinesStartOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface BareMetalMachinesRunReadCommandsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface BareMetalMachinesRunDataExtractsRestrictedOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface BareMetalMachinesRunDataExtractsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface BareMetalMachinesRunCommandOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface BareMetalMachinesRestartOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface BareMetalMachinesReplaceOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The request body. */ + bareMetalMachineReplaceParameters?: BareMetalMachineReplaceParameters; +} + +/** Optional parameters. */ +export interface BareMetalMachinesReimageOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The content of the action request */ + body?: BareMetalMachineReimageParameters; +} + +/** Optional parameters. */ +export interface BareMetalMachinesPowerOffOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The request body. */ + bareMetalMachinePowerOffParameters?: BareMetalMachinePowerOffParameters; +} + +/** Optional parameters. */ +export interface BareMetalMachinesCordonOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The request body. */ + bareMetalMachineCordonParameters?: BareMetalMachineCordonParameters; +} + +/** Optional parameters. */ +export interface BareMetalMachinesListBySubscriptionOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface BareMetalMachinesListByResourceGroupOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface BareMetalMachinesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface BareMetalMachinesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + bareMetalMachineUpdateParameters?: BareMetalMachinePatchParameters; +} + +/** Optional parameters. */ +export interface BareMetalMachinesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface BareMetalMachinesGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/bmcKeySets/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/bmcKeySets/index.ts new file mode 100644 index 000000000000..ec2e35937d2f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/bmcKeySets/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByCluster, $delete, update, createOrUpdate, get } from "./operations.js"; +export type { + BmcKeySetsListByClusterOptionalParams, + BmcKeySetsDeleteOptionalParams, + BmcKeySetsUpdateOptionalParams, + BmcKeySetsCreateOrUpdateOptionalParams, + BmcKeySetsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/bmcKeySets/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/bmcKeySets/operations.ts new file mode 100644 index 000000000000..d5432b153253 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/bmcKeySets/operations.ts @@ -0,0 +1,346 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + BmcKeySet, + bmcKeySetSerializer, + bmcKeySetDeserializer, + bmcKeySetPatchParametersSerializer, + _BmcKeySetList, + _bmcKeySetListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + BmcKeySetsListByClusterOptionalParams, + BmcKeySetsDeleteOptionalParams, + BmcKeySetsUpdateOptionalParams, + BmcKeySetsCreateOrUpdateOptionalParams, + BmcKeySetsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByClusterSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: BmcKeySetsListByClusterOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByClusterDeserialize( + result: PathUncheckedResponse, +): Promise<_BmcKeySetList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _bmcKeySetListDeserializer(result.body); +} + +/** Get a list of baseboard management controller key sets for the provided cluster. */ +export function listByCluster( + context: Client, + resourceGroupName: string, + clusterName: string, + options: BmcKeySetsListByClusterOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByClusterSend(context, resourceGroupName, clusterName, options), + _listByClusterDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options: BmcKeySetsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + bmcKeySetName: bmcKeySetName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the baseboard management controller key set of the provided cluster. */ +export function $delete( + context: Client, + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options: BmcKeySetsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, clusterName, bmcKeySetName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options: BmcKeySetsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + bmcKeySetName: bmcKeySetName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["bmcKeySetUpdateParameters"] + ? options["bmcKeySetUpdateParameters"] + : bmcKeySetPatchParametersSerializer(options["bmcKeySetUpdateParameters"]), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return bmcKeySetDeserializer(result.body); +} + +/** 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. */ +export function update( + context: Client, + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options: BmcKeySetsUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, BmcKeySet> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, clusterName, bmcKeySetName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, BmcKeySet>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + bmcKeySetParameters: BmcKeySet, + options: BmcKeySetsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + bmcKeySetName: bmcKeySetName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: bmcKeySetSerializer(bmcKeySetParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return bmcKeySetDeserializer(result.body); +} + +/** Create a new baseboard management controller key set or update the existing one for the provided cluster. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + bmcKeySetParameters: BmcKeySet, + options: BmcKeySetsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, BmcKeySet> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + clusterName, + bmcKeySetName, + bmcKeySetParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, BmcKeySet>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options: BmcKeySetsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + bmcKeySetName: bmcKeySetName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return bmcKeySetDeserializer(result.body); +} + +/** Get baseboard management controller key set of the provided cluster. */ +export async function get( + context: Client, + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options: BmcKeySetsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, clusterName, bmcKeySetName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/bmcKeySets/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/bmcKeySets/options.ts new file mode 100644 index 000000000000..3086d07ea691 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/bmcKeySets/options.ts @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { BmcKeySetPatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface BmcKeySetsListByClusterOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface BmcKeySetsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface BmcKeySetsUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + bmcKeySetUpdateParameters?: BmcKeySetPatchParameters; +} + +/** Optional parameters. */ +export interface BmcKeySetsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface BmcKeySetsGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/cloudServicesNetworks/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/cloudServicesNetworks/index.ts new file mode 100644 index 000000000000..f69a93ea90b2 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/cloudServicesNetworks/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + CloudServicesNetworksListBySubscriptionOptionalParams, + CloudServicesNetworksListByResourceGroupOptionalParams, + CloudServicesNetworksDeleteOptionalParams, + CloudServicesNetworksUpdateOptionalParams, + CloudServicesNetworksCreateOrUpdateOptionalParams, + CloudServicesNetworksGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/cloudServicesNetworks/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/cloudServicesNetworks/operations.ts new file mode 100644 index 000000000000..d5e41bf207fc --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/cloudServicesNetworks/operations.ts @@ -0,0 +1,391 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + CloudServicesNetwork, + cloudServicesNetworkSerializer, + cloudServicesNetworkDeserializer, + cloudServicesNetworkPatchParametersSerializer, + _CloudServicesNetworkList, + _cloudServicesNetworkListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + CloudServicesNetworksListBySubscriptionOptionalParams, + CloudServicesNetworksListByResourceGroupOptionalParams, + CloudServicesNetworksDeleteOptionalParams, + CloudServicesNetworksUpdateOptionalParams, + CloudServicesNetworksCreateOrUpdateOptionalParams, + CloudServicesNetworksGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listBySubscriptionSend( + context: Client, + options: CloudServicesNetworksListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/cloudServicesNetworks{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_CloudServicesNetworkList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _cloudServicesNetworkListDeserializer(result.body); +} + +/** Get a list of cloud services networks in the provided subscription. */ +export function listBySubscription( + context: Client, + options: CloudServicesNetworksListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: CloudServicesNetworksListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_CloudServicesNetworkList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _cloudServicesNetworkListDeserializer(result.body); +} + +/** Get a list of cloud services networks in the provided resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: CloudServicesNetworksListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + cloudServicesNetworkName: string, + options: CloudServicesNetworksDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + cloudServicesNetworkName: cloudServicesNetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided cloud services network. */ +export function $delete( + context: Client, + resourceGroupName: string, + cloudServicesNetworkName: string, + options: CloudServicesNetworksDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, cloudServicesNetworkName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + cloudServicesNetworkName: string, + options: CloudServicesNetworksUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + cloudServicesNetworkName: cloudServicesNetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["cloudServicesNetworkUpdateParameters"] + ? options["cloudServicesNetworkUpdateParameters"] + : cloudServicesNetworkPatchParametersSerializer( + options["cloudServicesNetworkUpdateParameters"], + ), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return cloudServicesNetworkDeserializer(result.body); +} + +/** Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. */ +export function update( + context: Client, + resourceGroupName: string, + cloudServicesNetworkName: string, + options: CloudServicesNetworksUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, CloudServicesNetwork> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, cloudServicesNetworkName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, CloudServicesNetwork>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + cloudServicesNetworkName: string, + cloudServicesNetworkParameters: CloudServicesNetwork, + options: CloudServicesNetworksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + cloudServicesNetworkName: cloudServicesNetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: cloudServicesNetworkSerializer(cloudServicesNetworkParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return cloudServicesNetworkDeserializer(result.body); +} + +/** Create a new cloud services network or update the properties of the existing cloud services network. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + cloudServicesNetworkName: string, + cloudServicesNetworkParameters: CloudServicesNetwork, + options: CloudServicesNetworksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, CloudServicesNetwork> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + cloudServicesNetworkName, + cloudServicesNetworkParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, CloudServicesNetwork>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + cloudServicesNetworkName: string, + options: CloudServicesNetworksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + cloudServicesNetworkName: cloudServicesNetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return cloudServicesNetworkDeserializer(result.body); +} + +/** Get properties of the provided cloud services network. */ +export async function get( + context: Client, + resourceGroupName: string, + cloudServicesNetworkName: string, + options: CloudServicesNetworksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, cloudServicesNetworkName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/cloudServicesNetworks/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/cloudServicesNetworks/options.ts new file mode 100644 index 000000000000..373920b9282c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/cloudServicesNetworks/options.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { CloudServicesNetworkPatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface CloudServicesNetworksListBySubscriptionOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface CloudServicesNetworksListByResourceGroupOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface CloudServicesNetworksDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface CloudServicesNetworksUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + cloudServicesNetworkUpdateParameters?: CloudServicesNetworkPatchParameters; +} + +/** Optional parameters. */ +export interface CloudServicesNetworksCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface CloudServicesNetworksGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/clusterManagers/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/clusterManagers/index.ts new file mode 100644 index 000000000000..eaf0cfb93f5a --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/clusterManagers/index.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + updateRelayPrivateEndpointConnection, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams, + ClusterManagersListBySubscriptionOptionalParams, + ClusterManagersListByResourceGroupOptionalParams, + ClusterManagersDeleteOptionalParams, + ClusterManagersUpdateOptionalParams, + ClusterManagersCreateOrUpdateOptionalParams, + ClusterManagersGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/clusterManagers/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/clusterManagers/operations.ts new file mode 100644 index 000000000000..21dc9da94fe6 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/clusterManagers/operations.ts @@ -0,0 +1,454 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + ClusterManager, + clusterManagerSerializer, + clusterManagerDeserializer, + clusterManagerPatchParametersSerializer, + _ClusterManagerList, + _clusterManagerListDeserializer, + clusterManagerUpdateRelayPrivateEndpointConnectionParametersSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams, + ClusterManagersListBySubscriptionOptionalParams, + ClusterManagersListByResourceGroupOptionalParams, + ClusterManagersDeleteOptionalParams, + ClusterManagersUpdateOptionalParams, + ClusterManagersCreateOrUpdateOptionalParams, + ClusterManagersGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _updateRelayPrivateEndpointConnectionSend( + context: Client, + resourceGroupName: string, + clusterManagerName: string, + options: ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}/updateRelayPrivateEndpointConnection{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterManagerName: clusterManagerName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: !options["clusterManagerUpdateRelayPrivateEndpointConnectionParameters"] + ? options["clusterManagerUpdateRelayPrivateEndpointConnectionParameters"] + : clusterManagerUpdateRelayPrivateEndpointConnectionParametersSerializer( + options["clusterManagerUpdateRelayPrivateEndpointConnectionParameters"], + ), + }); +} + +export async function _updateRelayPrivateEndpointConnectionDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. */ +export function updateRelayPrivateEndpointConnection( + context: Client, + resourceGroupName: string, + clusterManagerName: string, + options: ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams = { + requestOptions: {}, + }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller( + context, + _updateRelayPrivateEndpointConnectionDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateRelayPrivateEndpointConnectionSend( + context, + resourceGroupName, + clusterManagerName, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ) as PollerLike, OperationStatusResult>; +} + +export function _listBySubscriptionSend( + context: Client, + options: ClusterManagersListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/clusterManagers{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_ClusterManagerList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _clusterManagerListDeserializer(result.body); +} + +/** Get a list of cluster managers in the provided subscription. */ +export function listBySubscription( + context: Client, + options: ClusterManagersListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: ClusterManagersListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ClusterManagerList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _clusterManagerListDeserializer(result.body); +} + +/** Get a list of cluster managers in the provided resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: ClusterManagersListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + clusterManagerName: string, + options: ClusterManagersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterManagerName: clusterManagerName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided cluster manager. */ +export function $delete( + context: Client, + resourceGroupName: string, + clusterManagerName: string, + options: ClusterManagersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, clusterManagerName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + clusterManagerName: string, + options: ClusterManagersUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterManagerName: clusterManagerName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["clusterManagerUpdateParameters"] + ? options["clusterManagerUpdateParameters"] + : clusterManagerPatchParametersSerializer(options["clusterManagerUpdateParameters"]), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clusterManagerDeserializer(result.body); +} + +/** Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. */ +export async function update( + context: Client, + resourceGroupName: string, + clusterManagerName: string, + options: ClusterManagersUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend(context, resourceGroupName, clusterManagerName, options); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + clusterManagerName: string, + clusterManagerParameters: ClusterManager, + options: ClusterManagersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterManagerName: clusterManagerName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: clusterManagerSerializer(clusterManagerParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clusterManagerDeserializer(result.body); +} + +/** Create a new cluster manager or update properties of the cluster manager if it exists. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + clusterManagerName: string, + clusterManagerParameters: ClusterManager, + options: ClusterManagersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ClusterManager> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + clusterManagerName, + clusterManagerParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, ClusterManager>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + clusterManagerName: string, + options: ClusterManagersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterManagerName: clusterManagerName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clusterManagerDeserializer(result.body); +} + +/** Get the properties of the provided cluster manager. */ +export async function get( + context: Client, + resourceGroupName: string, + clusterManagerName: string, + options: ClusterManagersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, clusterManagerName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/clusterManagers/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/clusterManagers/options.ts new file mode 100644 index 000000000000..2cc1e776ba5e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/clusterManagers/options.ts @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ClusterManagerPatchParameters, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters, +} from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The request body. */ + clusterManagerUpdateRelayPrivateEndpointConnectionParameters?: ClusterManagerUpdateRelayPrivateEndpointConnectionParameters; +} + +/** Optional parameters. */ +export interface ClusterManagersListBySubscriptionOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface ClusterManagersListByResourceGroupOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface ClusterManagersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface ClusterManagersUpdateOptionalParams extends OperationOptions { + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + clusterManagerUpdateParameters?: ClusterManagerPatchParameters; +} + +/** Optional parameters. */ +export interface ClusterManagersCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface ClusterManagersGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/clusters/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/clusters/index.ts new file mode 100644 index 000000000000..17a76d0122e3 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/clusters/index.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + updateVersion, + scanRuntime, + rotateCredential, + inspect, + deploy, + continueUpdateVersion, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + ClustersUpdateVersionOptionalParams, + ClustersScanRuntimeOptionalParams, + ClustersRotateCredentialOptionalParams, + ClustersInspectOptionalParams, + ClustersDeployOptionalParams, + ClustersContinueUpdateVersionOptionalParams, + ClustersListBySubscriptionOptionalParams, + ClustersListByResourceGroupOptionalParams, + ClustersDeleteOptionalParams, + ClustersUpdateOptionalParams, + ClustersCreateOrUpdateOptionalParams, + ClustersGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/clusters/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/clusters/operations.ts new file mode 100644 index 000000000000..27c44b4f46ae --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/clusters/operations.ts @@ -0,0 +1,747 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + Cluster, + clusterSerializer, + clusterDeserializer, + clusterPatchParametersSerializer, + _ClusterList, + _clusterListDeserializer, + ClusterContinueUpdateVersionParameters, + clusterContinueUpdateVersionParametersSerializer, + clusterDeployParametersSerializer, + clusterInspectParametersSerializer, + ClusterRotateCredentialParameters, + clusterRotateCredentialParametersSerializer, + clusterScanRuntimeParametersSerializer, + ClusterUpdateVersionParameters, + clusterUpdateVersionParametersSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ClustersUpdateVersionOptionalParams, + ClustersScanRuntimeOptionalParams, + ClustersRotateCredentialOptionalParams, + ClustersInspectOptionalParams, + ClustersDeployOptionalParams, + ClustersContinueUpdateVersionOptionalParams, + ClustersListBySubscriptionOptionalParams, + ClustersListByResourceGroupOptionalParams, + ClustersDeleteOptionalParams, + ClustersUpdateOptionalParams, + ClustersCreateOrUpdateOptionalParams, + ClustersGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _updateVersionSend( + context: Client, + resourceGroupName: string, + clusterName: string, + clusterUpdateVersionParameters: ClusterUpdateVersionParameters, + options: ClustersUpdateVersionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/updateVersion{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: clusterUpdateVersionParametersSerializer(clusterUpdateVersionParameters), + }); +} + +export async function _updateVersionDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Update the version of the provided cluster to one of the available supported versions. */ +export function updateVersion( + context: Client, + resourceGroupName: string, + clusterName: string, + clusterUpdateVersionParameters: ClusterUpdateVersionParameters, + options: ClustersUpdateVersionOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _updateVersionDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateVersionSend( + context, + resourceGroupName, + clusterName, + clusterUpdateVersionParameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _scanRuntimeSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ClustersScanRuntimeOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/scanRuntime{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: !options["clusterScanRuntimeParameters"] + ? options["clusterScanRuntimeParameters"] + : clusterScanRuntimeParametersSerializer(options["clusterScanRuntimeParameters"]), + }); +} + +export async function _scanRuntimeDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. */ +export function scanRuntime( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ClustersScanRuntimeOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _scanRuntimeDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _scanRuntimeSend(context, resourceGroupName, clusterName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _rotateCredentialSend( + context: Client, + resourceGroupName: string, + clusterName: string, + body: ClusterRotateCredentialParameters, + options: ClustersRotateCredentialOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/rotateCredential{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: clusterRotateCredentialParametersSerializer(body), + }); +} + +export async function _rotateCredentialDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Rotate the specified cluster credential. */ +export function rotateCredential( + context: Client, + resourceGroupName: string, + clusterName: string, + body: ClusterRotateCredentialParameters, + options: ClustersRotateCredentialOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _rotateCredentialDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _rotateCredentialSend(context, resourceGroupName, clusterName, body, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _inspectSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ClustersInspectOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/inspect{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: !options["clusterInspectParameters"] + ? options["clusterInspectParameters"] + : clusterInspectParametersSerializer(options["clusterInspectParameters"]), + }); +} + +export async function _inspectDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied additional actions and filters. */ +export function inspect( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ClustersInspectOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _inspectDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _inspectSend(context, resourceGroupName, clusterName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _deploySend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ClustersDeployOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/deploy{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: !options["clusterDeployParameters"] + ? options["clusterDeployParameters"] + : clusterDeployParametersSerializer(options["clusterDeployParameters"]), + }); +} + +export async function _deployDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Deploy the cluster using the rack configuration provided during creation. */ +export function deploy( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ClustersDeployOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _deployDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _deploySend(context, resourceGroupName, clusterName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _continueUpdateVersionSend( + context: Client, + resourceGroupName: string, + clusterName: string, + clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, + options: ClustersContinueUpdateVersionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/continueUpdateVersion{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: clusterContinueUpdateVersionParametersSerializer(clusterContinueUpdateVersionParameters), + }); +} + +export async function _continueUpdateVersionDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. */ +export function continueUpdateVersion( + context: Client, + resourceGroupName: string, + clusterName: string, + clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, + options: ClustersContinueUpdateVersionOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _continueUpdateVersionDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _continueUpdateVersionSend( + context, + resourceGroupName, + clusterName, + clusterContinueUpdateVersionParameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _listBySubscriptionSend( + context: Client, + options: ClustersListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/clusters{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_ClusterList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _clusterListDeserializer(result.body); +} + +/** Get a list of clusters in the provided subscription. */ +export function listBySubscription( + context: Client, + options: ClustersListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: ClustersListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ClusterList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _clusterListDeserializer(result.body); +} + +/** Get a list of clusters in the provided resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: ClustersListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ClustersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided cluster. */ +export function $delete( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ClustersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, clusterName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ClustersUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["clusterUpdateParameters"] + ? options["clusterUpdateParameters"] + : clusterPatchParametersSerializer(options["clusterUpdateParameters"]), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clusterDeserializer(result.body); +} + +/** Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. */ +export function update( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ClustersUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Cluster> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _updateSend(context, resourceGroupName, clusterName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, Cluster>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + clusterParameters: Cluster, + options: ClustersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: clusterSerializer(clusterParameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clusterDeserializer(result.body); +} + +/** Create a new cluster or update the properties of the cluster if it exists. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + clusterName: string, + clusterParameters: Cluster, + options: ClustersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Cluster> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, clusterName, clusterParameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, Cluster>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ClustersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clusterDeserializer(result.body); +} + +/** Get properties of the provided cluster. */ +export async function get( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ClustersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, clusterName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/clusters/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/clusters/options.ts new file mode 100644 index 000000000000..0a02ff71ab90 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/clusters/options.ts @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ClusterPatchParameters, + ClusterDeployParameters, + ClusterInspectParameters, + ClusterScanRuntimeParameters, +} from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ClustersUpdateVersionOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ClustersScanRuntimeOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The request body. */ + clusterScanRuntimeParameters?: ClusterScanRuntimeParameters; +} + +/** Optional parameters. */ +export interface ClustersRotateCredentialOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ClustersInspectOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The request body. */ + clusterInspectParameters?: ClusterInspectParameters; +} + +/** Optional parameters. */ +export interface ClustersDeployOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The request body. */ + clusterDeployParameters?: ClusterDeployParameters; +} + +/** Optional parameters. */ +export interface ClustersContinueUpdateVersionOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ClustersListBySubscriptionOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface ClustersListByResourceGroupOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface ClustersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface ClustersUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + clusterUpdateParameters?: ClusterPatchParameters; +} + +/** Optional parameters. */ +export interface ClustersCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface ClustersGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/consoles/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/consoles/index.ts new file mode 100644 index 000000000000..91264152d014 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/consoles/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByVirtualMachine, $delete, update, createOrUpdate, get } from "./operations.js"; +export type { + ConsolesListByVirtualMachineOptionalParams, + ConsolesDeleteOptionalParams, + ConsolesUpdateOptionalParams, + ConsolesCreateOrUpdateOptionalParams, + ConsolesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/consoles/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/consoles/operations.ts new file mode 100644 index 000000000000..3c073ea9d364 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/consoles/operations.ts @@ -0,0 +1,350 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + Console, + consoleSerializer, + consoleDeserializer, + consolePatchParametersSerializer, + _ConsoleList, + _consoleListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ConsolesListByVirtualMachineOptionalParams, + ConsolesDeleteOptionalParams, + ConsolesUpdateOptionalParams, + ConsolesCreateOrUpdateOptionalParams, + ConsolesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByVirtualMachineSend( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: ConsolesListByVirtualMachineOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineName: virtualMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByVirtualMachineDeserialize( + result: PathUncheckedResponse, +): Promise<_ConsoleList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _consoleListDeserializer(result.body); +} + +/** Get a list of consoles for the provided virtual machine. */ +export function listByVirtualMachine( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: ConsolesListByVirtualMachineOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByVirtualMachineSend(context, resourceGroupName, virtualMachineName, options), + _listByVirtualMachineDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options: ConsolesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineName: virtualMachineName, + consoleName: consoleName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided virtual machine console. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options: ConsolesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, virtualMachineName, consoleName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options: ConsolesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineName: virtualMachineName, + consoleName: consoleName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["consoleUpdateParameters"] + ? options["consoleUpdateParameters"] + : consolePatchParametersSerializer(options["consoleUpdateParameters"]), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return consoleDeserializer(result.body); +} + +/** 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. */ +export function update( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options: ConsolesUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Console> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, virtualMachineName, consoleName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, Console>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + consoleParameters: Console, + options: ConsolesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineName: virtualMachineName, + consoleName: consoleName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: consoleSerializer(consoleParameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return consoleDeserializer(result.body); +} + +/** Create a new virtual machine console or update the properties of the existing virtual machine console. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + consoleParameters: Console, + options: ConsolesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Console> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualMachineName, + consoleName, + consoleParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, Console>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options: ConsolesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineName: virtualMachineName, + consoleName: consoleName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return consoleDeserializer(result.body); +} + +/** Get properties of the provided virtual machine console. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options: ConsolesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + virtualMachineName, + consoleName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/consoles/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/consoles/options.ts new file mode 100644 index 000000000000..4a22a88bd305 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/consoles/options.ts @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ConsolePatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ConsolesListByVirtualMachineOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface ConsolesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface ConsolesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + consoleUpdateParameters?: ConsolePatchParameters; +} + +/** Optional parameters. */ +export interface ConsolesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface ConsolesGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/index.ts new file mode 100644 index 000000000000..77de2b586bbe --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export type { NetworkCloudContext, NetworkCloudOptionalParams } from "./networkCloudContext.js"; +export { createNetworkCloud } from "./networkCloudContext.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusterFeatures/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusterFeatures/index.ts new file mode 100644 index 000000000000..5e0e8d9de78f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusterFeatures/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByKubernetesCluster, $delete, update, createOrUpdate, get } from "./operations.js"; +export type { + KubernetesClusterFeaturesListByKubernetesClusterOptionalParams, + KubernetesClusterFeaturesDeleteOptionalParams, + KubernetesClusterFeaturesUpdateOptionalParams, + KubernetesClusterFeaturesCreateOrUpdateOptionalParams, + KubernetesClusterFeaturesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusterFeatures/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusterFeatures/operations.ts new file mode 100644 index 000000000000..9caa6fbb383b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusterFeatures/operations.ts @@ -0,0 +1,358 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + KubernetesClusterFeature, + kubernetesClusterFeatureSerializer, + kubernetesClusterFeatureDeserializer, + kubernetesClusterFeaturePatchParametersSerializer, + _KubernetesClusterFeatureList, + _kubernetesClusterFeatureListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + KubernetesClusterFeaturesListByKubernetesClusterOptionalParams, + KubernetesClusterFeaturesDeleteOptionalParams, + KubernetesClusterFeaturesUpdateOptionalParams, + KubernetesClusterFeaturesCreateOrUpdateOptionalParams, + KubernetesClusterFeaturesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByKubernetesClusterSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + options: KubernetesClusterFeaturesListByKubernetesClusterOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByKubernetesClusterDeserialize( + result: PathUncheckedResponse, +): Promise<_KubernetesClusterFeatureList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _kubernetesClusterFeatureListDeserializer(result.body); +} + +/** Get a list of features for the provided Kubernetes cluster. */ +export function listByKubernetesCluster( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + options: KubernetesClusterFeaturesListByKubernetesClusterOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByKubernetesClusterSend(context, resourceGroupName, kubernetesClusterName, options), + _listByKubernetesClusterDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options: KubernetesClusterFeaturesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + featureName: featureName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided Kubernetes cluster feature. */ +export function $delete( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options: KubernetesClusterFeaturesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, kubernetesClusterName, featureName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options: KubernetesClusterFeaturesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + featureName: featureName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["kubernetesClusterFeatureUpdateParameters"] + ? options["kubernetesClusterFeatureUpdateParameters"] + : kubernetesClusterFeaturePatchParametersSerializer( + options["kubernetesClusterFeatureUpdateParameters"], + ), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return kubernetesClusterFeatureDeserializer(result.body); +} + +/** Patch properties of the provided Kubernetes cluster feature. */ +export function update( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options: KubernetesClusterFeaturesUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, KubernetesClusterFeature> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, kubernetesClusterName, featureName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, KubernetesClusterFeature>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + kubernetesClusterFeatureParameters: KubernetesClusterFeature, + options: KubernetesClusterFeaturesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + featureName: featureName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: kubernetesClusterFeatureSerializer(kubernetesClusterFeatureParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return kubernetesClusterFeatureDeserializer(result.body); +} + +/** Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + kubernetesClusterFeatureParameters: KubernetesClusterFeature, + options: KubernetesClusterFeaturesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, KubernetesClusterFeature> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + kubernetesClusterName, + featureName, + kubernetesClusterFeatureParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, KubernetesClusterFeature>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options: KubernetesClusterFeaturesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + featureName: featureName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return kubernetesClusterFeatureDeserializer(result.body); +} + +/** Get properties of the provided the Kubernetes cluster feature. */ +export async function get( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options: KubernetesClusterFeaturesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + kubernetesClusterName, + featureName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusterFeatures/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusterFeatures/options.ts new file mode 100644 index 000000000000..83e72b591d01 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusterFeatures/options.ts @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { KubernetesClusterFeaturePatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface KubernetesClusterFeaturesListByKubernetesClusterOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface KubernetesClusterFeaturesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface KubernetesClusterFeaturesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + kubernetesClusterFeatureUpdateParameters?: KubernetesClusterFeaturePatchParameters; +} + +/** Optional parameters. */ +export interface KubernetesClusterFeaturesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface KubernetesClusterFeaturesGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusters/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusters/index.ts new file mode 100644 index 000000000000..a7bc8f96c705 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusters/index.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + restartNode, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + KubernetesClustersRestartNodeOptionalParams, + KubernetesClustersListBySubscriptionOptionalParams, + KubernetesClustersListByResourceGroupOptionalParams, + KubernetesClustersDeleteOptionalParams, + KubernetesClustersUpdateOptionalParams, + KubernetesClustersCreateOrUpdateOptionalParams, + KubernetesClustersGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusters/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusters/operations.ts new file mode 100644 index 000000000000..589c6ed2166e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusters/operations.ts @@ -0,0 +1,454 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + KubernetesCluster, + kubernetesClusterSerializer, + kubernetesClusterDeserializer, + kubernetesClusterPatchParametersSerializer, + _KubernetesClusterList, + _kubernetesClusterListDeserializer, + KubernetesClusterRestartNodeParameters, + kubernetesClusterRestartNodeParametersSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + KubernetesClustersRestartNodeOptionalParams, + KubernetesClustersListBySubscriptionOptionalParams, + KubernetesClustersListByResourceGroupOptionalParams, + KubernetesClustersDeleteOptionalParams, + KubernetesClustersUpdateOptionalParams, + KubernetesClustersCreateOrUpdateOptionalParams, + KubernetesClustersGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _restartNodeSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, + options: KubernetesClustersRestartNodeOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/restartNode{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: kubernetesClusterRestartNodeParametersSerializer(kubernetesClusterRestartNodeParameters), + }); +} + +export async function _restartNodeDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Restart a targeted node of a Kubernetes cluster. */ +export function restartNode( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, + options: KubernetesClustersRestartNodeOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _restartNodeDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _restartNodeSend( + context, + resourceGroupName, + kubernetesClusterName, + kubernetesClusterRestartNodeParameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _listBySubscriptionSend( + context: Client, + options: KubernetesClustersListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/kubernetesClusters{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_KubernetesClusterList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _kubernetesClusterListDeserializer(result.body); +} + +/** Get a list of Kubernetes clusters in the provided subscription. */ +export function listBySubscription( + context: Client, + options: KubernetesClustersListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: KubernetesClustersListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_KubernetesClusterList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _kubernetesClusterListDeserializer(result.body); +} + +/** Get a list of Kubernetes clusters in the provided resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: KubernetesClustersListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + options: KubernetesClustersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided Kubernetes cluster. */ +export function $delete( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + options: KubernetesClustersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, kubernetesClusterName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + options: KubernetesClustersUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["kubernetesClusterUpdateParameters"] + ? options["kubernetesClusterUpdateParameters"] + : kubernetesClusterPatchParametersSerializer(options["kubernetesClusterUpdateParameters"]), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return kubernetesClusterDeserializer(result.body); +} + +/** Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. */ +export function update( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + options: KubernetesClustersUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, KubernetesCluster> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, kubernetesClusterName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, KubernetesCluster>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterParameters: KubernetesCluster, + options: KubernetesClustersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: kubernetesClusterSerializer(kubernetesClusterParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return kubernetesClusterDeserializer(result.body); +} + +/** Create a new Kubernetes cluster or update the properties of the existing one. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterParameters: KubernetesCluster, + options: KubernetesClustersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, KubernetesCluster> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + kubernetesClusterName, + kubernetesClusterParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, KubernetesCluster>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + options: KubernetesClustersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesClusterName: kubernetesClusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return kubernetesClusterDeserializer(result.body); +} + +/** Get properties of the provided the Kubernetes cluster. */ +export async function get( + context: Client, + resourceGroupName: string, + kubernetesClusterName: string, + options: KubernetesClustersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, kubernetesClusterName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusters/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusters/options.ts new file mode 100644 index 000000000000..7d7e9b130f06 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesClusters/options.ts @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { KubernetesClusterPatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface KubernetesClustersRestartNodeOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface KubernetesClustersListBySubscriptionOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface KubernetesClustersListByResourceGroupOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface KubernetesClustersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface KubernetesClustersUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + kubernetesClusterUpdateParameters?: KubernetesClusterPatchParameters; +} + +/** Optional parameters. */ +export interface KubernetesClustersCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface KubernetesClustersGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/kubernetesVersions/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesVersions/index.ts new file mode 100644 index 000000000000..d33683f38b30 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesVersions/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + KubernetesVersionsListBySubscriptionOptionalParams, + KubernetesVersionsListByResourceGroupOptionalParams, + KubernetesVersionsDeleteOptionalParams, + KubernetesVersionsUpdateOptionalParams, + KubernetesVersionsCreateOrUpdateOptionalParams, + KubernetesVersionsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/kubernetesVersions/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesVersions/operations.ts new file mode 100644 index 000000000000..d56c248317bf --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesVersions/operations.ts @@ -0,0 +1,387 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + KubernetesVersion, + kubernetesVersionSerializer, + kubernetesVersionDeserializer, + kubernetesVersionPatchParametersSerializer, + _KubernetesVersionList, + _kubernetesVersionListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + KubernetesVersionsListBySubscriptionOptionalParams, + KubernetesVersionsListByResourceGroupOptionalParams, + KubernetesVersionsDeleteOptionalParams, + KubernetesVersionsUpdateOptionalParams, + KubernetesVersionsCreateOrUpdateOptionalParams, + KubernetesVersionsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listBySubscriptionSend( + context: Client, + options: KubernetesVersionsListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/kubernetesVersions{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_KubernetesVersionList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _kubernetesVersionListDeserializer(result.body); +} + +/** Get a list of Kubernetes version resources in the provided subscription. */ +export function listBySubscription( + context: Client, + options: KubernetesVersionsListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: KubernetesVersionsListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_KubernetesVersionList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _kubernetesVersionListDeserializer(result.body); +} + +/** Get a list of Kubernetes version resources in the provided resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: KubernetesVersionsListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + kubernetesVersionName: string, + options: KubernetesVersionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesVersionName: kubernetesVersionName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the specified Kubernetes version resource. */ +export function $delete( + context: Client, + resourceGroupName: string, + kubernetesVersionName: string, + options: KubernetesVersionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, kubernetesVersionName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + kubernetesVersionName: string, + options: KubernetesVersionsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesVersionName: kubernetesVersionName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["kubernetesVersionPatchParameters"] + ? options["kubernetesVersionPatchParameters"] + : kubernetesVersionPatchParametersSerializer(options["kubernetesVersionPatchParameters"]), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return kubernetesVersionDeserializer(result.body); +} + +/** Update tags associated with the Kubernetes version resource. No other properties are supported for update. */ +export function update( + context: Client, + resourceGroupName: string, + kubernetesVersionName: string, + options: KubernetesVersionsUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, KubernetesVersion> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, kubernetesVersionName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, KubernetesVersion>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + kubernetesVersionName: string, + kubernetesVersionParameters: KubernetesVersion, + options: KubernetesVersionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesVersionName: kubernetesVersionName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: kubernetesVersionSerializer(kubernetesVersionParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return kubernetesVersionDeserializer(result.body); +} + +/** Create the Kubernetes version resource or update its tags. This resource is system managed and should only be created with the name "default". */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + kubernetesVersionName: string, + kubernetesVersionParameters: KubernetesVersion, + options: KubernetesVersionsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, KubernetesVersion> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + kubernetesVersionName, + kubernetesVersionParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, KubernetesVersion>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + kubernetesVersionName: string, + options: KubernetesVersionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + kubernetesVersionName: kubernetesVersionName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return kubernetesVersionDeserializer(result.body); +} + +/** Retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. */ +export async function get( + context: Client, + resourceGroupName: string, + kubernetesVersionName: string, + options: KubernetesVersionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, kubernetesVersionName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/kubernetesVersions/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesVersions/options.ts new file mode 100644 index 000000000000..cae654d93fb8 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/kubernetesVersions/options.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { KubernetesVersionPatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface KubernetesVersionsListBySubscriptionOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface KubernetesVersionsListByResourceGroupOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface KubernetesVersionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface KubernetesVersionsUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + kubernetesVersionPatchParameters?: KubernetesVersionPatchParameters; +} + +/** Optional parameters. */ +export interface KubernetesVersionsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface KubernetesVersionsGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/l2Networks/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/l2Networks/index.ts new file mode 100644 index 000000000000..8dfe75167234 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/l2Networks/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + L2NetworksListBySubscriptionOptionalParams, + L2NetworksListByResourceGroupOptionalParams, + L2NetworksDeleteOptionalParams, + L2NetworksUpdateOptionalParams, + L2NetworksCreateOrUpdateOptionalParams, + L2NetworksGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/l2Networks/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/l2Networks/operations.ts new file mode 100644 index 000000000000..ab2debe0199e --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/l2Networks/operations.ts @@ -0,0 +1,372 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + L2Network, + l2NetworkSerializer, + l2NetworkDeserializer, + l2NetworkPatchParametersSerializer, + _L2NetworkList, + _l2NetworkListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + L2NetworksListBySubscriptionOptionalParams, + L2NetworksListByResourceGroupOptionalParams, + L2NetworksDeleteOptionalParams, + L2NetworksUpdateOptionalParams, + L2NetworksCreateOrUpdateOptionalParams, + L2NetworksGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listBySubscriptionSend( + context: Client, + options: L2NetworksListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/l2Networks{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_L2NetworkList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _l2NetworkListDeserializer(result.body); +} + +/** Get a list of layer 2 (L2) networks in the provided subscription. */ +export function listBySubscription( + context: Client, + options: L2NetworksListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: L2NetworksListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_L2NetworkList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _l2NetworkListDeserializer(result.body); +} + +/** Get a list of layer 2 (L2) networks in the provided resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: L2NetworksListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + l2NetworkName: string, + options: L2NetworksDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + l2NetworkName: l2NetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided layer 2 (L2) network. */ +export function $delete( + context: Client, + resourceGroupName: string, + l2NetworkName: string, + options: L2NetworksDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, l2NetworkName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + l2NetworkName: string, + options: L2NetworksUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + l2NetworkName: l2NetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["l2NetworkUpdateParameters"] + ? options["l2NetworkUpdateParameters"] + : l2NetworkPatchParametersSerializer(options["l2NetworkUpdateParameters"]), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return l2NetworkDeserializer(result.body); +} + +/** Update tags associated with the provided layer 2 (L2) network. */ +export async function update( + context: Client, + resourceGroupName: string, + l2NetworkName: string, + options: L2NetworksUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend(context, resourceGroupName, l2NetworkName, options); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + l2NetworkName: string, + l2NetworkParameters: L2Network, + options: L2NetworksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + l2NetworkName: l2NetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: l2NetworkSerializer(l2NetworkParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return l2NetworkDeserializer(result.body); +} + +/** Create a new layer 2 (L2) network or update the properties of the existing network. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + l2NetworkName: string, + l2NetworkParameters: L2Network, + options: L2NetworksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, L2Network> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, l2NetworkName, l2NetworkParameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, L2Network>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + l2NetworkName: string, + options: L2NetworksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + l2NetworkName: l2NetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return l2NetworkDeserializer(result.body); +} + +/** Get properties of the provided layer 2 (L2) network. */ +export async function get( + context: Client, + resourceGroupName: string, + l2NetworkName: string, + options: L2NetworksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, l2NetworkName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/l2Networks/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/l2Networks/options.ts new file mode 100644 index 000000000000..2ffe8172154f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/l2Networks/options.ts @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { L2NetworkPatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface L2NetworksListBySubscriptionOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface L2NetworksListByResourceGroupOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface L2NetworksDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface L2NetworksUpdateOptionalParams extends OperationOptions { + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + l2NetworkUpdateParameters?: L2NetworkPatchParameters; +} + +/** Optional parameters. */ +export interface L2NetworksCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface L2NetworksGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/l3Networks/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/l3Networks/index.ts new file mode 100644 index 000000000000..485691da38a2 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/l3Networks/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + L3NetworksListBySubscriptionOptionalParams, + L3NetworksListByResourceGroupOptionalParams, + L3NetworksDeleteOptionalParams, + L3NetworksUpdateOptionalParams, + L3NetworksCreateOrUpdateOptionalParams, + L3NetworksGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/l3Networks/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/l3Networks/operations.ts new file mode 100644 index 000000000000..94e8ec92bad5 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/l3Networks/operations.ts @@ -0,0 +1,372 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + L3Network, + l3NetworkSerializer, + l3NetworkDeserializer, + l3NetworkPatchParametersSerializer, + _L3NetworkList, + _l3NetworkListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + L3NetworksListBySubscriptionOptionalParams, + L3NetworksListByResourceGroupOptionalParams, + L3NetworksDeleteOptionalParams, + L3NetworksUpdateOptionalParams, + L3NetworksCreateOrUpdateOptionalParams, + L3NetworksGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listBySubscriptionSend( + context: Client, + options: L3NetworksListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/l3Networks{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_L3NetworkList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _l3NetworkListDeserializer(result.body); +} + +/** Get a list of layer 3 (L3) networks in the provided subscription. */ +export function listBySubscription( + context: Client, + options: L3NetworksListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: L3NetworksListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_L3NetworkList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _l3NetworkListDeserializer(result.body); +} + +/** Get a list of layer 3 (L3) networks in the provided resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: L3NetworksListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + l3NetworkName: string, + options: L3NetworksDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + l3NetworkName: l3NetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided layer 3 (L3) network. */ +export function $delete( + context: Client, + resourceGroupName: string, + l3NetworkName: string, + options: L3NetworksDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, l3NetworkName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + l3NetworkName: string, + options: L3NetworksUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + l3NetworkName: l3NetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["l3NetworkUpdateParameters"] + ? options["l3NetworkUpdateParameters"] + : l3NetworkPatchParametersSerializer(options["l3NetworkUpdateParameters"]), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return l3NetworkDeserializer(result.body); +} + +/** Update tags associated with the provided layer 3 (L3) network. */ +export async function update( + context: Client, + resourceGroupName: string, + l3NetworkName: string, + options: L3NetworksUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend(context, resourceGroupName, l3NetworkName, options); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + l3NetworkName: string, + l3NetworkParameters: L3Network, + options: L3NetworksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + l3NetworkName: l3NetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: l3NetworkSerializer(l3NetworkParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return l3NetworkDeserializer(result.body); +} + +/** Create a new layer 3 (L3) network or update the properties of the existing network. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + l3NetworkName: string, + l3NetworkParameters: L3Network, + options: L3NetworksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, L3Network> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, l3NetworkName, l3NetworkParameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, L3Network>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + l3NetworkName: string, + options: L3NetworksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + l3NetworkName: l3NetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return l3NetworkDeserializer(result.body); +} + +/** Get properties of the provided layer 3 (L3) network. */ +export async function get( + context: Client, + resourceGroupName: string, + l3NetworkName: string, + options: L3NetworksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, l3NetworkName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/l3Networks/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/l3Networks/options.ts new file mode 100644 index 000000000000..561a72ddc076 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/l3Networks/options.ts @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { L3NetworkPatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface L3NetworksListBySubscriptionOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface L3NetworksListByResourceGroupOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface L3NetworksDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface L3NetworksUpdateOptionalParams extends OperationOptions { + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + l3NetworkUpdateParameters?: L3NetworkPatchParameters; +} + +/** Optional parameters. */ +export interface L3NetworksCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface L3NetworksGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/metricsConfigurations/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/metricsConfigurations/index.ts new file mode 100644 index 000000000000..dcb569f499e7 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/metricsConfigurations/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByCluster, $delete, update, createOrUpdate, get } from "./operations.js"; +export type { + MetricsConfigurationsListByClusterOptionalParams, + MetricsConfigurationsDeleteOptionalParams, + MetricsConfigurationsUpdateOptionalParams, + MetricsConfigurationsCreateOrUpdateOptionalParams, + MetricsConfigurationsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/metricsConfigurations/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/metricsConfigurations/operations.ts new file mode 100644 index 000000000000..433dfe09aa07 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/metricsConfigurations/operations.ts @@ -0,0 +1,358 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + ClusterMetricsConfiguration, + clusterMetricsConfigurationSerializer, + clusterMetricsConfigurationDeserializer, + clusterMetricsConfigurationPatchParametersSerializer, + _ClusterMetricsConfigurationList, + _clusterMetricsConfigurationListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + MetricsConfigurationsListByClusterOptionalParams, + MetricsConfigurationsDeleteOptionalParams, + MetricsConfigurationsUpdateOptionalParams, + MetricsConfigurationsCreateOrUpdateOptionalParams, + MetricsConfigurationsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByClusterSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: MetricsConfigurationsListByClusterOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByClusterDeserialize( + result: PathUncheckedResponse, +): Promise<_ClusterMetricsConfigurationList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _clusterMetricsConfigurationListDeserializer(result.body); +} + +/** Get a list of metrics configurations for the provided cluster. */ +export function listByCluster( + context: Client, + resourceGroupName: string, + clusterName: string, + options: MetricsConfigurationsListByClusterOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByClusterSend(context, resourceGroupName, clusterName, options), + _listByClusterDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options: MetricsConfigurationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + metricsConfigurationName: metricsConfigurationName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the metrics configuration of the provided cluster. */ +export function $delete( + context: Client, + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options: MetricsConfigurationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, clusterName, metricsConfigurationName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options: MetricsConfigurationsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + metricsConfigurationName: metricsConfigurationName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["metricsConfigurationUpdateParameters"] + ? options["metricsConfigurationUpdateParameters"] + : clusterMetricsConfigurationPatchParametersSerializer( + options["metricsConfigurationUpdateParameters"], + ), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clusterMetricsConfigurationDeserializer(result.body); +} + +/** Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. */ +export function update( + context: Client, + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options: MetricsConfigurationsUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ClusterMetricsConfiguration> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, clusterName, metricsConfigurationName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, ClusterMetricsConfiguration>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + metricsConfigurationParameters: ClusterMetricsConfiguration, + options: MetricsConfigurationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + metricsConfigurationName: metricsConfigurationName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: clusterMetricsConfigurationSerializer(metricsConfigurationParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clusterMetricsConfigurationDeserializer(result.body); +} + +/** Create new or update the existing metrics configuration of the provided cluster. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + metricsConfigurationParameters: ClusterMetricsConfiguration, + options: MetricsConfigurationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ClusterMetricsConfiguration> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + clusterName, + metricsConfigurationName, + metricsConfigurationParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, ClusterMetricsConfiguration>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options: MetricsConfigurationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + metricsConfigurationName: metricsConfigurationName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clusterMetricsConfigurationDeserializer(result.body); +} + +/** Get metrics configuration of the provided cluster. */ +export async function get( + context: Client, + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options: MetricsConfigurationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + clusterName, + metricsConfigurationName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/metricsConfigurations/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/metricsConfigurations/options.ts new file mode 100644 index 000000000000..fe0c5c8161b3 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/metricsConfigurations/options.ts @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ClusterMetricsConfigurationPatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface MetricsConfigurationsListByClusterOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface MetricsConfigurationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface MetricsConfigurationsUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + metricsConfigurationUpdateParameters?: ClusterMetricsConfigurationPatchParameters; +} + +/** Optional parameters. */ +export interface MetricsConfigurationsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface MetricsConfigurationsGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/networkCloudContext.ts b/sdk/networkcloud/arm-networkcloud/src/api/networkCloudContext.ts new file mode 100644 index 000000000000..94b063139fe9 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/networkCloudContext.ts @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { logger } from "../logger.js"; +import { KnownVersions } from "../models/models.js"; +import { AzureSupportedClouds, getArmEndpoint } from "../static-helpers/cloudSettingHelpers.js"; +import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; +import { TokenCredential } from "@azure/core-auth"; + +/** The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. */ +export interface NetworkCloudContext extends Client { + /** The ID of the target subscription. The value must be an UUID. */ + subscriptionId: string; + /** The API version to use for this operation. */ + /** Known values of {@link KnownVersions} that the service accepts. */ + apiVersion?: string; +} + +/** Optional parameters for the client. */ +export interface NetworkCloudOptionalParams extends ClientOptions { + /** The API version to use for this operation. */ + /** Known values of {@link KnownVersions} that the service accepts. */ + apiVersion?: string; + /** Specifies the Azure cloud environment for the client. */ + cloudSetting?: AzureSupportedClouds; +} + +/** The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. */ +export function createNetworkCloud( + credential: TokenCredential, + subscriptionId: string, + options: NetworkCloudOptionalParams = {}, +): NetworkCloudContext { + const endpointUrl = + options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? "https://management.azure.com"; + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentInfo = `azsdk-js-arm-networkcloud/2.0.0-beta.2`; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` + : `azsdk-js-api ${userAgentInfo}`; + const { apiVersion: _, ...updatedOptions } = { + ...options, + userAgentOptions: { userAgentPrefix }, + loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info }, + credentials: { scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`] }, + }; + const clientContext = getClient(endpointUrl, credential, updatedOptions); + const apiVersion = options.apiVersion; + return { ...clientContext, apiVersion, subscriptionId } as NetworkCloudContext; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/operations/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/operations/index.ts new file mode 100644 index 000000000000..de883c05d2f1 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/operations/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { OperationsListOptionalParams } from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/operations/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/operations/operations.ts new file mode 100644 index 000000000000..859056126fb9 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/operations/operations.ts @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + _OperationListResult, + _operationListResultDeserializer, + Operation, + errorResponseDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { OperationsListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/providers/Microsoft.NetworkCloud/operations{?api%2Dversion}", + { + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_OperationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _operationListResultDeserializer(result.body); +} + +/** List the operations for the provider */ +export function list( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/operations/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/operations/options.ts new file mode 100644 index 000000000000..c461016ad1c5 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/operations/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface OperationsListOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/rackSkus/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/rackSkus/index.ts new file mode 100644 index 000000000000..4fe654d7ce46 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/rackSkus/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listBySubscription, get } from "./operations.js"; +export type { + RackSkusListBySubscriptionOptionalParams, + RackSkusGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/rackSkus/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/rackSkus/operations.ts new file mode 100644 index 000000000000..192f9bf40d34 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/rackSkus/operations.ts @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + RackSku, + rackSkuDeserializer, + _RackSkuList, + _rackSkuListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { RackSkusListBySubscriptionOptionalParams, RackSkusGetOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listBySubscriptionSend( + context: Client, + options: RackSkusListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/rackSkus{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_RackSkuList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _rackSkuListDeserializer(result.body); +} + +/** Get a list of rack SKUs in the provided subscription. */ +export function listBySubscription( + context: Client, + options: RackSkusListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _getSend( + context: Client, + rackSkuName: string, + options: RackSkusGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/rackSkus/{rackSkuName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + rackSkuName: rackSkuName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return rackSkuDeserializer(result.body); +} + +/** Get the properties of the provided rack SKU. */ +export async function get( + context: Client, + rackSkuName: string, + options: RackSkusGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, rackSkuName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/rackSkus/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/rackSkus/options.ts new file mode 100644 index 000000000000..83e35815fa0f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/rackSkus/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface RackSkusListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface RackSkusGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/racks/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/racks/index.ts new file mode 100644 index 000000000000..b7a7722e68a5 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/racks/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + RacksListBySubscriptionOptionalParams, + RacksListByResourceGroupOptionalParams, + RacksDeleteOptionalParams, + RacksUpdateOptionalParams, + RacksCreateOrUpdateOptionalParams, + RacksGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/racks/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/racks/operations.ts new file mode 100644 index 000000000000..47bc31e80b88 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/racks/operations.ts @@ -0,0 +1,375 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + Rack, + rackSerializer, + rackDeserializer, + rackPatchParametersSerializer, + _RackList, + _rackListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + RacksListBySubscriptionOptionalParams, + RacksListByResourceGroupOptionalParams, + RacksDeleteOptionalParams, + RacksUpdateOptionalParams, + RacksCreateOrUpdateOptionalParams, + RacksGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listBySubscriptionSend( + context: Client, + options: RacksListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/racks{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_RackList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _rackListDeserializer(result.body); +} + +/** Get a list of racks in the provided subscription. */ +export function listBySubscription( + context: Client, + options: RacksListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: RacksListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_RackList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _rackListDeserializer(result.body); +} + +/** Get a list of racks in the provided resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: RacksListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + rackName: string, + options: RacksDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + rackName: rackName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. */ +export function $delete( + context: Client, + resourceGroupName: string, + rackName: string, + options: RacksDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, rackName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + rackName: string, + options: RacksUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + rackName: rackName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["rackUpdateParameters"] + ? options["rackUpdateParameters"] + : rackPatchParametersSerializer(options["rackUpdateParameters"]), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return rackDeserializer(result.body); +} + +/** Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. */ +export function update( + context: Client, + resourceGroupName: string, + rackName: string, + options: RacksUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Rack> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _updateSend(context, resourceGroupName, rackName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, Rack>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + rackName: string, + rackParameters: Rack, + options: RacksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + rackName: rackName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: rackSerializer(rackParameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return rackDeserializer(result.body); +} + +/** Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + rackName: string, + rackParameters: Rack, + options: RacksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Rack> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, rackName, rackParameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, Rack>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + rackName: string, + options: RacksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + rackName: rackName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return rackDeserializer(result.body); +} + +/** Get properties of the provided rack. */ +export async function get( + context: Client, + resourceGroupName: string, + rackName: string, + options: RacksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, rackName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/racks/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/racks/options.ts new file mode 100644 index 000000000000..e00cb440d094 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/racks/options.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { RackPatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface RacksListBySubscriptionOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface RacksListByResourceGroupOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface RacksDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface RacksUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + rackUpdateParameters?: RackPatchParameters; +} + +/** Optional parameters. */ +export interface RacksCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface RacksGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/storageAppliances/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/storageAppliances/index.ts new file mode 100644 index 000000000000..54d5dd881d88 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/storageAppliances/index.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + runReadCommands, + enableRemoteVendorManagement, + disableRemoteVendorManagement, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + StorageAppliancesRunReadCommandsOptionalParams, + StorageAppliancesEnableRemoteVendorManagementOptionalParams, + StorageAppliancesDisableRemoteVendorManagementOptionalParams, + StorageAppliancesListBySubscriptionOptionalParams, + StorageAppliancesListByResourceGroupOptionalParams, + StorageAppliancesDeleteOptionalParams, + StorageAppliancesUpdateOptionalParams, + StorageAppliancesCreateOrUpdateOptionalParams, + StorageAppliancesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/storageAppliances/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/storageAppliances/operations.ts new file mode 100644 index 000000000000..bdc874bf6e0f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/storageAppliances/operations.ts @@ -0,0 +1,589 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + StorageAppliance, + storageApplianceSerializer, + storageApplianceDeserializer, + storageAppliancePatchParametersSerializer, + _StorageApplianceList, + _storageApplianceListDeserializer, + storageApplianceEnableRemoteVendorManagementParametersSerializer, + StorageApplianceRunReadCommandsParameters, + storageApplianceRunReadCommandsParametersSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + StorageAppliancesRunReadCommandsOptionalParams, + StorageAppliancesEnableRemoteVendorManagementOptionalParams, + StorageAppliancesDisableRemoteVendorManagementOptionalParams, + StorageAppliancesListBySubscriptionOptionalParams, + StorageAppliancesListByResourceGroupOptionalParams, + StorageAppliancesDeleteOptionalParams, + StorageAppliancesUpdateOptionalParams, + StorageAppliancesCreateOrUpdateOptionalParams, + StorageAppliancesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _runReadCommandsSend( + context: Client, + resourceGroupName: string, + storageApplianceName: string, + storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, + options: StorageAppliancesRunReadCommandsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/runReadCommands{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + storageApplianceName: storageApplianceName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: storageApplianceRunReadCommandsParametersSerializer( + storageApplianceRunReadCommandsParameters, + ), + }); +} + +export async function _runReadCommandsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Run one or more read-only commands on the provided storage appliance. */ +export function runReadCommands( + context: Client, + resourceGroupName: string, + storageApplianceName: string, + storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, + options: StorageAppliancesRunReadCommandsOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _runReadCommandsDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _runReadCommandsSend( + context, + resourceGroupName, + storageApplianceName, + storageApplianceRunReadCommandsParameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _enableRemoteVendorManagementSend( + context: Client, + resourceGroupName: string, + storageApplianceName: string, + options: StorageAppliancesEnableRemoteVendorManagementOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/enableRemoteVendorManagement{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + storageApplianceName: storageApplianceName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: !options["storageApplianceEnableRemoteVendorManagementParameters"] + ? options["storageApplianceEnableRemoteVendorManagementParameters"] + : storageApplianceEnableRemoteVendorManagementParametersSerializer( + options["storageApplianceEnableRemoteVendorManagementParameters"], + ), + }); +} + +export async function _enableRemoteVendorManagementDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Enable remote vendor management of the provided storage appliance. */ +export function enableRemoteVendorManagement( + context: Client, + resourceGroupName: string, + storageApplianceName: string, + options: StorageAppliancesEnableRemoteVendorManagementOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller( + context, + _enableRemoteVendorManagementDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _enableRemoteVendorManagementSend( + context, + resourceGroupName, + storageApplianceName, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ) as PollerLike, OperationStatusResult>; +} + +export function _disableRemoteVendorManagementSend( + context: Client, + resourceGroupName: string, + storageApplianceName: string, + options: StorageAppliancesDisableRemoteVendorManagementOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/disableRemoteVendorManagement{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + storageApplianceName: storageApplianceName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _disableRemoteVendorManagementDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Disable remote vendor management of the provided storage appliance. */ +export function disableRemoteVendorManagement( + context: Client, + resourceGroupName: string, + storageApplianceName: string, + options: StorageAppliancesDisableRemoteVendorManagementOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller( + context, + _disableRemoteVendorManagementDeserialize, + ["202", "200", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _disableRemoteVendorManagementSend( + context, + resourceGroupName, + storageApplianceName, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ) as PollerLike, OperationStatusResult>; +} + +export function _listBySubscriptionSend( + context: Client, + options: StorageAppliancesListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/storageAppliances{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_StorageApplianceList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _storageApplianceListDeserializer(result.body); +} + +/** Get a list of storage appliances in the provided subscription. */ +export function listBySubscription( + context: Client, + options: StorageAppliancesListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: StorageAppliancesListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_StorageApplianceList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _storageApplianceListDeserializer(result.body); +} + +/** Get a list of storage appliances in the provided resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: StorageAppliancesListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + storageApplianceName: string, + options: StorageAppliancesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + storageApplianceName: storageApplianceName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. */ +export function $delete( + context: Client, + resourceGroupName: string, + storageApplianceName: string, + options: StorageAppliancesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, storageApplianceName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + storageApplianceName: string, + options: StorageAppliancesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + storageApplianceName: storageApplianceName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["storageApplianceUpdateParameters"] + ? options["storageApplianceUpdateParameters"] + : storageAppliancePatchParametersSerializer(options["storageApplianceUpdateParameters"]), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return storageApplianceDeserializer(result.body); +} + +/** Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. */ +export function update( + context: Client, + resourceGroupName: string, + storageApplianceName: string, + options: StorageAppliancesUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, StorageAppliance> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, storageApplianceName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, StorageAppliance>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + storageApplianceName: string, + storageApplianceParameters: StorageAppliance, + options: StorageAppliancesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + storageApplianceName: storageApplianceName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: storageApplianceSerializer(storageApplianceParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return storageApplianceDeserializer(result.body); +} + +/** Create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + storageApplianceName: string, + storageApplianceParameters: StorageAppliance, + options: StorageAppliancesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, StorageAppliance> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + storageApplianceName, + storageApplianceParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, StorageAppliance>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + storageApplianceName: string, + options: StorageAppliancesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + storageApplianceName: storageApplianceName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return storageApplianceDeserializer(result.body); +} + +/** Get properties of the provided storage appliance. */ +export async function get( + context: Client, + resourceGroupName: string, + storageApplianceName: string, + options: StorageAppliancesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, storageApplianceName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/storageAppliances/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/storageAppliances/options.ts new file mode 100644 index 000000000000..e4f5ef5d2560 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/storageAppliances/options.ts @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + StorageAppliancePatchParameters, + StorageApplianceEnableRemoteVendorManagementParameters, +} from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface StorageAppliancesRunReadCommandsOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface StorageAppliancesEnableRemoteVendorManagementOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The request body. */ + storageApplianceEnableRemoteVendorManagementParameters?: StorageApplianceEnableRemoteVendorManagementParameters; +} + +/** Optional parameters. */ +export interface StorageAppliancesDisableRemoteVendorManagementOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface StorageAppliancesListBySubscriptionOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface StorageAppliancesListByResourceGroupOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface StorageAppliancesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface StorageAppliancesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + storageApplianceUpdateParameters?: StorageAppliancePatchParameters; +} + +/** Optional parameters. */ +export interface StorageAppliancesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface StorageAppliancesGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/trunkedNetworks/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/trunkedNetworks/index.ts new file mode 100644 index 000000000000..f902d507c0ec --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/trunkedNetworks/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + TrunkedNetworksListBySubscriptionOptionalParams, + TrunkedNetworksListByResourceGroupOptionalParams, + TrunkedNetworksDeleteOptionalParams, + TrunkedNetworksUpdateOptionalParams, + TrunkedNetworksCreateOrUpdateOptionalParams, + TrunkedNetworksGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/trunkedNetworks/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/trunkedNetworks/operations.ts new file mode 100644 index 000000000000..5eb6dd68534d --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/trunkedNetworks/operations.ts @@ -0,0 +1,378 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + TrunkedNetwork, + trunkedNetworkSerializer, + trunkedNetworkDeserializer, + trunkedNetworkPatchParametersSerializer, + _TrunkedNetworkList, + _trunkedNetworkListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + TrunkedNetworksListBySubscriptionOptionalParams, + TrunkedNetworksListByResourceGroupOptionalParams, + TrunkedNetworksDeleteOptionalParams, + TrunkedNetworksUpdateOptionalParams, + TrunkedNetworksCreateOrUpdateOptionalParams, + TrunkedNetworksGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listBySubscriptionSend( + context: Client, + options: TrunkedNetworksListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/trunkedNetworks{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_TrunkedNetworkList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _trunkedNetworkListDeserializer(result.body); +} + +/** Get a list of trunked networks in the provided subscription. */ +export function listBySubscription( + context: Client, + options: TrunkedNetworksListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: TrunkedNetworksListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_TrunkedNetworkList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _trunkedNetworkListDeserializer(result.body); +} + +/** Get a list of trunked networks in the provided resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: TrunkedNetworksListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + trunkedNetworkName: string, + options: TrunkedNetworksDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + trunkedNetworkName: trunkedNetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided trunked network. */ +export function $delete( + context: Client, + resourceGroupName: string, + trunkedNetworkName: string, + options: TrunkedNetworksDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, trunkedNetworkName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + trunkedNetworkName: string, + options: TrunkedNetworksUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + trunkedNetworkName: trunkedNetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["trunkedNetworkUpdateParameters"] + ? options["trunkedNetworkUpdateParameters"] + : trunkedNetworkPatchParametersSerializer(options["trunkedNetworkUpdateParameters"]), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return trunkedNetworkDeserializer(result.body); +} + +/** Update tags associated with the provided trunked network. */ +export async function update( + context: Client, + resourceGroupName: string, + trunkedNetworkName: string, + options: TrunkedNetworksUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend(context, resourceGroupName, trunkedNetworkName, options); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + trunkedNetworkName: string, + trunkedNetworkParameters: TrunkedNetwork, + options: TrunkedNetworksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + trunkedNetworkName: trunkedNetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: trunkedNetworkSerializer(trunkedNetworkParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return trunkedNetworkDeserializer(result.body); +} + +/** Create a new trunked network or update the properties of the existing trunked network. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + trunkedNetworkName: string, + trunkedNetworkParameters: TrunkedNetwork, + options: TrunkedNetworksCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, TrunkedNetwork> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + trunkedNetworkName, + trunkedNetworkParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, TrunkedNetwork>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + trunkedNetworkName: string, + options: TrunkedNetworksGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + trunkedNetworkName: trunkedNetworkName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return trunkedNetworkDeserializer(result.body); +} + +/** Get properties of the provided trunked network. */ +export async function get( + context: Client, + resourceGroupName: string, + trunkedNetworkName: string, + options: TrunkedNetworksGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, trunkedNetworkName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/trunkedNetworks/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/trunkedNetworks/options.ts new file mode 100644 index 000000000000..4a7496199c40 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/trunkedNetworks/options.ts @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { TrunkedNetworkPatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface TrunkedNetworksListBySubscriptionOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface TrunkedNetworksListByResourceGroupOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface TrunkedNetworksDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface TrunkedNetworksUpdateOptionalParams extends OperationOptions { + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + trunkedNetworkUpdateParameters?: TrunkedNetworkPatchParameters; +} + +/** Optional parameters. */ +export interface TrunkedNetworksCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface TrunkedNetworksGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/virtualMachines/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/virtualMachines/index.ts new file mode 100644 index 000000000000..d4e4ccb291ca --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/virtualMachines/index.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + start, + restart, + reimage, + powerOff, + assignRelay, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + VirtualMachinesStartOptionalParams, + VirtualMachinesRestartOptionalParams, + VirtualMachinesReimageOptionalParams, + VirtualMachinesPowerOffOptionalParams, + VirtualMachinesAssignRelayOptionalParams, + VirtualMachinesListBySubscriptionOptionalParams, + VirtualMachinesListByResourceGroupOptionalParams, + VirtualMachinesDeleteOptionalParams, + VirtualMachinesUpdateOptionalParams, + VirtualMachinesCreateOrUpdateOptionalParams, + VirtualMachinesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/virtualMachines/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/virtualMachines/operations.ts new file mode 100644 index 000000000000..f3764cafabb8 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/virtualMachines/operations.ts @@ -0,0 +1,661 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + VirtualMachine, + virtualMachineSerializer, + virtualMachineDeserializer, + virtualMachinePatchParametersSerializer, + _VirtualMachineList, + _virtualMachineListDeserializer, + virtualMachineAssignRelayParametersSerializer, + virtualMachinePowerOffParametersSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VirtualMachinesStartOptionalParams, + VirtualMachinesRestartOptionalParams, + VirtualMachinesReimageOptionalParams, + VirtualMachinesPowerOffOptionalParams, + VirtualMachinesAssignRelayOptionalParams, + VirtualMachinesListBySubscriptionOptionalParams, + VirtualMachinesListByResourceGroupOptionalParams, + VirtualMachinesDeleteOptionalParams, + VirtualMachinesUpdateOptionalParams, + VirtualMachinesCreateOrUpdateOptionalParams, + VirtualMachinesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _startSend( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesStartOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/start{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineName: virtualMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _startDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Start the provided virtual machine. */ +export function start( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesStartOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _startDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _startSend(context, resourceGroupName, virtualMachineName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _restartSend( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesRestartOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/restart{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineName: virtualMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _restartDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Restart the provided virtual machine. */ +export function restart( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesRestartOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _restartDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _restartSend(context, resourceGroupName, virtualMachineName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _reimageSend( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesReimageOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/reimage{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineName: virtualMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _reimageDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Reimage the provided virtual machine. */ +export function reimage( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesReimageOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _reimageDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _reimageSend(context, resourceGroupName, virtualMachineName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _powerOffSend( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesPowerOffOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/powerOff{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineName: virtualMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: !options["virtualMachinePowerOffParameters"] + ? options["virtualMachinePowerOffParameters"] + : virtualMachinePowerOffParametersSerializer(options["virtualMachinePowerOffParameters"]), + }); +} + +export async function _powerOffDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Power off the provided virtual machine. */ +export function powerOff( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesPowerOffOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _powerOffDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _powerOffSend(context, resourceGroupName, virtualMachineName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _assignRelaySend( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesAssignRelayOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/assignRelay{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineName: virtualMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: !options["virtualMachineAssignRelayParameters"] + ? options["virtualMachineAssignRelayParameters"] + : virtualMachineAssignRelayParametersSerializer( + options["virtualMachineAssignRelayParameters"], + ), + }); +} + +export async function _assignRelayDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. */ +export function assignRelay( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesAssignRelayOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _assignRelayDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _assignRelaySend(context, resourceGroupName, virtualMachineName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _listBySubscriptionSend( + context: Client, + options: VirtualMachinesListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/virtualMachines{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualMachineList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _virtualMachineListDeserializer(result.body); +} + +/** Get a list of virtual machines in the provided subscription. */ +export function listBySubscription( + context: Client, + options: VirtualMachinesListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: VirtualMachinesListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_VirtualMachineList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _virtualMachineListDeserializer(result.body); +} + +/** Get a list of virtual machines in the provided resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: VirtualMachinesListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineName: virtualMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided virtual machine. */ +export function $delete( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, virtualMachineName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineName: virtualMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["virtualMachineUpdateParameters"] + ? options["virtualMachineUpdateParameters"] + : virtualMachinePatchParametersSerializer(options["virtualMachineUpdateParameters"]), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return virtualMachineDeserializer(result.body); +} + +/** 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. */ +export function update( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualMachine> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _updateSend(context, resourceGroupName, virtualMachineName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, VirtualMachine>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + virtualMachineParameters: VirtualMachine, + options: VirtualMachinesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineName: virtualMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: virtualMachineSerializer(virtualMachineParameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return virtualMachineDeserializer(result.body); +} + +/** Create a new virtual machine or update the properties of the existing virtual machine. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + virtualMachineParameters: VirtualMachine, + options: VirtualMachinesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, VirtualMachine> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + virtualMachineName, + virtualMachineParameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, VirtualMachine>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + virtualMachineName: virtualMachineName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return virtualMachineDeserializer(result.body); +} + +/** Get properties of the provided virtual machine. */ +export async function get( + context: Client, + resourceGroupName: string, + virtualMachineName: string, + options: VirtualMachinesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, virtualMachineName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/virtualMachines/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/virtualMachines/options.ts new file mode 100644 index 000000000000..57f154035b7b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/virtualMachines/options.ts @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + VirtualMachinePatchParameters, + VirtualMachineAssignRelayParameters, + VirtualMachinePowerOffParameters, +} from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VirtualMachinesStartOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachinesRestartOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachinesReimageOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface VirtualMachinesPowerOffOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The request body. */ + virtualMachinePowerOffParameters?: VirtualMachinePowerOffParameters; +} + +/** Optional parameters. */ +export interface VirtualMachinesAssignRelayOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The request body. */ + virtualMachineAssignRelayParameters?: VirtualMachineAssignRelayParameters; +} + +/** Optional parameters. */ +export interface VirtualMachinesListBySubscriptionOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface VirtualMachinesListByResourceGroupOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface VirtualMachinesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface VirtualMachinesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + virtualMachineUpdateParameters?: VirtualMachinePatchParameters; +} + +/** Optional parameters. */ +export interface VirtualMachinesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface VirtualMachinesGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/volumes/index.ts b/sdk/networkcloud/arm-networkcloud/src/api/volumes/index.ts new file mode 100644 index 000000000000..4f25e1ed712c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/volumes/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + VolumesListBySubscriptionOptionalParams, + VolumesListByResourceGroupOptionalParams, + VolumesDeleteOptionalParams, + VolumesUpdateOptionalParams, + VolumesCreateOrUpdateOptionalParams, + VolumesGetOptionalParams, +} from "./options.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/api/volumes/operations.ts b/sdk/networkcloud/arm-networkcloud/src/api/volumes/operations.ts new file mode 100644 index 000000000000..56a9620db7ca --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/volumes/operations.ts @@ -0,0 +1,370 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, + Volume, + volumeSerializer, + volumeDeserializer, + volumePatchParametersSerializer, + _VolumeList, + _volumeListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + VolumesListBySubscriptionOptionalParams, + VolumesListByResourceGroupOptionalParams, + VolumesDeleteOptionalParams, + VolumesUpdateOptionalParams, + VolumesCreateOrUpdateOptionalParams, + VolumesGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listBySubscriptionSend( + context: Client, + options: VolumesListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/volumes{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_VolumeList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _volumeListDeserializer(result.body); +} + +/** Get a list of volumes in the provided subscription. */ +export function listBySubscription( + context: Client, + options: VolumesListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: VolumesListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_VolumeList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _volumeListDeserializer(result.body); +} + +/** Get a list of volumes in the provided resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: VolumesListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + volumeName: string, + options: VolumesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + volumeName: volumeName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Delete the provided volume. */ +export function $delete( + context: Client, + resourceGroupName: string, + volumeName: string, + options: VolumesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, OperationStatusResult> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, volumeName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, OperationStatusResult>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + volumeName: string, + options: VolumesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + volumeName: volumeName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: !options["volumeUpdateParameters"] + ? options["volumeUpdateParameters"] + : volumePatchParametersSerializer(options["volumeUpdateParameters"]), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return volumeDeserializer(result.body); +} + +/** Update tags associated with the provided volume. */ +export async function update( + context: Client, + resourceGroupName: string, + volumeName: string, + options: VolumesUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend(context, resourceGroupName, volumeName, options); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + volumeName: string, + volumeParameters: Volume, + options: VolumesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + volumeName: volumeName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: volumeSerializer(volumeParameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return volumeDeserializer(result.body); +} + +/** Create a new volume or update the properties of the existing one. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + volumeName: string, + volumeParameters: Volume, + options: VolumesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, Volume> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, volumeName, volumeParameters, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2026-05-01-preview", + }) as PollerLike, Volume>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + volumeName: string, + options: VolumesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + volumeName: volumeName, + "api%2Dversion": context.apiVersion ?? "2026-05-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return volumeDeserializer(result.body); +} + +/** Get properties of the provided volume. */ +export async function get( + context: Client, + resourceGroupName: string, + volumeName: string, + options: VolumesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, volumeName, options); + return _getDeserialize(result); +} diff --git a/sdk/networkcloud/arm-networkcloud/src/api/volumes/options.ts b/sdk/networkcloud/arm-networkcloud/src/api/volumes/options.ts new file mode 100644 index 000000000000..dd1fd4b9ee36 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/api/volumes/options.ts @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { VolumePatchParameters } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface VolumesListBySubscriptionOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface VolumesListByResourceGroupOptionalParams extends OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; + /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface VolumesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface VolumesUpdateOptionalParams extends OperationOptions { + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; + /** The request body. */ + volumeUpdateParameters?: VolumePatchParameters; +} + +/** Optional parameters. */ +export interface VolumesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ + ifMatch?: string; + /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ + ifNoneMatch?: string; +} + +/** Optional parameters. */ +export interface VolumesGetOptionalParams extends OperationOptions {} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/accessBridges/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/accessBridges/index.ts new file mode 100644 index 000000000000..4f13396c3069 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/accessBridges/index.ts @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/accessBridges/operations.js"; +import { + AccessBridgesListBySubscriptionOptionalParams, + AccessBridgesListByResourceGroupOptionalParams, + AccessBridgesDeleteOptionalParams, + AccessBridgesUpdateOptionalParams, + AccessBridgesCreateOrUpdateOptionalParams, + AccessBridgesGetOptionalParams, +} from "../../api/accessBridges/options.js"; +import { + AccessBridge, + AccessBridgeAllowedName, + OperationStatusResult, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a AccessBridges operations. */ +export interface AccessBridgesOperations { + /** Get a list of access bridges in the provided subscription. */ + listBySubscription: ( + options?: AccessBridgesListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a list of access bridges in the provided resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: AccessBridgesListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the specified access bridge. */ + delete: ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options?: AccessBridgesDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options?: AccessBridgesDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options?: AccessBridgesDeleteOptionalParams, + ) => Promise; + /** Update properties of the provided access bridge, or update tags associated with the access bridge. Properties and tag updates can be done independently. */ + update: ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options?: AccessBridgesUpdateOptionalParams, + ) => PollerLike, AccessBridge>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options?: AccessBridgesUpdateOptionalParams, + ) => Promise, AccessBridge>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options?: AccessBridgesUpdateOptionalParams, + ) => Promise; + /** Create a new access bridge or update the properties of the existing access bridge. */ + createOrUpdate: ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + accessBridge: AccessBridge, + options?: AccessBridgesCreateOrUpdateOptionalParams, + ) => PollerLike, AccessBridge>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + accessBridge: AccessBridge, + options?: AccessBridgesCreateOrUpdateOptionalParams, + ) => Promise, AccessBridge>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + accessBridge: AccessBridge, + options?: AccessBridgesCreateOrUpdateOptionalParams, + ) => Promise; + /** Get the properties of the provided access bridge. */ + get: ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options?: AccessBridgesGetOptionalParams, + ) => Promise; +} + +function _getAccessBridges(context: NetworkCloudContext) { + return { + listBySubscription: (options?: AccessBridgesListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: AccessBridgesListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options?: AccessBridgesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, accessBridgeName, options), + beginDelete: async ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options?: AccessBridgesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, accessBridgeName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options?: AccessBridgesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, accessBridgeName, options); + }, + update: ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options?: AccessBridgesUpdateOptionalParams, + ) => update(context, resourceGroupName, accessBridgeName, options), + beginUpdate: async ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options?: AccessBridgesUpdateOptionalParams, + ) => { + const poller = update(context, resourceGroupName, accessBridgeName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options?: AccessBridgesUpdateOptionalParams, + ) => { + return await update(context, resourceGroupName, accessBridgeName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + accessBridge: AccessBridge, + options?: AccessBridgesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, accessBridgeName, accessBridge, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + accessBridge: AccessBridge, + options?: AccessBridgesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + accessBridgeName, + accessBridge, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + accessBridge: AccessBridge, + options?: AccessBridgesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + accessBridgeName, + accessBridge, + options, + ); + }, + get: ( + resourceGroupName: string, + accessBridgeName: AccessBridgeAllowedName, + options?: AccessBridgesGetOptionalParams, + ) => get(context, resourceGroupName, accessBridgeName, options), + }; +} + +export function _getAccessBridgesOperations(context: NetworkCloudContext): AccessBridgesOperations { + return { + ..._getAccessBridges(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/agentPools/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/agentPools/index.ts new file mode 100644 index 000000000000..6fa7052d8852 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/agentPools/index.ts @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + listByKubernetesCluster, + $delete, + update, + createOrUpdate, + get, +} from "../../api/agentPools/operations.js"; +import { + AgentPoolsListByKubernetesClusterOptionalParams, + AgentPoolsDeleteOptionalParams, + AgentPoolsUpdateOptionalParams, + AgentPoolsCreateOrUpdateOptionalParams, + AgentPoolsGetOptionalParams, +} from "../../api/agentPools/options.js"; +import { OperationStatusResult, AgentPool } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a AgentPools operations. */ +export interface AgentPoolsOperations { + /** Get a list of agent pools for the provided Kubernetes cluster. */ + listByKubernetesCluster: ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: AgentPoolsListByKubernetesClusterOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided Kubernetes cluster agent pool. */ + delete: ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options?: AgentPoolsDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options?: AgentPoolsDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options?: AgentPoolsDeleteOptionalParams, + ) => Promise; + /** 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. */ + update: ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options?: AgentPoolsUpdateOptionalParams, + ) => PollerLike, AgentPool>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options?: AgentPoolsUpdateOptionalParams, + ) => Promise, AgentPool>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options?: AgentPoolsUpdateOptionalParams, + ) => Promise; + /** Create a new Kubernetes cluster agent pool or update the properties of the existing one. */ + createOrUpdate: ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + agentPoolParameters: AgentPool, + options?: AgentPoolsCreateOrUpdateOptionalParams, + ) => PollerLike, AgentPool>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + agentPoolParameters: AgentPool, + options?: AgentPoolsCreateOrUpdateOptionalParams, + ) => Promise, AgentPool>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + agentPoolParameters: AgentPool, + options?: AgentPoolsCreateOrUpdateOptionalParams, + ) => Promise; + /** Get properties of the provided Kubernetes cluster agent pool. */ + get: ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options?: AgentPoolsGetOptionalParams, + ) => Promise; +} + +function _getAgentPools(context: NetworkCloudContext) { + return { + listByKubernetesCluster: ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: AgentPoolsListByKubernetesClusterOptionalParams, + ) => listByKubernetesCluster(context, resourceGroupName, kubernetesClusterName, options), + delete: ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options?: AgentPoolsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, kubernetesClusterName, agentPoolName, options), + beginDelete: async ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options?: AgentPoolsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + kubernetesClusterName, + agentPoolName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options?: AgentPoolsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + kubernetesClusterName, + agentPoolName, + options, + ); + }, + update: ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options?: AgentPoolsUpdateOptionalParams, + ) => update(context, resourceGroupName, kubernetesClusterName, agentPoolName, options), + beginUpdate: async ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options?: AgentPoolsUpdateOptionalParams, + ) => { + const poller = update( + context, + resourceGroupName, + kubernetesClusterName, + agentPoolName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options?: AgentPoolsUpdateOptionalParams, + ) => { + return await update( + context, + resourceGroupName, + kubernetesClusterName, + agentPoolName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + agentPoolParameters: AgentPool, + options?: AgentPoolsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + kubernetesClusterName, + agentPoolName, + agentPoolParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + agentPoolParameters: AgentPool, + options?: AgentPoolsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + kubernetesClusterName, + agentPoolName, + agentPoolParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + agentPoolParameters: AgentPool, + options?: AgentPoolsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + kubernetesClusterName, + agentPoolName, + agentPoolParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + kubernetesClusterName: string, + agentPoolName: string, + options?: AgentPoolsGetOptionalParams, + ) => get(context, resourceGroupName, kubernetesClusterName, agentPoolName, options), + }; +} + +export function _getAgentPoolsOperations(context: NetworkCloudContext): AgentPoolsOperations { + return { + ..._getAgentPools(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/bareMetalMachineKeySets/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/bareMetalMachineKeySets/index.ts new file mode 100644 index 000000000000..260e163e62ec --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/bareMetalMachineKeySets/index.ts @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + listByCluster, + $delete, + update, + createOrUpdate, + get, +} from "../../api/bareMetalMachineKeySets/operations.js"; +import { + BareMetalMachineKeySetsListByClusterOptionalParams, + BareMetalMachineKeySetsDeleteOptionalParams, + BareMetalMachineKeySetsUpdateOptionalParams, + BareMetalMachineKeySetsCreateOrUpdateOptionalParams, + BareMetalMachineKeySetsGetOptionalParams, +} from "../../api/bareMetalMachineKeySets/options.js"; +import { OperationStatusResult, BareMetalMachineKeySet } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a BareMetalMachineKeySets operations. */ +export interface BareMetalMachineKeySetsOperations { + /** Get a list of bare metal machine key sets for the provided cluster. */ + listByCluster: ( + resourceGroupName: string, + clusterName: string, + options?: BareMetalMachineKeySetsListByClusterOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the bare metal machine key set of the provided cluster. */ + delete: ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options?: BareMetalMachineKeySetsDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options?: BareMetalMachineKeySetsDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options?: BareMetalMachineKeySetsDeleteOptionalParams, + ) => Promise; + /** 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. */ + update: ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options?: BareMetalMachineKeySetsUpdateOptionalParams, + ) => PollerLike, BareMetalMachineKeySet>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options?: BareMetalMachineKeySetsUpdateOptionalParams, + ) => Promise, BareMetalMachineKeySet>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options?: BareMetalMachineKeySetsUpdateOptionalParams, + ) => Promise; + /** Create a new bare metal machine key set or update the existing one for the provided cluster. */ + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + bareMetalMachineKeySetParameters: BareMetalMachineKeySet, + options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams, + ) => PollerLike, BareMetalMachineKeySet>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + bareMetalMachineKeySetParameters: BareMetalMachineKeySet, + options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams, + ) => Promise, BareMetalMachineKeySet>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + bareMetalMachineKeySetParameters: BareMetalMachineKeySet, + options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams, + ) => Promise; + /** Get bare metal machine key set of the provided cluster. */ + get: ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options?: BareMetalMachineKeySetsGetOptionalParams, + ) => Promise; +} + +function _getBareMetalMachineKeySets(context: NetworkCloudContext) { + return { + listByCluster: ( + resourceGroupName: string, + clusterName: string, + options?: BareMetalMachineKeySetsListByClusterOptionalParams, + ) => listByCluster(context, resourceGroupName, clusterName, options), + delete: ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options?: BareMetalMachineKeySetsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, clusterName, bareMetalMachineKeySetName, options), + beginDelete: async ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options?: BareMetalMachineKeySetsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + clusterName, + bareMetalMachineKeySetName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options?: BareMetalMachineKeySetsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + clusterName, + bareMetalMachineKeySetName, + options, + ); + }, + update: ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options?: BareMetalMachineKeySetsUpdateOptionalParams, + ) => update(context, resourceGroupName, clusterName, bareMetalMachineKeySetName, options), + beginUpdate: async ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options?: BareMetalMachineKeySetsUpdateOptionalParams, + ) => { + const poller = update( + context, + resourceGroupName, + clusterName, + bareMetalMachineKeySetName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options?: BareMetalMachineKeySetsUpdateOptionalParams, + ) => { + return await update( + context, + resourceGroupName, + clusterName, + bareMetalMachineKeySetName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + bareMetalMachineKeySetParameters: BareMetalMachineKeySet, + options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + clusterName, + bareMetalMachineKeySetName, + bareMetalMachineKeySetParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + bareMetalMachineKeySetParameters: BareMetalMachineKeySet, + options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + clusterName, + bareMetalMachineKeySetName, + bareMetalMachineKeySetParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + bareMetalMachineKeySetParameters: BareMetalMachineKeySet, + options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + clusterName, + bareMetalMachineKeySetName, + bareMetalMachineKeySetParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + clusterName: string, + bareMetalMachineKeySetName: string, + options?: BareMetalMachineKeySetsGetOptionalParams, + ) => get(context, resourceGroupName, clusterName, bareMetalMachineKeySetName, options), + }; +} + +export function _getBareMetalMachineKeySetsOperations( + context: NetworkCloudContext, +): BareMetalMachineKeySetsOperations { + return { + ..._getBareMetalMachineKeySets(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/bareMetalMachines/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/bareMetalMachines/index.ts new file mode 100644 index 000000000000..0ce24c0b2b25 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/bareMetalMachines/index.ts @@ -0,0 +1,766 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + uncordon, + start, + runReadCommands, + runDataExtractsRestricted, + runDataExtracts, + runCommand, + restart, + replace, + reimage, + powerOff, + cordon, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/bareMetalMachines/operations.js"; +import { + BareMetalMachinesUncordonOptionalParams, + BareMetalMachinesStartOptionalParams, + BareMetalMachinesRunReadCommandsOptionalParams, + BareMetalMachinesRunDataExtractsRestrictedOptionalParams, + BareMetalMachinesRunDataExtractsOptionalParams, + BareMetalMachinesRunCommandOptionalParams, + BareMetalMachinesRestartOptionalParams, + BareMetalMachinesReplaceOptionalParams, + BareMetalMachinesReimageOptionalParams, + BareMetalMachinesPowerOffOptionalParams, + BareMetalMachinesCordonOptionalParams, + BareMetalMachinesListBySubscriptionOptionalParams, + BareMetalMachinesListByResourceGroupOptionalParams, + BareMetalMachinesDeleteOptionalParams, + BareMetalMachinesUpdateOptionalParams, + BareMetalMachinesCreateOrUpdateOptionalParams, + BareMetalMachinesGetOptionalParams, +} from "../../api/bareMetalMachines/options.js"; +import { + OperationStatusResult, + BareMetalMachine, + BareMetalMachineRunCommandParameters, + BareMetalMachineRunDataExtractsParameters, + BareMetalMachineRunReadCommandsParameters, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a BareMetalMachines operations. */ +export interface BareMetalMachinesOperations { + /** Uncordon the provided bare metal machine's Kubernetes node. */ + uncordon: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesUncordonOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use uncordon instead */ + beginUncordon: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesUncordonOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use uncordon instead */ + beginUncordonAndWait: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesUncordonOptionalParams, + ) => Promise; + /** Start the provided bare metal machine. */ + start: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesStartOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use start instead */ + beginStart: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesStartOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use start instead */ + beginStartAndWait: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesStartOptionalParams, + ) => Promise; + /** Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. */ + runReadCommands: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, + options?: BareMetalMachinesRunReadCommandsOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use runReadCommands instead */ + beginRunReadCommands: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, + options?: BareMetalMachinesRunReadCommandsOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use runReadCommands instead */ + beginRunReadCommandsAndWait: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, + options?: BareMetalMachinesRunReadCommandsOptionalParams, + ) => Promise; + /** Run one or more restricted data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. */ + runDataExtractsRestricted: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, + options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use runDataExtractsRestricted instead */ + beginRunDataExtractsRestricted: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, + options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use runDataExtractsRestricted instead */ + beginRunDataExtractsRestrictedAndWait: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, + options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams, + ) => Promise; + /** Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. */ + runDataExtracts: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, + options?: BareMetalMachinesRunDataExtractsOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use runDataExtracts instead */ + beginRunDataExtracts: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, + options?: BareMetalMachinesRunDataExtractsOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use runDataExtracts instead */ + beginRunDataExtractsAndWait: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, + options?: BareMetalMachinesRunDataExtractsOptionalParams, + ) => Promise; + /** Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. */ + runCommand: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, + options?: BareMetalMachinesRunCommandOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use runCommand instead */ + beginRunCommand: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, + options?: BareMetalMachinesRunCommandOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use runCommand instead */ + beginRunCommandAndWait: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, + options?: BareMetalMachinesRunCommandOptionalParams, + ) => Promise; + /** Restart the provided bare metal machine. */ + restart: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesRestartOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use restart instead */ + beginRestart: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesRestartOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use restart instead */ + beginRestartAndWait: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesRestartOptionalParams, + ) => Promise; + /** Replace the provided bare metal machine. */ + replace: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesReplaceOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use replace instead */ + beginReplace: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesReplaceOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use replace instead */ + beginReplaceAndWait: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesReplaceOptionalParams, + ) => Promise; + /** Reimage the provided bare metal machine. */ + reimage: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesReimageOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use reimage instead */ + beginReimage: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesReimageOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use reimage instead */ + beginReimageAndWait: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesReimageOptionalParams, + ) => Promise; + /** Power off the provided bare metal machine. */ + powerOff: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesPowerOffOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use powerOff instead */ + beginPowerOff: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesPowerOffOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use powerOff instead */ + beginPowerOffAndWait: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesPowerOffOptionalParams, + ) => Promise; + /** Cordon the provided bare metal machine's Kubernetes node. */ + cordon: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesCordonOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use cordon instead */ + beginCordon: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesCordonOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use cordon instead */ + beginCordonAndWait: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesCordonOptionalParams, + ) => Promise; + /** Get a list of bare metal machines in the provided subscription. */ + listBySubscription: ( + options?: BareMetalMachinesListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a list of bare metal machines in the provided resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: BareMetalMachinesListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. */ + delete: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesDeleteOptionalParams, + ) => Promise; + /** Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. */ + update: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesUpdateOptionalParams, + ) => PollerLike, BareMetalMachine>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesUpdateOptionalParams, + ) => Promise, BareMetalMachine>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesUpdateOptionalParams, + ) => Promise; + /** Create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. */ + createOrUpdate: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineParameters: BareMetalMachine, + options?: BareMetalMachinesCreateOrUpdateOptionalParams, + ) => PollerLike, BareMetalMachine>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineParameters: BareMetalMachine, + options?: BareMetalMachinesCreateOrUpdateOptionalParams, + ) => Promise, BareMetalMachine>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineParameters: BareMetalMachine, + options?: BareMetalMachinesCreateOrUpdateOptionalParams, + ) => Promise; + /** Get properties of the provided bare metal machine. */ + get: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesGetOptionalParams, + ) => Promise; +} + +function _getBareMetalMachines(context: NetworkCloudContext) { + return { + uncordon: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesUncordonOptionalParams, + ) => uncordon(context, resourceGroupName, bareMetalMachineName, options), + beginUncordon: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesUncordonOptionalParams, + ) => { + const poller = uncordon(context, resourceGroupName, bareMetalMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUncordonAndWait: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesUncordonOptionalParams, + ) => { + return await uncordon(context, resourceGroupName, bareMetalMachineName, options); + }, + start: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesStartOptionalParams, + ) => start(context, resourceGroupName, bareMetalMachineName, options), + beginStart: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesStartOptionalParams, + ) => { + const poller = start(context, resourceGroupName, bareMetalMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStartAndWait: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesStartOptionalParams, + ) => { + return await start(context, resourceGroupName, bareMetalMachineName, options); + }, + runReadCommands: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, + options?: BareMetalMachinesRunReadCommandsOptionalParams, + ) => + runReadCommands( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunReadCommandsParameters, + options, + ), + beginRunReadCommands: async ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, + options?: BareMetalMachinesRunReadCommandsOptionalParams, + ) => { + const poller = runReadCommands( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunReadCommandsParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRunReadCommandsAndWait: async ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, + options?: BareMetalMachinesRunReadCommandsOptionalParams, + ) => { + return await runReadCommands( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunReadCommandsParameters, + options, + ); + }, + runDataExtractsRestricted: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, + options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams, + ) => + runDataExtractsRestricted( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunDataExtractsRestrictedParameters, + options, + ), + beginRunDataExtractsRestricted: async ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, + options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams, + ) => { + const poller = runDataExtractsRestricted( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunDataExtractsRestrictedParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRunDataExtractsRestrictedAndWait: async ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, + options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams, + ) => { + return await runDataExtractsRestricted( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunDataExtractsRestrictedParameters, + options, + ); + }, + runDataExtracts: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, + options?: BareMetalMachinesRunDataExtractsOptionalParams, + ) => + runDataExtracts( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunDataExtractsParameters, + options, + ), + beginRunDataExtracts: async ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, + options?: BareMetalMachinesRunDataExtractsOptionalParams, + ) => { + const poller = runDataExtracts( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunDataExtractsParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRunDataExtractsAndWait: async ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, + options?: BareMetalMachinesRunDataExtractsOptionalParams, + ) => { + return await runDataExtracts( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunDataExtractsParameters, + options, + ); + }, + runCommand: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, + options?: BareMetalMachinesRunCommandOptionalParams, + ) => + runCommand( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunCommandParameters, + options, + ), + beginRunCommand: async ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, + options?: BareMetalMachinesRunCommandOptionalParams, + ) => { + const poller = runCommand( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunCommandParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRunCommandAndWait: async ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, + options?: BareMetalMachinesRunCommandOptionalParams, + ) => { + return await runCommand( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineRunCommandParameters, + options, + ); + }, + restart: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesRestartOptionalParams, + ) => restart(context, resourceGroupName, bareMetalMachineName, options), + beginRestart: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesRestartOptionalParams, + ) => { + const poller = restart(context, resourceGroupName, bareMetalMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRestartAndWait: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesRestartOptionalParams, + ) => { + return await restart(context, resourceGroupName, bareMetalMachineName, options); + }, + replace: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesReplaceOptionalParams, + ) => replace(context, resourceGroupName, bareMetalMachineName, options), + beginReplace: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesReplaceOptionalParams, + ) => { + const poller = replace(context, resourceGroupName, bareMetalMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginReplaceAndWait: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesReplaceOptionalParams, + ) => { + return await replace(context, resourceGroupName, bareMetalMachineName, options); + }, + reimage: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesReimageOptionalParams, + ) => reimage(context, resourceGroupName, bareMetalMachineName, options), + beginReimage: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesReimageOptionalParams, + ) => { + const poller = reimage(context, resourceGroupName, bareMetalMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginReimageAndWait: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesReimageOptionalParams, + ) => { + return await reimage(context, resourceGroupName, bareMetalMachineName, options); + }, + powerOff: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesPowerOffOptionalParams, + ) => powerOff(context, resourceGroupName, bareMetalMachineName, options), + beginPowerOff: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesPowerOffOptionalParams, + ) => { + const poller = powerOff(context, resourceGroupName, bareMetalMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginPowerOffAndWait: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesPowerOffOptionalParams, + ) => { + return await powerOff(context, resourceGroupName, bareMetalMachineName, options); + }, + cordon: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesCordonOptionalParams, + ) => cordon(context, resourceGroupName, bareMetalMachineName, options), + beginCordon: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesCordonOptionalParams, + ) => { + const poller = cordon(context, resourceGroupName, bareMetalMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCordonAndWait: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesCordonOptionalParams, + ) => { + return await cordon(context, resourceGroupName, bareMetalMachineName, options); + }, + listBySubscription: (options?: BareMetalMachinesListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: BareMetalMachinesListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, bareMetalMachineName, options), + beginDelete: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, bareMetalMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, bareMetalMachineName, options); + }, + update: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesUpdateOptionalParams, + ) => update(context, resourceGroupName, bareMetalMachineName, options), + beginUpdate: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesUpdateOptionalParams, + ) => { + const poller = update(context, resourceGroupName, bareMetalMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesUpdateOptionalParams, + ) => { + return await update(context, resourceGroupName, bareMetalMachineName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineParameters: BareMetalMachine, + options?: BareMetalMachinesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineParameters: BareMetalMachine, + options?: BareMetalMachinesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + bareMetalMachineName: string, + bareMetalMachineParameters: BareMetalMachine, + options?: BareMetalMachinesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + bareMetalMachineName, + bareMetalMachineParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + bareMetalMachineName: string, + options?: BareMetalMachinesGetOptionalParams, + ) => get(context, resourceGroupName, bareMetalMachineName, options), + }; +} + +export function _getBareMetalMachinesOperations( + context: NetworkCloudContext, +): BareMetalMachinesOperations { + return { + ..._getBareMetalMachines(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/bmcKeySets/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/bmcKeySets/index.ts new file mode 100644 index 000000000000..4f1002dd4f80 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/bmcKeySets/index.ts @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + listByCluster, + $delete, + update, + createOrUpdate, + get, +} from "../../api/bmcKeySets/operations.js"; +import { + BmcKeySetsListByClusterOptionalParams, + BmcKeySetsDeleteOptionalParams, + BmcKeySetsUpdateOptionalParams, + BmcKeySetsCreateOrUpdateOptionalParams, + BmcKeySetsGetOptionalParams, +} from "../../api/bmcKeySets/options.js"; +import { OperationStatusResult, BmcKeySet } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a BmcKeySets operations. */ +export interface BmcKeySetsOperations { + /** Get a list of baseboard management controller key sets for the provided cluster. */ + listByCluster: ( + resourceGroupName: string, + clusterName: string, + options?: BmcKeySetsListByClusterOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the baseboard management controller key set of the provided cluster. */ + delete: ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options?: BmcKeySetsDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options?: BmcKeySetsDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options?: BmcKeySetsDeleteOptionalParams, + ) => Promise; + /** 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. */ + update: ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options?: BmcKeySetsUpdateOptionalParams, + ) => PollerLike, BmcKeySet>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options?: BmcKeySetsUpdateOptionalParams, + ) => Promise, BmcKeySet>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options?: BmcKeySetsUpdateOptionalParams, + ) => Promise; + /** Create a new baseboard management controller key set or update the existing one for the provided cluster. */ + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + bmcKeySetParameters: BmcKeySet, + options?: BmcKeySetsCreateOrUpdateOptionalParams, + ) => PollerLike, BmcKeySet>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + bmcKeySetParameters: BmcKeySet, + options?: BmcKeySetsCreateOrUpdateOptionalParams, + ) => Promise, BmcKeySet>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + bmcKeySetParameters: BmcKeySet, + options?: BmcKeySetsCreateOrUpdateOptionalParams, + ) => Promise; + /** Get baseboard management controller key set of the provided cluster. */ + get: ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options?: BmcKeySetsGetOptionalParams, + ) => Promise; +} + +function _getBmcKeySets(context: NetworkCloudContext) { + return { + listByCluster: ( + resourceGroupName: string, + clusterName: string, + options?: BmcKeySetsListByClusterOptionalParams, + ) => listByCluster(context, resourceGroupName, clusterName, options), + delete: ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options?: BmcKeySetsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, clusterName, bmcKeySetName, options), + beginDelete: async ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options?: BmcKeySetsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, clusterName, bmcKeySetName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options?: BmcKeySetsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, clusterName, bmcKeySetName, options); + }, + update: ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options?: BmcKeySetsUpdateOptionalParams, + ) => update(context, resourceGroupName, clusterName, bmcKeySetName, options), + beginUpdate: async ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options?: BmcKeySetsUpdateOptionalParams, + ) => { + const poller = update(context, resourceGroupName, clusterName, bmcKeySetName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options?: BmcKeySetsUpdateOptionalParams, + ) => { + return await update(context, resourceGroupName, clusterName, bmcKeySetName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + bmcKeySetParameters: BmcKeySet, + options?: BmcKeySetsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + clusterName, + bmcKeySetName, + bmcKeySetParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + bmcKeySetParameters: BmcKeySet, + options?: BmcKeySetsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + clusterName, + bmcKeySetName, + bmcKeySetParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + bmcKeySetParameters: BmcKeySet, + options?: BmcKeySetsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + clusterName, + bmcKeySetName, + bmcKeySetParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + clusterName: string, + bmcKeySetName: string, + options?: BmcKeySetsGetOptionalParams, + ) => get(context, resourceGroupName, clusterName, bmcKeySetName, options), + }; +} + +export function _getBmcKeySetsOperations(context: NetworkCloudContext): BmcKeySetsOperations { + return { + ..._getBmcKeySets(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/cloudServicesNetworks/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/cloudServicesNetworks/index.ts new file mode 100644 index 000000000000..6cc63e87a52f --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/cloudServicesNetworks/index.ts @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/cloudServicesNetworks/operations.js"; +import { + CloudServicesNetworksListBySubscriptionOptionalParams, + CloudServicesNetworksListByResourceGroupOptionalParams, + CloudServicesNetworksDeleteOptionalParams, + CloudServicesNetworksUpdateOptionalParams, + CloudServicesNetworksCreateOrUpdateOptionalParams, + CloudServicesNetworksGetOptionalParams, +} from "../../api/cloudServicesNetworks/options.js"; +import { OperationStatusResult, CloudServicesNetwork } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a CloudServicesNetworks operations. */ +export interface CloudServicesNetworksOperations { + /** Get a list of cloud services networks in the provided subscription. */ + listBySubscription: ( + options?: CloudServicesNetworksListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a list of cloud services networks in the provided resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: CloudServicesNetworksListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided cloud services network. */ + delete: ( + resourceGroupName: string, + cloudServicesNetworkName: string, + options?: CloudServicesNetworksDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + cloudServicesNetworkName: string, + options?: CloudServicesNetworksDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + cloudServicesNetworkName: string, + options?: CloudServicesNetworksDeleteOptionalParams, + ) => Promise; + /** Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. */ + update: ( + resourceGroupName: string, + cloudServicesNetworkName: string, + options?: CloudServicesNetworksUpdateOptionalParams, + ) => PollerLike, CloudServicesNetwork>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + cloudServicesNetworkName: string, + options?: CloudServicesNetworksUpdateOptionalParams, + ) => Promise, CloudServicesNetwork>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + cloudServicesNetworkName: string, + options?: CloudServicesNetworksUpdateOptionalParams, + ) => Promise; + /** Create a new cloud services network or update the properties of the existing cloud services network. */ + createOrUpdate: ( + resourceGroupName: string, + cloudServicesNetworkName: string, + cloudServicesNetworkParameters: CloudServicesNetwork, + options?: CloudServicesNetworksCreateOrUpdateOptionalParams, + ) => PollerLike, CloudServicesNetwork>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + cloudServicesNetworkName: string, + cloudServicesNetworkParameters: CloudServicesNetwork, + options?: CloudServicesNetworksCreateOrUpdateOptionalParams, + ) => Promise, CloudServicesNetwork>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + cloudServicesNetworkName: string, + cloudServicesNetworkParameters: CloudServicesNetwork, + options?: CloudServicesNetworksCreateOrUpdateOptionalParams, + ) => Promise; + /** Get properties of the provided cloud services network. */ + get: ( + resourceGroupName: string, + cloudServicesNetworkName: string, + options?: CloudServicesNetworksGetOptionalParams, + ) => Promise; +} + +function _getCloudServicesNetworks(context: NetworkCloudContext) { + return { + listBySubscription: (options?: CloudServicesNetworksListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: CloudServicesNetworksListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + cloudServicesNetworkName: string, + options?: CloudServicesNetworksDeleteOptionalParams, + ) => $delete(context, resourceGroupName, cloudServicesNetworkName, options), + beginDelete: async ( + resourceGroupName: string, + cloudServicesNetworkName: string, + options?: CloudServicesNetworksDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, cloudServicesNetworkName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + cloudServicesNetworkName: string, + options?: CloudServicesNetworksDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, cloudServicesNetworkName, options); + }, + update: ( + resourceGroupName: string, + cloudServicesNetworkName: string, + options?: CloudServicesNetworksUpdateOptionalParams, + ) => update(context, resourceGroupName, cloudServicesNetworkName, options), + beginUpdate: async ( + resourceGroupName: string, + cloudServicesNetworkName: string, + options?: CloudServicesNetworksUpdateOptionalParams, + ) => { + const poller = update(context, resourceGroupName, cloudServicesNetworkName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + cloudServicesNetworkName: string, + options?: CloudServicesNetworksUpdateOptionalParams, + ) => { + return await update(context, resourceGroupName, cloudServicesNetworkName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + cloudServicesNetworkName: string, + cloudServicesNetworkParameters: CloudServicesNetwork, + options?: CloudServicesNetworksCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + cloudServicesNetworkName, + cloudServicesNetworkParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + cloudServicesNetworkName: string, + cloudServicesNetworkParameters: CloudServicesNetwork, + options?: CloudServicesNetworksCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + cloudServicesNetworkName, + cloudServicesNetworkParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + cloudServicesNetworkName: string, + cloudServicesNetworkParameters: CloudServicesNetwork, + options?: CloudServicesNetworksCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + cloudServicesNetworkName, + cloudServicesNetworkParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + cloudServicesNetworkName: string, + options?: CloudServicesNetworksGetOptionalParams, + ) => get(context, resourceGroupName, cloudServicesNetworkName, options), + }; +} + +export function _getCloudServicesNetworksOperations( + context: NetworkCloudContext, +): CloudServicesNetworksOperations { + return { + ..._getCloudServicesNetworks(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/clusterManagers/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/clusterManagers/index.ts new file mode 100644 index 000000000000..06ed1fd5bb94 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/clusterManagers/index.ts @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + updateRelayPrivateEndpointConnection, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/clusterManagers/operations.js"; +import { + ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams, + ClusterManagersListBySubscriptionOptionalParams, + ClusterManagersListByResourceGroupOptionalParams, + ClusterManagersDeleteOptionalParams, + ClusterManagersUpdateOptionalParams, + ClusterManagersCreateOrUpdateOptionalParams, + ClusterManagersGetOptionalParams, +} from "../../api/clusterManagers/options.js"; +import { OperationStatusResult, ClusterManager } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ClusterManagers operations. */ +export interface ClusterManagersOperations { + /** Update the private endpoint connection for the Azure Relay namespace managed by the specified cluster manager. Use this operation to approve or reject a pending private endpoint connection request for the relay namespace managed by the cluster manager. */ + updateRelayPrivateEndpointConnection: ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use updateRelayPrivateEndpointConnection instead */ + beginUpdateRelayPrivateEndpointConnection: ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use updateRelayPrivateEndpointConnection instead */ + beginUpdateRelayPrivateEndpointConnectionAndWait: ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams, + ) => Promise; + /** Get a list of cluster managers in the provided subscription. */ + listBySubscription: ( + options?: ClusterManagersListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a list of cluster managers in the provided resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: ClusterManagersListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided cluster manager. */ + delete: ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersDeleteOptionalParams, + ) => Promise; + /** Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. */ + update: ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersUpdateOptionalParams, + ) => Promise; + /** Create a new cluster manager or update properties of the cluster manager if it exists. */ + createOrUpdate: ( + resourceGroupName: string, + clusterManagerName: string, + clusterManagerParameters: ClusterManager, + options?: ClusterManagersCreateOrUpdateOptionalParams, + ) => PollerLike, ClusterManager>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + clusterManagerName: string, + clusterManagerParameters: ClusterManager, + options?: ClusterManagersCreateOrUpdateOptionalParams, + ) => Promise, ClusterManager>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + clusterManagerName: string, + clusterManagerParameters: ClusterManager, + options?: ClusterManagersCreateOrUpdateOptionalParams, + ) => Promise; + /** Get the properties of the provided cluster manager. */ + get: ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersGetOptionalParams, + ) => Promise; +} + +function _getClusterManagers(context: NetworkCloudContext) { + return { + updateRelayPrivateEndpointConnection: ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams, + ) => + updateRelayPrivateEndpointConnection(context, resourceGroupName, clusterManagerName, options), + beginUpdateRelayPrivateEndpointConnection: async ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams, + ) => { + const poller = updateRelayPrivateEndpointConnection( + context, + resourceGroupName, + clusterManagerName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateRelayPrivateEndpointConnectionAndWait: async ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams, + ) => { + return await updateRelayPrivateEndpointConnection( + context, + resourceGroupName, + clusterManagerName, + options, + ); + }, + listBySubscription: (options?: ClusterManagersListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: ClusterManagersListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersDeleteOptionalParams, + ) => $delete(context, resourceGroupName, clusterManagerName, options), + beginDelete: async ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, clusterManagerName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, clusterManagerName, options); + }, + update: ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersUpdateOptionalParams, + ) => update(context, resourceGroupName, clusterManagerName, options), + createOrUpdate: ( + resourceGroupName: string, + clusterManagerName: string, + clusterManagerParameters: ClusterManager, + options?: ClusterManagersCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + clusterManagerName, + clusterManagerParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + clusterManagerName: string, + clusterManagerParameters: ClusterManager, + options?: ClusterManagersCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + clusterManagerName, + clusterManagerParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + clusterManagerName: string, + clusterManagerParameters: ClusterManager, + options?: ClusterManagersCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + clusterManagerName, + clusterManagerParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + clusterManagerName: string, + options?: ClusterManagersGetOptionalParams, + ) => get(context, resourceGroupName, clusterManagerName, options), + }; +} + +export function _getClusterManagersOperations( + context: NetworkCloudContext, +): ClusterManagersOperations { + return { + ..._getClusterManagers(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/clusters/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/clusters/index.ts new file mode 100644 index 000000000000..6a1521c899a8 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/clusters/index.ts @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + updateVersion, + scanRuntime, + rotateCredential, + inspect, + deploy, + continueUpdateVersion, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/clusters/operations.js"; +import { + ClustersUpdateVersionOptionalParams, + ClustersScanRuntimeOptionalParams, + ClustersRotateCredentialOptionalParams, + ClustersInspectOptionalParams, + ClustersDeployOptionalParams, + ClustersContinueUpdateVersionOptionalParams, + ClustersListBySubscriptionOptionalParams, + ClustersListByResourceGroupOptionalParams, + ClustersDeleteOptionalParams, + ClustersUpdateOptionalParams, + ClustersCreateOrUpdateOptionalParams, + ClustersGetOptionalParams, +} from "../../api/clusters/options.js"; +import { + OperationStatusResult, + Cluster, + ClusterContinueUpdateVersionParameters, + ClusterRotateCredentialParameters, + ClusterUpdateVersionParameters, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Clusters operations. */ +export interface ClustersOperations { + /** Update the version of the provided cluster to one of the available supported versions. */ + updateVersion: ( + resourceGroupName: string, + clusterName: string, + clusterUpdateVersionParameters: ClusterUpdateVersionParameters, + options?: ClustersUpdateVersionOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use updateVersion instead */ + beginUpdateVersion: ( + resourceGroupName: string, + clusterName: string, + clusterUpdateVersionParameters: ClusterUpdateVersionParameters, + options?: ClustersUpdateVersionOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use updateVersion instead */ + beginUpdateVersionAndWait: ( + resourceGroupName: string, + clusterName: string, + clusterUpdateVersionParameters: ClusterUpdateVersionParameters, + options?: ClustersUpdateVersionOptionalParams, + ) => Promise; + /** Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. */ + scanRuntime: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersScanRuntimeOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use scanRuntime instead */ + beginScanRuntime: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersScanRuntimeOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use scanRuntime instead */ + beginScanRuntimeAndWait: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersScanRuntimeOptionalParams, + ) => Promise; + /** Rotate the specified cluster credential. */ + rotateCredential: ( + resourceGroupName: string, + clusterName: string, + body: ClusterRotateCredentialParameters, + options?: ClustersRotateCredentialOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use rotateCredential instead */ + beginRotateCredential: ( + resourceGroupName: string, + clusterName: string, + body: ClusterRotateCredentialParameters, + options?: ClustersRotateCredentialOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use rotateCredential instead */ + beginRotateCredentialAndWait: ( + resourceGroupName: string, + clusterName: string, + body: ClusterRotateCredentialParameters, + options?: ClustersRotateCredentialOptionalParams, + ) => Promise; + /** Trigger an inspection of the cluster to perform validation and optional corrective actions based on the supplied additional actions and filters. */ + inspect: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersInspectOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use inspect instead */ + beginInspect: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersInspectOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use inspect instead */ + beginInspectAndWait: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersInspectOptionalParams, + ) => Promise; + /** Deploy the cluster using the rack configuration provided during creation. */ + deploy: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersDeployOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use deploy instead */ + beginDeploy: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersDeployOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use deploy instead */ + beginDeployAndWait: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersDeployOptionalParams, + ) => Promise; + /** Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. */ + continueUpdateVersion: ( + resourceGroupName: string, + clusterName: string, + clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, + options?: ClustersContinueUpdateVersionOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use continueUpdateVersion instead */ + beginContinueUpdateVersion: ( + resourceGroupName: string, + clusterName: string, + clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, + options?: ClustersContinueUpdateVersionOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use continueUpdateVersion instead */ + beginContinueUpdateVersionAndWait: ( + resourceGroupName: string, + clusterName: string, + clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, + options?: ClustersContinueUpdateVersionOptionalParams, + ) => Promise; + /** Get a list of clusters in the provided subscription. */ + listBySubscription: ( + options?: ClustersListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a list of clusters in the provided resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: ClustersListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided cluster. */ + delete: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersDeleteOptionalParams, + ) => Promise; + /** Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. */ + update: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersUpdateOptionalParams, + ) => PollerLike, Cluster>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersUpdateOptionalParams, + ) => Promise, Cluster>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersUpdateOptionalParams, + ) => Promise; + /** Create a new cluster or update the properties of the cluster if it exists. */ + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + clusterParameters: Cluster, + options?: ClustersCreateOrUpdateOptionalParams, + ) => PollerLike, Cluster>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + clusterName: string, + clusterParameters: Cluster, + options?: ClustersCreateOrUpdateOptionalParams, + ) => Promise, Cluster>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + clusterName: string, + clusterParameters: Cluster, + options?: ClustersCreateOrUpdateOptionalParams, + ) => Promise; + /** Get properties of the provided cluster. */ + get: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersGetOptionalParams, + ) => Promise; +} + +function _getClusters(context: NetworkCloudContext) { + return { + updateVersion: ( + resourceGroupName: string, + clusterName: string, + clusterUpdateVersionParameters: ClusterUpdateVersionParameters, + options?: ClustersUpdateVersionOptionalParams, + ) => + updateVersion( + context, + resourceGroupName, + clusterName, + clusterUpdateVersionParameters, + options, + ), + beginUpdateVersion: async ( + resourceGroupName: string, + clusterName: string, + clusterUpdateVersionParameters: ClusterUpdateVersionParameters, + options?: ClustersUpdateVersionOptionalParams, + ) => { + const poller = updateVersion( + context, + resourceGroupName, + clusterName, + clusterUpdateVersionParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateVersionAndWait: async ( + resourceGroupName: string, + clusterName: string, + clusterUpdateVersionParameters: ClusterUpdateVersionParameters, + options?: ClustersUpdateVersionOptionalParams, + ) => { + return await updateVersion( + context, + resourceGroupName, + clusterName, + clusterUpdateVersionParameters, + options, + ); + }, + scanRuntime: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersScanRuntimeOptionalParams, + ) => scanRuntime(context, resourceGroupName, clusterName, options), + beginScanRuntime: async ( + resourceGroupName: string, + clusterName: string, + options?: ClustersScanRuntimeOptionalParams, + ) => { + const poller = scanRuntime(context, resourceGroupName, clusterName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginScanRuntimeAndWait: async ( + resourceGroupName: string, + clusterName: string, + options?: ClustersScanRuntimeOptionalParams, + ) => { + return await scanRuntime(context, resourceGroupName, clusterName, options); + }, + rotateCredential: ( + resourceGroupName: string, + clusterName: string, + body: ClusterRotateCredentialParameters, + options?: ClustersRotateCredentialOptionalParams, + ) => rotateCredential(context, resourceGroupName, clusterName, body, options), + beginRotateCredential: async ( + resourceGroupName: string, + clusterName: string, + body: ClusterRotateCredentialParameters, + options?: ClustersRotateCredentialOptionalParams, + ) => { + const poller = rotateCredential(context, resourceGroupName, clusterName, body, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRotateCredentialAndWait: async ( + resourceGroupName: string, + clusterName: string, + body: ClusterRotateCredentialParameters, + options?: ClustersRotateCredentialOptionalParams, + ) => { + return await rotateCredential(context, resourceGroupName, clusterName, body, options); + }, + inspect: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersInspectOptionalParams, + ) => inspect(context, resourceGroupName, clusterName, options), + beginInspect: async ( + resourceGroupName: string, + clusterName: string, + options?: ClustersInspectOptionalParams, + ) => { + const poller = inspect(context, resourceGroupName, clusterName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginInspectAndWait: async ( + resourceGroupName: string, + clusterName: string, + options?: ClustersInspectOptionalParams, + ) => { + return await inspect(context, resourceGroupName, clusterName, options); + }, + deploy: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersDeployOptionalParams, + ) => deploy(context, resourceGroupName, clusterName, options), + beginDeploy: async ( + resourceGroupName: string, + clusterName: string, + options?: ClustersDeployOptionalParams, + ) => { + const poller = deploy(context, resourceGroupName, clusterName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeployAndWait: async ( + resourceGroupName: string, + clusterName: string, + options?: ClustersDeployOptionalParams, + ) => { + return await deploy(context, resourceGroupName, clusterName, options); + }, + continueUpdateVersion: ( + resourceGroupName: string, + clusterName: string, + clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, + options?: ClustersContinueUpdateVersionOptionalParams, + ) => + continueUpdateVersion( + context, + resourceGroupName, + clusterName, + clusterContinueUpdateVersionParameters, + options, + ), + beginContinueUpdateVersion: async ( + resourceGroupName: string, + clusterName: string, + clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, + options?: ClustersContinueUpdateVersionOptionalParams, + ) => { + const poller = continueUpdateVersion( + context, + resourceGroupName, + clusterName, + clusterContinueUpdateVersionParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginContinueUpdateVersionAndWait: async ( + resourceGroupName: string, + clusterName: string, + clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, + options?: ClustersContinueUpdateVersionOptionalParams, + ) => { + return await continueUpdateVersion( + context, + resourceGroupName, + clusterName, + clusterContinueUpdateVersionParameters, + options, + ); + }, + listBySubscription: (options?: ClustersListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: ClustersListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersDeleteOptionalParams, + ) => $delete(context, resourceGroupName, clusterName, options), + beginDelete: async ( + resourceGroupName: string, + clusterName: string, + options?: ClustersDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, clusterName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + clusterName: string, + options?: ClustersDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, clusterName, options); + }, + update: ( + resourceGroupName: string, + clusterName: string, + options?: ClustersUpdateOptionalParams, + ) => update(context, resourceGroupName, clusterName, options), + beginUpdate: async ( + resourceGroupName: string, + clusterName: string, + options?: ClustersUpdateOptionalParams, + ) => { + const poller = update(context, resourceGroupName, clusterName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + clusterName: string, + options?: ClustersUpdateOptionalParams, + ) => { + return await update(context, resourceGroupName, clusterName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + clusterParameters: Cluster, + options?: ClustersCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, clusterName, clusterParameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + clusterName: string, + clusterParameters: Cluster, + options?: ClustersCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + clusterName, + clusterParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + clusterName: string, + clusterParameters: Cluster, + options?: ClustersCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + clusterName, + clusterParameters, + options, + ); + }, + get: (resourceGroupName: string, clusterName: string, options?: ClustersGetOptionalParams) => + get(context, resourceGroupName, clusterName, options), + }; +} + +export function _getClustersOperations(context: NetworkCloudContext): ClustersOperations { + return { + ..._getClusters(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/consoles/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/consoles/index.ts new file mode 100644 index 000000000000..342d603c1f96 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/consoles/index.ts @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + listByVirtualMachine, + $delete, + update, + createOrUpdate, + get, +} from "../../api/consoles/operations.js"; +import { + ConsolesListByVirtualMachineOptionalParams, + ConsolesDeleteOptionalParams, + ConsolesUpdateOptionalParams, + ConsolesCreateOrUpdateOptionalParams, + ConsolesGetOptionalParams, +} from "../../api/consoles/options.js"; +import { OperationStatusResult, Console } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Consoles operations. */ +export interface ConsolesOperations { + /** Get a list of consoles for the provided virtual machine. */ + listByVirtualMachine: ( + resourceGroupName: string, + virtualMachineName: string, + options?: ConsolesListByVirtualMachineOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided virtual machine console. */ + delete: ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options?: ConsolesDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options?: ConsolesDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options?: ConsolesDeleteOptionalParams, + ) => Promise; + /** 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. */ + update: ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options?: ConsolesUpdateOptionalParams, + ) => PollerLike, Console>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options?: ConsolesUpdateOptionalParams, + ) => Promise, Console>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options?: ConsolesUpdateOptionalParams, + ) => Promise; + /** Create a new virtual machine console or update the properties of the existing virtual machine console. */ + createOrUpdate: ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + consoleParameters: Console, + options?: ConsolesCreateOrUpdateOptionalParams, + ) => PollerLike, Console>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + consoleParameters: Console, + options?: ConsolesCreateOrUpdateOptionalParams, + ) => Promise, Console>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + consoleParameters: Console, + options?: ConsolesCreateOrUpdateOptionalParams, + ) => Promise; + /** Get properties of the provided virtual machine console. */ + get: ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options?: ConsolesGetOptionalParams, + ) => Promise; +} + +function _getConsoles(context: NetworkCloudContext) { + return { + listByVirtualMachine: ( + resourceGroupName: string, + virtualMachineName: string, + options?: ConsolesListByVirtualMachineOptionalParams, + ) => listByVirtualMachine(context, resourceGroupName, virtualMachineName, options), + delete: ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options?: ConsolesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualMachineName, consoleName, options), + beginDelete: async ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options?: ConsolesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualMachineName, consoleName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options?: ConsolesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualMachineName, consoleName, options); + }, + update: ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options?: ConsolesUpdateOptionalParams, + ) => update(context, resourceGroupName, virtualMachineName, consoleName, options), + beginUpdate: async ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options?: ConsolesUpdateOptionalParams, + ) => { + const poller = update(context, resourceGroupName, virtualMachineName, consoleName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options?: ConsolesUpdateOptionalParams, + ) => { + return await update(context, resourceGroupName, virtualMachineName, consoleName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + consoleParameters: Console, + options?: ConsolesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + virtualMachineName, + consoleName, + consoleParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + consoleParameters: Console, + options?: ConsolesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualMachineName, + consoleName, + consoleParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + consoleParameters: Console, + options?: ConsolesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualMachineName, + consoleName, + consoleParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualMachineName: string, + consoleName: string, + options?: ConsolesGetOptionalParams, + ) => get(context, resourceGroupName, virtualMachineName, consoleName, options), + }; +} + +export function _getConsolesOperations(context: NetworkCloudContext): ConsolesOperations { + return { + ..._getConsoles(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/index.ts new file mode 100644 index 000000000000..1453f8b27867 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/index.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export type { AccessBridgesOperations } from "./accessBridges/index.js"; +export type { AgentPoolsOperations } from "./agentPools/index.js"; +export type { BareMetalMachineKeySetsOperations } from "./bareMetalMachineKeySets/index.js"; +export type { BareMetalMachinesOperations } from "./bareMetalMachines/index.js"; +export type { BmcKeySetsOperations } from "./bmcKeySets/index.js"; +export type { CloudServicesNetworksOperations } from "./cloudServicesNetworks/index.js"; +export type { ClusterManagersOperations } from "./clusterManagers/index.js"; +export type { ClustersOperations } from "./clusters/index.js"; +export type { ConsolesOperations } from "./consoles/index.js"; +export type { KubernetesClusterFeaturesOperations } from "./kubernetesClusterFeatures/index.js"; +export type { KubernetesClustersOperations } from "./kubernetesClusters/index.js"; +export type { KubernetesVersionsOperations } from "./kubernetesVersions/index.js"; +export type { L2NetworksOperations } from "./l2Networks/index.js"; +export type { L3NetworksOperations } from "./l3Networks/index.js"; +export type { MetricsConfigurationsOperations } from "./metricsConfigurations/index.js"; +export type { OperationsOperations } from "./operations/index.js"; +export type { RacksOperations } from "./racks/index.js"; +export type { RackSkusOperations } from "./rackSkus/index.js"; +export type { StorageAppliancesOperations } from "./storageAppliances/index.js"; +export type { TrunkedNetworksOperations } from "./trunkedNetworks/index.js"; +export type { VirtualMachinesOperations } from "./virtualMachines/index.js"; +export type { VolumesOperations } from "./volumes/index.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/kubernetesClusterFeatures/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/kubernetesClusterFeatures/index.ts new file mode 100644 index 000000000000..649897333d73 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/kubernetesClusterFeatures/index.ts @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + listByKubernetesCluster, + $delete, + update, + createOrUpdate, + get, +} from "../../api/kubernetesClusterFeatures/operations.js"; +import { + KubernetesClusterFeaturesListByKubernetesClusterOptionalParams, + KubernetesClusterFeaturesDeleteOptionalParams, + KubernetesClusterFeaturesUpdateOptionalParams, + KubernetesClusterFeaturesCreateOrUpdateOptionalParams, + KubernetesClusterFeaturesGetOptionalParams, +} from "../../api/kubernetesClusterFeatures/options.js"; +import { OperationStatusResult, KubernetesClusterFeature } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a KubernetesClusterFeatures operations. */ +export interface KubernetesClusterFeaturesOperations { + /** Get a list of features for the provided Kubernetes cluster. */ + listByKubernetesCluster: ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClusterFeaturesListByKubernetesClusterOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided Kubernetes cluster feature. */ + delete: ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options?: KubernetesClusterFeaturesDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options?: KubernetesClusterFeaturesDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options?: KubernetesClusterFeaturesDeleteOptionalParams, + ) => Promise; + /** Patch properties of the provided Kubernetes cluster feature. */ + update: ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options?: KubernetesClusterFeaturesUpdateOptionalParams, + ) => PollerLike, KubernetesClusterFeature>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options?: KubernetesClusterFeaturesUpdateOptionalParams, + ) => Promise< + SimplePollerLike, KubernetesClusterFeature> + >; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options?: KubernetesClusterFeaturesUpdateOptionalParams, + ) => Promise; + /** Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. */ + createOrUpdate: ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + kubernetesClusterFeatureParameters: KubernetesClusterFeature, + options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams, + ) => PollerLike, KubernetesClusterFeature>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + kubernetesClusterFeatureParameters: KubernetesClusterFeature, + options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike, KubernetesClusterFeature> + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + kubernetesClusterFeatureParameters: KubernetesClusterFeature, + options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams, + ) => Promise; + /** Get properties of the provided the Kubernetes cluster feature. */ + get: ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options?: KubernetesClusterFeaturesGetOptionalParams, + ) => Promise; +} + +function _getKubernetesClusterFeatures(context: NetworkCloudContext) { + return { + listByKubernetesCluster: ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClusterFeaturesListByKubernetesClusterOptionalParams, + ) => listByKubernetesCluster(context, resourceGroupName, kubernetesClusterName, options), + delete: ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options?: KubernetesClusterFeaturesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, kubernetesClusterName, featureName, options), + beginDelete: async ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options?: KubernetesClusterFeaturesDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + kubernetesClusterName, + featureName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options?: KubernetesClusterFeaturesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, kubernetesClusterName, featureName, options); + }, + update: ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options?: KubernetesClusterFeaturesUpdateOptionalParams, + ) => update(context, resourceGroupName, kubernetesClusterName, featureName, options), + beginUpdate: async ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options?: KubernetesClusterFeaturesUpdateOptionalParams, + ) => { + const poller = update( + context, + resourceGroupName, + kubernetesClusterName, + featureName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options?: KubernetesClusterFeaturesUpdateOptionalParams, + ) => { + return await update(context, resourceGroupName, kubernetesClusterName, featureName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + kubernetesClusterFeatureParameters: KubernetesClusterFeature, + options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + kubernetesClusterName, + featureName, + kubernetesClusterFeatureParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + kubernetesClusterFeatureParameters: KubernetesClusterFeature, + options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + kubernetesClusterName, + featureName, + kubernetesClusterFeatureParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + kubernetesClusterFeatureParameters: KubernetesClusterFeature, + options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + kubernetesClusterName, + featureName, + kubernetesClusterFeatureParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + kubernetesClusterName: string, + featureName: string, + options?: KubernetesClusterFeaturesGetOptionalParams, + ) => get(context, resourceGroupName, kubernetesClusterName, featureName, options), + }; +} + +export function _getKubernetesClusterFeaturesOperations( + context: NetworkCloudContext, +): KubernetesClusterFeaturesOperations { + return { + ..._getKubernetesClusterFeatures(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/kubernetesClusters/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/kubernetesClusters/index.ts new file mode 100644 index 000000000000..355e59cb5ac0 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/kubernetesClusters/index.ts @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + restartNode, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/kubernetesClusters/operations.js"; +import { + KubernetesClustersRestartNodeOptionalParams, + KubernetesClustersListBySubscriptionOptionalParams, + KubernetesClustersListByResourceGroupOptionalParams, + KubernetesClustersDeleteOptionalParams, + KubernetesClustersUpdateOptionalParams, + KubernetesClustersCreateOrUpdateOptionalParams, + KubernetesClustersGetOptionalParams, +} from "../../api/kubernetesClusters/options.js"; +import { + OperationStatusResult, + KubernetesCluster, + KubernetesClusterRestartNodeParameters, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a KubernetesClusters operations. */ +export interface KubernetesClustersOperations { + /** Restart a targeted node of a Kubernetes cluster. */ + restartNode: ( + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, + options?: KubernetesClustersRestartNodeOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use restartNode instead */ + beginRestartNode: ( + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, + options?: KubernetesClustersRestartNodeOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use restartNode instead */ + beginRestartNodeAndWait: ( + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, + options?: KubernetesClustersRestartNodeOptionalParams, + ) => Promise; + /** Get a list of Kubernetes clusters in the provided subscription. */ + listBySubscription: ( + options?: KubernetesClustersListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a list of Kubernetes clusters in the provided resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: KubernetesClustersListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided Kubernetes cluster. */ + delete: ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClustersDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClustersDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClustersDeleteOptionalParams, + ) => Promise; + /** Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. */ + update: ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClustersUpdateOptionalParams, + ) => PollerLike, KubernetesCluster>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClustersUpdateOptionalParams, + ) => Promise, KubernetesCluster>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClustersUpdateOptionalParams, + ) => Promise; + /** Create a new Kubernetes cluster or update the properties of the existing one. */ + createOrUpdate: ( + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterParameters: KubernetesCluster, + options?: KubernetesClustersCreateOrUpdateOptionalParams, + ) => PollerLike, KubernetesCluster>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterParameters: KubernetesCluster, + options?: KubernetesClustersCreateOrUpdateOptionalParams, + ) => Promise, KubernetesCluster>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterParameters: KubernetesCluster, + options?: KubernetesClustersCreateOrUpdateOptionalParams, + ) => Promise; + /** Get properties of the provided the Kubernetes cluster. */ + get: ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClustersGetOptionalParams, + ) => Promise; +} + +function _getKubernetesClusters(context: NetworkCloudContext) { + return { + restartNode: ( + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, + options?: KubernetesClustersRestartNodeOptionalParams, + ) => + restartNode( + context, + resourceGroupName, + kubernetesClusterName, + kubernetesClusterRestartNodeParameters, + options, + ), + beginRestartNode: async ( + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, + options?: KubernetesClustersRestartNodeOptionalParams, + ) => { + const poller = restartNode( + context, + resourceGroupName, + kubernetesClusterName, + kubernetesClusterRestartNodeParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRestartNodeAndWait: async ( + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, + options?: KubernetesClustersRestartNodeOptionalParams, + ) => { + return await restartNode( + context, + resourceGroupName, + kubernetesClusterName, + kubernetesClusterRestartNodeParameters, + options, + ); + }, + listBySubscription: (options?: KubernetesClustersListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: KubernetesClustersListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClustersDeleteOptionalParams, + ) => $delete(context, resourceGroupName, kubernetesClusterName, options), + beginDelete: async ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClustersDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, kubernetesClusterName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClustersDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, kubernetesClusterName, options); + }, + update: ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClustersUpdateOptionalParams, + ) => update(context, resourceGroupName, kubernetesClusterName, options), + beginUpdate: async ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClustersUpdateOptionalParams, + ) => { + const poller = update(context, resourceGroupName, kubernetesClusterName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClustersUpdateOptionalParams, + ) => { + return await update(context, resourceGroupName, kubernetesClusterName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterParameters: KubernetesCluster, + options?: KubernetesClustersCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + kubernetesClusterName, + kubernetesClusterParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterParameters: KubernetesCluster, + options?: KubernetesClustersCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + kubernetesClusterName, + kubernetesClusterParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + kubernetesClusterName: string, + kubernetesClusterParameters: KubernetesCluster, + options?: KubernetesClustersCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + kubernetesClusterName, + kubernetesClusterParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + kubernetesClusterName: string, + options?: KubernetesClustersGetOptionalParams, + ) => get(context, resourceGroupName, kubernetesClusterName, options), + }; +} + +export function _getKubernetesClustersOperations( + context: NetworkCloudContext, +): KubernetesClustersOperations { + return { + ..._getKubernetesClusters(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/kubernetesVersions/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/kubernetesVersions/index.ts new file mode 100644 index 000000000000..5af987c930bb --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/kubernetesVersions/index.ts @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/kubernetesVersions/operations.js"; +import { + KubernetesVersionsListBySubscriptionOptionalParams, + KubernetesVersionsListByResourceGroupOptionalParams, + KubernetesVersionsDeleteOptionalParams, + KubernetesVersionsUpdateOptionalParams, + KubernetesVersionsCreateOrUpdateOptionalParams, + KubernetesVersionsGetOptionalParams, +} from "../../api/kubernetesVersions/options.js"; +import { OperationStatusResult, KubernetesVersion } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a KubernetesVersions operations. */ +export interface KubernetesVersionsOperations { + /** Get a list of Kubernetes version resources in the provided subscription. */ + listBySubscription: ( + options?: KubernetesVersionsListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a list of Kubernetes version resources in the provided resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: KubernetesVersionsListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the specified Kubernetes version resource. */ + delete: ( + resourceGroupName: string, + kubernetesVersionName: string, + options?: KubernetesVersionsDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + kubernetesVersionName: string, + options?: KubernetesVersionsDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + kubernetesVersionName: string, + options?: KubernetesVersionsDeleteOptionalParams, + ) => Promise; + /** Update tags associated with the Kubernetes version resource. No other properties are supported for update. */ + update: ( + resourceGroupName: string, + kubernetesVersionName: string, + options?: KubernetesVersionsUpdateOptionalParams, + ) => PollerLike, KubernetesVersion>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + kubernetesVersionName: string, + options?: KubernetesVersionsUpdateOptionalParams, + ) => Promise, KubernetesVersion>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + kubernetesVersionName: string, + options?: KubernetesVersionsUpdateOptionalParams, + ) => Promise; + /** Create the Kubernetes version resource or update its tags. This resource is system managed and should only be created with the name "default". */ + createOrUpdate: ( + resourceGroupName: string, + kubernetesVersionName: string, + kubernetesVersionParameters: KubernetesVersion, + options?: KubernetesVersionsCreateOrUpdateOptionalParams, + ) => PollerLike, KubernetesVersion>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + kubernetesVersionName: string, + kubernetesVersionParameters: KubernetesVersion, + options?: KubernetesVersionsCreateOrUpdateOptionalParams, + ) => Promise, KubernetesVersion>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + kubernetesVersionName: string, + kubernetesVersionParameters: KubernetesVersion, + options?: KubernetesVersionsCreateOrUpdateOptionalParams, + ) => Promise; + /** Retrieve the Kubernetes version resource that describes the available Kubernetes versions for deployment. */ + get: ( + resourceGroupName: string, + kubernetesVersionName: string, + options?: KubernetesVersionsGetOptionalParams, + ) => Promise; +} + +function _getKubernetesVersions(context: NetworkCloudContext) { + return { + listBySubscription: (options?: KubernetesVersionsListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: KubernetesVersionsListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + kubernetesVersionName: string, + options?: KubernetesVersionsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, kubernetesVersionName, options), + beginDelete: async ( + resourceGroupName: string, + kubernetesVersionName: string, + options?: KubernetesVersionsDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, kubernetesVersionName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + kubernetesVersionName: string, + options?: KubernetesVersionsDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, kubernetesVersionName, options); + }, + update: ( + resourceGroupName: string, + kubernetesVersionName: string, + options?: KubernetesVersionsUpdateOptionalParams, + ) => update(context, resourceGroupName, kubernetesVersionName, options), + beginUpdate: async ( + resourceGroupName: string, + kubernetesVersionName: string, + options?: KubernetesVersionsUpdateOptionalParams, + ) => { + const poller = update(context, resourceGroupName, kubernetesVersionName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + kubernetesVersionName: string, + options?: KubernetesVersionsUpdateOptionalParams, + ) => { + return await update(context, resourceGroupName, kubernetesVersionName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + kubernetesVersionName: string, + kubernetesVersionParameters: KubernetesVersion, + options?: KubernetesVersionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + kubernetesVersionName, + kubernetesVersionParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + kubernetesVersionName: string, + kubernetesVersionParameters: KubernetesVersion, + options?: KubernetesVersionsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + kubernetesVersionName, + kubernetesVersionParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + kubernetesVersionName: string, + kubernetesVersionParameters: KubernetesVersion, + options?: KubernetesVersionsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + kubernetesVersionName, + kubernetesVersionParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + kubernetesVersionName: string, + options?: KubernetesVersionsGetOptionalParams, + ) => get(context, resourceGroupName, kubernetesVersionName, options), + }; +} + +export function _getKubernetesVersionsOperations( + context: NetworkCloudContext, +): KubernetesVersionsOperations { + return { + ..._getKubernetesVersions(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/l2Networks/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/l2Networks/index.ts new file mode 100644 index 000000000000..71cfec628d1d --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/l2Networks/index.ts @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/l2Networks/operations.js"; +import { + L2NetworksListBySubscriptionOptionalParams, + L2NetworksListByResourceGroupOptionalParams, + L2NetworksDeleteOptionalParams, + L2NetworksUpdateOptionalParams, + L2NetworksCreateOrUpdateOptionalParams, + L2NetworksGetOptionalParams, +} from "../../api/l2Networks/options.js"; +import { OperationStatusResult, L2Network } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a L2Networks operations. */ +export interface L2NetworksOperations { + /** Get a list of layer 2 (L2) networks in the provided subscription. */ + listBySubscription: ( + options?: L2NetworksListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a list of layer 2 (L2) networks in the provided resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: L2NetworksListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided layer 2 (L2) network. */ + delete: ( + resourceGroupName: string, + l2NetworkName: string, + options?: L2NetworksDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + l2NetworkName: string, + options?: L2NetworksDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + l2NetworkName: string, + options?: L2NetworksDeleteOptionalParams, + ) => Promise; + /** Update tags associated with the provided layer 2 (L2) network. */ + update: ( + resourceGroupName: string, + l2NetworkName: string, + options?: L2NetworksUpdateOptionalParams, + ) => Promise; + /** Create a new layer 2 (L2) network or update the properties of the existing network. */ + createOrUpdate: ( + resourceGroupName: string, + l2NetworkName: string, + l2NetworkParameters: L2Network, + options?: L2NetworksCreateOrUpdateOptionalParams, + ) => PollerLike, L2Network>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + l2NetworkName: string, + l2NetworkParameters: L2Network, + options?: L2NetworksCreateOrUpdateOptionalParams, + ) => Promise, L2Network>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + l2NetworkName: string, + l2NetworkParameters: L2Network, + options?: L2NetworksCreateOrUpdateOptionalParams, + ) => Promise; + /** Get properties of the provided layer 2 (L2) network. */ + get: ( + resourceGroupName: string, + l2NetworkName: string, + options?: L2NetworksGetOptionalParams, + ) => Promise; +} + +function _getL2Networks(context: NetworkCloudContext) { + return { + listBySubscription: (options?: L2NetworksListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: L2NetworksListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + l2NetworkName: string, + options?: L2NetworksDeleteOptionalParams, + ) => $delete(context, resourceGroupName, l2NetworkName, options), + beginDelete: async ( + resourceGroupName: string, + l2NetworkName: string, + options?: L2NetworksDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, l2NetworkName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + l2NetworkName: string, + options?: L2NetworksDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, l2NetworkName, options); + }, + update: ( + resourceGroupName: string, + l2NetworkName: string, + options?: L2NetworksUpdateOptionalParams, + ) => update(context, resourceGroupName, l2NetworkName, options), + createOrUpdate: ( + resourceGroupName: string, + l2NetworkName: string, + l2NetworkParameters: L2Network, + options?: L2NetworksCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, l2NetworkName, l2NetworkParameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + l2NetworkName: string, + l2NetworkParameters: L2Network, + options?: L2NetworksCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + l2NetworkName, + l2NetworkParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + l2NetworkName: string, + l2NetworkParameters: L2Network, + options?: L2NetworksCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + l2NetworkName, + l2NetworkParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + l2NetworkName: string, + options?: L2NetworksGetOptionalParams, + ) => get(context, resourceGroupName, l2NetworkName, options), + }; +} + +export function _getL2NetworksOperations(context: NetworkCloudContext): L2NetworksOperations { + return { + ..._getL2Networks(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/l3Networks/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/l3Networks/index.ts new file mode 100644 index 000000000000..6ed75f4413f9 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/l3Networks/index.ts @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/l3Networks/operations.js"; +import { + L3NetworksListBySubscriptionOptionalParams, + L3NetworksListByResourceGroupOptionalParams, + L3NetworksDeleteOptionalParams, + L3NetworksUpdateOptionalParams, + L3NetworksCreateOrUpdateOptionalParams, + L3NetworksGetOptionalParams, +} from "../../api/l3Networks/options.js"; +import { OperationStatusResult, L3Network } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a L3Networks operations. */ +export interface L3NetworksOperations { + /** Get a list of layer 3 (L3) networks in the provided subscription. */ + listBySubscription: ( + options?: L3NetworksListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a list of layer 3 (L3) networks in the provided resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: L3NetworksListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided layer 3 (L3) network. */ + delete: ( + resourceGroupName: string, + l3NetworkName: string, + options?: L3NetworksDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + l3NetworkName: string, + options?: L3NetworksDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + l3NetworkName: string, + options?: L3NetworksDeleteOptionalParams, + ) => Promise; + /** Update tags associated with the provided layer 3 (L3) network. */ + update: ( + resourceGroupName: string, + l3NetworkName: string, + options?: L3NetworksUpdateOptionalParams, + ) => Promise; + /** Create a new layer 3 (L3) network or update the properties of the existing network. */ + createOrUpdate: ( + resourceGroupName: string, + l3NetworkName: string, + l3NetworkParameters: L3Network, + options?: L3NetworksCreateOrUpdateOptionalParams, + ) => PollerLike, L3Network>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + l3NetworkName: string, + l3NetworkParameters: L3Network, + options?: L3NetworksCreateOrUpdateOptionalParams, + ) => Promise, L3Network>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + l3NetworkName: string, + l3NetworkParameters: L3Network, + options?: L3NetworksCreateOrUpdateOptionalParams, + ) => Promise; + /** Get properties of the provided layer 3 (L3) network. */ + get: ( + resourceGroupName: string, + l3NetworkName: string, + options?: L3NetworksGetOptionalParams, + ) => Promise; +} + +function _getL3Networks(context: NetworkCloudContext) { + return { + listBySubscription: (options?: L3NetworksListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: L3NetworksListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + l3NetworkName: string, + options?: L3NetworksDeleteOptionalParams, + ) => $delete(context, resourceGroupName, l3NetworkName, options), + beginDelete: async ( + resourceGroupName: string, + l3NetworkName: string, + options?: L3NetworksDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, l3NetworkName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + l3NetworkName: string, + options?: L3NetworksDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, l3NetworkName, options); + }, + update: ( + resourceGroupName: string, + l3NetworkName: string, + options?: L3NetworksUpdateOptionalParams, + ) => update(context, resourceGroupName, l3NetworkName, options), + createOrUpdate: ( + resourceGroupName: string, + l3NetworkName: string, + l3NetworkParameters: L3Network, + options?: L3NetworksCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, l3NetworkName, l3NetworkParameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + l3NetworkName: string, + l3NetworkParameters: L3Network, + options?: L3NetworksCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + l3NetworkName, + l3NetworkParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + l3NetworkName: string, + l3NetworkParameters: L3Network, + options?: L3NetworksCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + l3NetworkName, + l3NetworkParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + l3NetworkName: string, + options?: L3NetworksGetOptionalParams, + ) => get(context, resourceGroupName, l3NetworkName, options), + }; +} + +export function _getL3NetworksOperations(context: NetworkCloudContext): L3NetworksOperations { + return { + ..._getL3Networks(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/metricsConfigurations/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/metricsConfigurations/index.ts new file mode 100644 index 000000000000..b0b5b9047fe6 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/metricsConfigurations/index.ts @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + listByCluster, + $delete, + update, + createOrUpdate, + get, +} from "../../api/metricsConfigurations/operations.js"; +import { + MetricsConfigurationsListByClusterOptionalParams, + MetricsConfigurationsDeleteOptionalParams, + MetricsConfigurationsUpdateOptionalParams, + MetricsConfigurationsCreateOrUpdateOptionalParams, + MetricsConfigurationsGetOptionalParams, +} from "../../api/metricsConfigurations/options.js"; +import { OperationStatusResult, ClusterMetricsConfiguration } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a MetricsConfigurations operations. */ +export interface MetricsConfigurationsOperations { + /** Get a list of metrics configurations for the provided cluster. */ + listByCluster: ( + resourceGroupName: string, + clusterName: string, + options?: MetricsConfigurationsListByClusterOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the metrics configuration of the provided cluster. */ + delete: ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options?: MetricsConfigurationsDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options?: MetricsConfigurationsDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options?: MetricsConfigurationsDeleteOptionalParams, + ) => Promise; + /** Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. */ + update: ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options?: MetricsConfigurationsUpdateOptionalParams, + ) => PollerLike, ClusterMetricsConfiguration>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options?: MetricsConfigurationsUpdateOptionalParams, + ) => Promise< + SimplePollerLike, ClusterMetricsConfiguration> + >; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options?: MetricsConfigurationsUpdateOptionalParams, + ) => Promise; + /** Create new or update the existing metrics configuration of the provided cluster. */ + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + metricsConfigurationParameters: ClusterMetricsConfiguration, + options?: MetricsConfigurationsCreateOrUpdateOptionalParams, + ) => PollerLike, ClusterMetricsConfiguration>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + metricsConfigurationParameters: ClusterMetricsConfiguration, + options?: MetricsConfigurationsCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike, ClusterMetricsConfiguration> + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + metricsConfigurationParameters: ClusterMetricsConfiguration, + options?: MetricsConfigurationsCreateOrUpdateOptionalParams, + ) => Promise; + /** Get metrics configuration of the provided cluster. */ + get: ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options?: MetricsConfigurationsGetOptionalParams, + ) => Promise; +} + +function _getMetricsConfigurations(context: NetworkCloudContext) { + return { + listByCluster: ( + resourceGroupName: string, + clusterName: string, + options?: MetricsConfigurationsListByClusterOptionalParams, + ) => listByCluster(context, resourceGroupName, clusterName, options), + delete: ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options?: MetricsConfigurationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, clusterName, metricsConfigurationName, options), + beginDelete: async ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options?: MetricsConfigurationsDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + clusterName, + metricsConfigurationName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options?: MetricsConfigurationsDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + clusterName, + metricsConfigurationName, + options, + ); + }, + update: ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options?: MetricsConfigurationsUpdateOptionalParams, + ) => update(context, resourceGroupName, clusterName, metricsConfigurationName, options), + beginUpdate: async ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options?: MetricsConfigurationsUpdateOptionalParams, + ) => { + const poller = update( + context, + resourceGroupName, + clusterName, + metricsConfigurationName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options?: MetricsConfigurationsUpdateOptionalParams, + ) => { + return await update( + context, + resourceGroupName, + clusterName, + metricsConfigurationName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + metricsConfigurationParameters: ClusterMetricsConfiguration, + options?: MetricsConfigurationsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + clusterName, + metricsConfigurationName, + metricsConfigurationParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + metricsConfigurationParameters: ClusterMetricsConfiguration, + options?: MetricsConfigurationsCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + clusterName, + metricsConfigurationName, + metricsConfigurationParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + metricsConfigurationParameters: ClusterMetricsConfiguration, + options?: MetricsConfigurationsCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + clusterName, + metricsConfigurationName, + metricsConfigurationParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + clusterName: string, + metricsConfigurationName: string, + options?: MetricsConfigurationsGetOptionalParams, + ) => get(context, resourceGroupName, clusterName, metricsConfigurationName, options), + }; +} + +export function _getMetricsConfigurationsOperations( + context: NetworkCloudContext, +): MetricsConfigurationsOperations { + return { + ..._getMetricsConfigurations(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/operations/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/operations/index.ts new file mode 100644 index 000000000000..eff4651ce678 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/operations/index.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { list } from "../../api/operations/operations.js"; +import { OperationsListOptionalParams } from "../../api/operations/options.js"; +import { Operation } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Operations operations. */ +export interface OperationsOperations { + /** List the operations for the provider */ + list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; +} + +function _getOperations(context: NetworkCloudContext) { + return { + list: (options?: OperationsListOptionalParams) => list(context, options), + }; +} + +export function _getOperationsOperations(context: NetworkCloudContext): OperationsOperations { + return { + ..._getOperations(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/rackSkus/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/rackSkus/index.ts new file mode 100644 index 000000000000..f69d5a493be9 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/rackSkus/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { listBySubscription, get } from "../../api/rackSkus/operations.js"; +import { + RackSkusListBySubscriptionOptionalParams, + RackSkusGetOptionalParams, +} from "../../api/rackSkus/options.js"; +import { RackSku } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a RackSkus operations. */ +export interface RackSkusOperations { + /** Get a list of rack SKUs in the provided subscription. */ + listBySubscription: ( + options?: RackSkusListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get the properties of the provided rack SKU. */ + get: (rackSkuName: string, options?: RackSkusGetOptionalParams) => Promise; +} + +function _getRackSkus(context: NetworkCloudContext) { + return { + listBySubscription: (options?: RackSkusListBySubscriptionOptionalParams) => + listBySubscription(context, options), + get: (rackSkuName: string, options?: RackSkusGetOptionalParams) => + get(context, rackSkuName, options), + }; +} + +export function _getRackSkusOperations(context: NetworkCloudContext): RackSkusOperations { + return { + ..._getRackSkus(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/racks/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/racks/index.ts new file mode 100644 index 000000000000..de001ac35f72 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/racks/index.ts @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/racks/operations.js"; +import { + RacksListBySubscriptionOptionalParams, + RacksListByResourceGroupOptionalParams, + RacksDeleteOptionalParams, + RacksUpdateOptionalParams, + RacksCreateOrUpdateOptionalParams, + RacksGetOptionalParams, +} from "../../api/racks/options.js"; +import { OperationStatusResult, Rack } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Racks operations. */ +export interface RacksOperations { + /** Get a list of racks in the provided subscription. */ + listBySubscription: ( + options?: RacksListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a list of racks in the provided resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: RacksListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. */ + delete: ( + resourceGroupName: string, + rackName: string, + options?: RacksDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + rackName: string, + options?: RacksDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + rackName: string, + options?: RacksDeleteOptionalParams, + ) => Promise; + /** Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. */ + update: ( + resourceGroupName: string, + rackName: string, + options?: RacksUpdateOptionalParams, + ) => PollerLike, Rack>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + rackName: string, + options?: RacksUpdateOptionalParams, + ) => Promise, Rack>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + rackName: string, + options?: RacksUpdateOptionalParams, + ) => Promise; + /** Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. */ + createOrUpdate: ( + resourceGroupName: string, + rackName: string, + rackParameters: Rack, + options?: RacksCreateOrUpdateOptionalParams, + ) => PollerLike, Rack>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + rackName: string, + rackParameters: Rack, + options?: RacksCreateOrUpdateOptionalParams, + ) => Promise, Rack>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + rackName: string, + rackParameters: Rack, + options?: RacksCreateOrUpdateOptionalParams, + ) => Promise; + /** Get properties of the provided rack. */ + get: ( + resourceGroupName: string, + rackName: string, + options?: RacksGetOptionalParams, + ) => Promise; +} + +function _getRacks(context: NetworkCloudContext) { + return { + listBySubscription: (options?: RacksListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: RacksListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: (resourceGroupName: string, rackName: string, options?: RacksDeleteOptionalParams) => + $delete(context, resourceGroupName, rackName, options), + beginDelete: async ( + resourceGroupName: string, + rackName: string, + options?: RacksDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, rackName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + rackName: string, + options?: RacksDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, rackName, options); + }, + update: (resourceGroupName: string, rackName: string, options?: RacksUpdateOptionalParams) => + update(context, resourceGroupName, rackName, options), + beginUpdate: async ( + resourceGroupName: string, + rackName: string, + options?: RacksUpdateOptionalParams, + ) => { + const poller = update(context, resourceGroupName, rackName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + rackName: string, + options?: RacksUpdateOptionalParams, + ) => { + return await update(context, resourceGroupName, rackName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + rackName: string, + rackParameters: Rack, + options?: RacksCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, rackName, rackParameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + rackName: string, + rackParameters: Rack, + options?: RacksCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate(context, resourceGroupName, rackName, rackParameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + rackName: string, + rackParameters: Rack, + options?: RacksCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate(context, resourceGroupName, rackName, rackParameters, options); + }, + get: (resourceGroupName: string, rackName: string, options?: RacksGetOptionalParams) => + get(context, resourceGroupName, rackName, options), + }; +} + +export function _getRacksOperations(context: NetworkCloudContext): RacksOperations { + return { + ..._getRacks(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/storageAppliances/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/storageAppliances/index.ts new file mode 100644 index 000000000000..4bf2de97d8c0 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/storageAppliances/index.ts @@ -0,0 +1,381 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + runReadCommands, + enableRemoteVendorManagement, + disableRemoteVendorManagement, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/storageAppliances/operations.js"; +import { + StorageAppliancesRunReadCommandsOptionalParams, + StorageAppliancesEnableRemoteVendorManagementOptionalParams, + StorageAppliancesDisableRemoteVendorManagementOptionalParams, + StorageAppliancesListBySubscriptionOptionalParams, + StorageAppliancesListByResourceGroupOptionalParams, + StorageAppliancesDeleteOptionalParams, + StorageAppliancesUpdateOptionalParams, + StorageAppliancesCreateOrUpdateOptionalParams, + StorageAppliancesGetOptionalParams, +} from "../../api/storageAppliances/options.js"; +import { + OperationStatusResult, + StorageAppliance, + StorageApplianceRunReadCommandsParameters, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a StorageAppliances operations. */ +export interface StorageAppliancesOperations { + /** Run one or more read-only commands on the provided storage appliance. */ + runReadCommands: ( + resourceGroupName: string, + storageApplianceName: string, + storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, + options?: StorageAppliancesRunReadCommandsOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use runReadCommands instead */ + beginRunReadCommands: ( + resourceGroupName: string, + storageApplianceName: string, + storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, + options?: StorageAppliancesRunReadCommandsOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use runReadCommands instead */ + beginRunReadCommandsAndWait: ( + resourceGroupName: string, + storageApplianceName: string, + storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, + options?: StorageAppliancesRunReadCommandsOptionalParams, + ) => Promise; + /** Enable remote vendor management of the provided storage appliance. */ + enableRemoteVendorManagement: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use enableRemoteVendorManagement instead */ + beginEnableRemoteVendorManagement: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use enableRemoteVendorManagement instead */ + beginEnableRemoteVendorManagementAndWait: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams, + ) => Promise; + /** Disable remote vendor management of the provided storage appliance. */ + disableRemoteVendorManagement: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use disableRemoteVendorManagement instead */ + beginDisableRemoteVendorManagement: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use disableRemoteVendorManagement instead */ + beginDisableRemoteVendorManagementAndWait: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams, + ) => Promise; + /** Get a list of storage appliances in the provided subscription. */ + listBySubscription: ( + options?: StorageAppliancesListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a list of storage appliances in the provided resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: StorageAppliancesListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. */ + delete: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesDeleteOptionalParams, + ) => Promise; + /** Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. */ + update: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesUpdateOptionalParams, + ) => PollerLike, StorageAppliance>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesUpdateOptionalParams, + ) => Promise, StorageAppliance>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesUpdateOptionalParams, + ) => Promise; + /** Create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. */ + createOrUpdate: ( + resourceGroupName: string, + storageApplianceName: string, + storageApplianceParameters: StorageAppliance, + options?: StorageAppliancesCreateOrUpdateOptionalParams, + ) => PollerLike, StorageAppliance>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + storageApplianceName: string, + storageApplianceParameters: StorageAppliance, + options?: StorageAppliancesCreateOrUpdateOptionalParams, + ) => Promise, StorageAppliance>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + storageApplianceName: string, + storageApplianceParameters: StorageAppliance, + options?: StorageAppliancesCreateOrUpdateOptionalParams, + ) => Promise; + /** Get properties of the provided storage appliance. */ + get: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesGetOptionalParams, + ) => Promise; +} + +function _getStorageAppliances(context: NetworkCloudContext) { + return { + runReadCommands: ( + resourceGroupName: string, + storageApplianceName: string, + storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, + options?: StorageAppliancesRunReadCommandsOptionalParams, + ) => + runReadCommands( + context, + resourceGroupName, + storageApplianceName, + storageApplianceRunReadCommandsParameters, + options, + ), + beginRunReadCommands: async ( + resourceGroupName: string, + storageApplianceName: string, + storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, + options?: StorageAppliancesRunReadCommandsOptionalParams, + ) => { + const poller = runReadCommands( + context, + resourceGroupName, + storageApplianceName, + storageApplianceRunReadCommandsParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRunReadCommandsAndWait: async ( + resourceGroupName: string, + storageApplianceName: string, + storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, + options?: StorageAppliancesRunReadCommandsOptionalParams, + ) => { + return await runReadCommands( + context, + resourceGroupName, + storageApplianceName, + storageApplianceRunReadCommandsParameters, + options, + ); + }, + enableRemoteVendorManagement: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams, + ) => enableRemoteVendorManagement(context, resourceGroupName, storageApplianceName, options), + beginEnableRemoteVendorManagement: async ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams, + ) => { + const poller = enableRemoteVendorManagement( + context, + resourceGroupName, + storageApplianceName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginEnableRemoteVendorManagementAndWait: async ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams, + ) => { + return await enableRemoteVendorManagement( + context, + resourceGroupName, + storageApplianceName, + options, + ); + }, + disableRemoteVendorManagement: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams, + ) => disableRemoteVendorManagement(context, resourceGroupName, storageApplianceName, options), + beginDisableRemoteVendorManagement: async ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams, + ) => { + const poller = disableRemoteVendorManagement( + context, + resourceGroupName, + storageApplianceName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDisableRemoteVendorManagementAndWait: async ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams, + ) => { + return await disableRemoteVendorManagement( + context, + resourceGroupName, + storageApplianceName, + options, + ); + }, + listBySubscription: (options?: StorageAppliancesListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: StorageAppliancesListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, storageApplianceName, options), + beginDelete: async ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, storageApplianceName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, storageApplianceName, options); + }, + update: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesUpdateOptionalParams, + ) => update(context, resourceGroupName, storageApplianceName, options), + beginUpdate: async ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesUpdateOptionalParams, + ) => { + const poller = update(context, resourceGroupName, storageApplianceName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesUpdateOptionalParams, + ) => { + return await update(context, resourceGroupName, storageApplianceName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + storageApplianceName: string, + storageApplianceParameters: StorageAppliance, + options?: StorageAppliancesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + storageApplianceName, + storageApplianceParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + storageApplianceName: string, + storageApplianceParameters: StorageAppliance, + options?: StorageAppliancesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + storageApplianceName, + storageApplianceParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + storageApplianceName: string, + storageApplianceParameters: StorageAppliance, + options?: StorageAppliancesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + storageApplianceName, + storageApplianceParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + storageApplianceName: string, + options?: StorageAppliancesGetOptionalParams, + ) => get(context, resourceGroupName, storageApplianceName, options), + }; +} + +export function _getStorageAppliancesOperations( + context: NetworkCloudContext, +): StorageAppliancesOperations { + return { + ..._getStorageAppliances(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/trunkedNetworks/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/trunkedNetworks/index.ts new file mode 100644 index 000000000000..f8acac9c661c --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/trunkedNetworks/index.ts @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/trunkedNetworks/operations.js"; +import { + TrunkedNetworksListBySubscriptionOptionalParams, + TrunkedNetworksListByResourceGroupOptionalParams, + TrunkedNetworksDeleteOptionalParams, + TrunkedNetworksUpdateOptionalParams, + TrunkedNetworksCreateOrUpdateOptionalParams, + TrunkedNetworksGetOptionalParams, +} from "../../api/trunkedNetworks/options.js"; +import { OperationStatusResult, TrunkedNetwork } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a TrunkedNetworks operations. */ +export interface TrunkedNetworksOperations { + /** Get a list of trunked networks in the provided subscription. */ + listBySubscription: ( + options?: TrunkedNetworksListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a list of trunked networks in the provided resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: TrunkedNetworksListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided trunked network. */ + delete: ( + resourceGroupName: string, + trunkedNetworkName: string, + options?: TrunkedNetworksDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + trunkedNetworkName: string, + options?: TrunkedNetworksDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + trunkedNetworkName: string, + options?: TrunkedNetworksDeleteOptionalParams, + ) => Promise; + /** Update tags associated with the provided trunked network. */ + update: ( + resourceGroupName: string, + trunkedNetworkName: string, + options?: TrunkedNetworksUpdateOptionalParams, + ) => Promise; + /** Create a new trunked network or update the properties of the existing trunked network. */ + createOrUpdate: ( + resourceGroupName: string, + trunkedNetworkName: string, + trunkedNetworkParameters: TrunkedNetwork, + options?: TrunkedNetworksCreateOrUpdateOptionalParams, + ) => PollerLike, TrunkedNetwork>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + trunkedNetworkName: string, + trunkedNetworkParameters: TrunkedNetwork, + options?: TrunkedNetworksCreateOrUpdateOptionalParams, + ) => Promise, TrunkedNetwork>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + trunkedNetworkName: string, + trunkedNetworkParameters: TrunkedNetwork, + options?: TrunkedNetworksCreateOrUpdateOptionalParams, + ) => Promise; + /** Get properties of the provided trunked network. */ + get: ( + resourceGroupName: string, + trunkedNetworkName: string, + options?: TrunkedNetworksGetOptionalParams, + ) => Promise; +} + +function _getTrunkedNetworks(context: NetworkCloudContext) { + return { + listBySubscription: (options?: TrunkedNetworksListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: TrunkedNetworksListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + trunkedNetworkName: string, + options?: TrunkedNetworksDeleteOptionalParams, + ) => $delete(context, resourceGroupName, trunkedNetworkName, options), + beginDelete: async ( + resourceGroupName: string, + trunkedNetworkName: string, + options?: TrunkedNetworksDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, trunkedNetworkName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + trunkedNetworkName: string, + options?: TrunkedNetworksDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, trunkedNetworkName, options); + }, + update: ( + resourceGroupName: string, + trunkedNetworkName: string, + options?: TrunkedNetworksUpdateOptionalParams, + ) => update(context, resourceGroupName, trunkedNetworkName, options), + createOrUpdate: ( + resourceGroupName: string, + trunkedNetworkName: string, + trunkedNetworkParameters: TrunkedNetwork, + options?: TrunkedNetworksCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + trunkedNetworkName, + trunkedNetworkParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + trunkedNetworkName: string, + trunkedNetworkParameters: TrunkedNetwork, + options?: TrunkedNetworksCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + trunkedNetworkName, + trunkedNetworkParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + trunkedNetworkName: string, + trunkedNetworkParameters: TrunkedNetwork, + options?: TrunkedNetworksCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + trunkedNetworkName, + trunkedNetworkParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + trunkedNetworkName: string, + options?: TrunkedNetworksGetOptionalParams, + ) => get(context, resourceGroupName, trunkedNetworkName, options), + }; +} + +export function _getTrunkedNetworksOperations( + context: NetworkCloudContext, +): TrunkedNetworksOperations { + return { + ..._getTrunkedNetworks(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/virtualMachines/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/virtualMachines/index.ts new file mode 100644 index 000000000000..96ae15c83690 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/virtualMachines/index.ts @@ -0,0 +1,414 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + start, + restart, + reimage, + powerOff, + assignRelay, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/virtualMachines/operations.js"; +import { + VirtualMachinesStartOptionalParams, + VirtualMachinesRestartOptionalParams, + VirtualMachinesReimageOptionalParams, + VirtualMachinesPowerOffOptionalParams, + VirtualMachinesAssignRelayOptionalParams, + VirtualMachinesListBySubscriptionOptionalParams, + VirtualMachinesListByResourceGroupOptionalParams, + VirtualMachinesDeleteOptionalParams, + VirtualMachinesUpdateOptionalParams, + VirtualMachinesCreateOrUpdateOptionalParams, + VirtualMachinesGetOptionalParams, +} from "../../api/virtualMachines/options.js"; +import { OperationStatusResult, VirtualMachine } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a VirtualMachines operations. */ +export interface VirtualMachinesOperations { + /** Start the provided virtual machine. */ + start: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesStartOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use start instead */ + beginStart: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesStartOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use start instead */ + beginStartAndWait: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesStartOptionalParams, + ) => Promise; + /** Restart the provided virtual machine. */ + restart: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesRestartOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use restart instead */ + beginRestart: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesRestartOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use restart instead */ + beginRestartAndWait: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesRestartOptionalParams, + ) => Promise; + /** Reimage the provided virtual machine. */ + reimage: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesReimageOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use reimage instead */ + beginReimage: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesReimageOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use reimage instead */ + beginReimageAndWait: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesReimageOptionalParams, + ) => Promise; + /** Power off the provided virtual machine. */ + powerOff: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesPowerOffOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use powerOff instead */ + beginPowerOff: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesPowerOffOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use powerOff instead */ + beginPowerOffAndWait: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesPowerOffOptionalParams, + ) => Promise; + /** Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided virtual machine. */ + assignRelay: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesAssignRelayOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use assignRelay instead */ + beginAssignRelay: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesAssignRelayOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use assignRelay instead */ + beginAssignRelayAndWait: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesAssignRelayOptionalParams, + ) => Promise; + /** Get a list of virtual machines in the provided subscription. */ + listBySubscription: ( + options?: VirtualMachinesListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a list of virtual machines in the provided resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: VirtualMachinesListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided virtual machine. */ + delete: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesDeleteOptionalParams, + ) => Promise; + /** 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. */ + update: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesUpdateOptionalParams, + ) => PollerLike, VirtualMachine>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesUpdateOptionalParams, + ) => Promise, VirtualMachine>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesUpdateOptionalParams, + ) => Promise; + /** Create a new virtual machine or update the properties of the existing virtual machine. */ + createOrUpdate: ( + resourceGroupName: string, + virtualMachineName: string, + virtualMachineParameters: VirtualMachine, + options?: VirtualMachinesCreateOrUpdateOptionalParams, + ) => PollerLike, VirtualMachine>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + virtualMachineName: string, + virtualMachineParameters: VirtualMachine, + options?: VirtualMachinesCreateOrUpdateOptionalParams, + ) => Promise, VirtualMachine>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + virtualMachineName: string, + virtualMachineParameters: VirtualMachine, + options?: VirtualMachinesCreateOrUpdateOptionalParams, + ) => Promise; + /** Get properties of the provided virtual machine. */ + get: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesGetOptionalParams, + ) => Promise; +} + +function _getVirtualMachines(context: NetworkCloudContext) { + return { + start: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesStartOptionalParams, + ) => start(context, resourceGroupName, virtualMachineName, options), + beginStart: async ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesStartOptionalParams, + ) => { + const poller = start(context, resourceGroupName, virtualMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginStartAndWait: async ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesStartOptionalParams, + ) => { + return await start(context, resourceGroupName, virtualMachineName, options); + }, + restart: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesRestartOptionalParams, + ) => restart(context, resourceGroupName, virtualMachineName, options), + beginRestart: async ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesRestartOptionalParams, + ) => { + const poller = restart(context, resourceGroupName, virtualMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRestartAndWait: async ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesRestartOptionalParams, + ) => { + return await restart(context, resourceGroupName, virtualMachineName, options); + }, + reimage: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesReimageOptionalParams, + ) => reimage(context, resourceGroupName, virtualMachineName, options), + beginReimage: async ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesReimageOptionalParams, + ) => { + const poller = reimage(context, resourceGroupName, virtualMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginReimageAndWait: async ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesReimageOptionalParams, + ) => { + return await reimage(context, resourceGroupName, virtualMachineName, options); + }, + powerOff: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesPowerOffOptionalParams, + ) => powerOff(context, resourceGroupName, virtualMachineName, options), + beginPowerOff: async ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesPowerOffOptionalParams, + ) => { + const poller = powerOff(context, resourceGroupName, virtualMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginPowerOffAndWait: async ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesPowerOffOptionalParams, + ) => { + return await powerOff(context, resourceGroupName, virtualMachineName, options); + }, + assignRelay: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesAssignRelayOptionalParams, + ) => assignRelay(context, resourceGroupName, virtualMachineName, options), + beginAssignRelay: async ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesAssignRelayOptionalParams, + ) => { + const poller = assignRelay(context, resourceGroupName, virtualMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginAssignRelayAndWait: async ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesAssignRelayOptionalParams, + ) => { + return await assignRelay(context, resourceGroupName, virtualMachineName, options); + }, + listBySubscription: (options?: VirtualMachinesListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: VirtualMachinesListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, virtualMachineName, options), + beginDelete: async ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, virtualMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, virtualMachineName, options); + }, + update: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesUpdateOptionalParams, + ) => update(context, resourceGroupName, virtualMachineName, options), + beginUpdate: async ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesUpdateOptionalParams, + ) => { + const poller = update(context, resourceGroupName, virtualMachineName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesUpdateOptionalParams, + ) => { + return await update(context, resourceGroupName, virtualMachineName, options); + }, + createOrUpdate: ( + resourceGroupName: string, + virtualMachineName: string, + virtualMachineParameters: VirtualMachine, + options?: VirtualMachinesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + virtualMachineName, + virtualMachineParameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + virtualMachineName: string, + virtualMachineParameters: VirtualMachine, + options?: VirtualMachinesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + virtualMachineName, + virtualMachineParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + virtualMachineName: string, + virtualMachineParameters: VirtualMachine, + options?: VirtualMachinesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + virtualMachineName, + virtualMachineParameters, + options, + ); + }, + get: ( + resourceGroupName: string, + virtualMachineName: string, + options?: VirtualMachinesGetOptionalParams, + ) => get(context, resourceGroupName, virtualMachineName, options), + }; +} + +export function _getVirtualMachinesOperations( + context: NetworkCloudContext, +): VirtualMachinesOperations { + return { + ..._getVirtualMachines(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/classic/volumes/index.ts b/sdk/networkcloud/arm-networkcloud/src/classic/volumes/index.ts new file mode 100644 index 000000000000..4af65e45a781 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/classic/volumes/index.ts @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloudContext } from "../../api/networkCloudContext.js"; +import { + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/volumes/operations.js"; +import { + VolumesListBySubscriptionOptionalParams, + VolumesListByResourceGroupOptionalParams, + VolumesDeleteOptionalParams, + VolumesUpdateOptionalParams, + VolumesCreateOrUpdateOptionalParams, + VolumesGetOptionalParams, +} from "../../api/volumes/options.js"; +import { OperationStatusResult, Volume } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Volumes operations. */ +export interface VolumesOperations { + /** Get a list of volumes in the provided subscription. */ + listBySubscription: ( + options?: VolumesListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get a list of volumes in the provided resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: VolumesListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete the provided volume. */ + delete: ( + resourceGroupName: string, + volumeName: string, + options?: VolumesDeleteOptionalParams, + ) => PollerLike, OperationStatusResult>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + volumeName: string, + options?: VolumesDeleteOptionalParams, + ) => Promise, OperationStatusResult>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + volumeName: string, + options?: VolumesDeleteOptionalParams, + ) => Promise; + /** Update tags associated with the provided volume. */ + update: ( + resourceGroupName: string, + volumeName: string, + options?: VolumesUpdateOptionalParams, + ) => Promise; + /** Create a new volume or update the properties of the existing one. */ + createOrUpdate: ( + resourceGroupName: string, + volumeName: string, + volumeParameters: Volume, + options?: VolumesCreateOrUpdateOptionalParams, + ) => PollerLike, Volume>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + volumeName: string, + volumeParameters: Volume, + options?: VolumesCreateOrUpdateOptionalParams, + ) => Promise, Volume>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + volumeName: string, + volumeParameters: Volume, + options?: VolumesCreateOrUpdateOptionalParams, + ) => Promise; + /** Get properties of the provided volume. */ + get: ( + resourceGroupName: string, + volumeName: string, + options?: VolumesGetOptionalParams, + ) => Promise; +} + +function _getVolumes(context: NetworkCloudContext) { + return { + listBySubscription: (options?: VolumesListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: VolumesListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + volumeName: string, + options?: VolumesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, volumeName, options), + beginDelete: async ( + resourceGroupName: string, + volumeName: string, + options?: VolumesDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, volumeName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + volumeName: string, + options?: VolumesDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, volumeName, options); + }, + update: ( + resourceGroupName: string, + volumeName: string, + options?: VolumesUpdateOptionalParams, + ) => update(context, resourceGroupName, volumeName, options), + createOrUpdate: ( + resourceGroupName: string, + volumeName: string, + volumeParameters: Volume, + options?: VolumesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, volumeName, volumeParameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + volumeName: string, + volumeParameters: Volume, + options?: VolumesCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + volumeName, + volumeParameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + volumeName: string, + volumeParameters: Volume, + options?: VolumesCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + volumeName, + volumeParameters, + options, + ); + }, + get: (resourceGroupName: string, volumeName: string, options?: VolumesGetOptionalParams) => + get(context, resourceGroupName, volumeName, options), + }; +} + +export function _getVolumesOperations(context: NetworkCloudContext): VolumesOperations { + return { + ..._getVolumes(context), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/index.ts b/sdk/networkcloud/arm-networkcloud/src/index.ts index 95c57e4df0d1..381e617560a4 100644 --- a/sdk/networkcloud/arm-networkcloud/src/index.ts +++ b/sdk/networkcloud/arm-networkcloud/src/index.ts @@ -1,11 +1,690 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. +import { AzureClouds, AzureSupportedClouds } from "./static-helpers/cloudSettingHelpers.js"; +import { + PageSettings, + ContinuablePage, + PagedAsyncIterableIterator, +} from "./static-helpers/pagingHelpers.js"; -/// -export { getContinuationToken } from "./pagingHelper.js"; -export * from "./models/index.js"; export { NetworkCloud } from "./networkCloud.js"; -export * from "./operationsInterfaces/index.js"; +export type { SimplePollerLike } from "./static-helpers/simplePollerHelpers.js"; +export type { RestorePollerOptions } from "./restorePollerHelpers.js"; +export { restorePoller } from "./restorePollerHelpers.js"; +export type { + Operation, + OperationDisplay, + Origin, + ActionType, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, + AccessBridge, + AccessBridgeProperties, + AccessBridgeSecurityRule, + SecurityRuleDirection, + AccessBridgeDetailedStatus, + AccessBridgeEndpoint, + TransportProtocol, + AccessBridgeProvisioningState, + AccessBridgeAllowedName, + ExtendedLocation, + ExtendedLocationType, + TrackedResource, + Resource, + SystemData, + CreatedByType, + AccessBridgePatchParameters, + AccessBridgePatchProperties, + OperationStatusResult, + OperationStatusResultProperties, + BareMetalMachine, + BareMetalMachineProperties, + AdministrativeCredentials, + ActionState, + ActionStateStatus, + StepState, + StepStateStatus, + CertificateInfo, + BareMetalMachineCordonStatus, + BareMetalMachineDetailedStatus, + HardwareInventory, + HardwareInventoryNetworkInterface, + Nic, + LldpNeighbor, + HardwareValidationStatus, + BareMetalMachineHardwareValidationResult, + BareMetalMachineMonitoringConfigurationStatus, + BareMetalMachineMetricsConfigurationStatusLogLevel, + BareMetalMachineMetricsConfigurationStatusMetricsLevel, + BareMetalMachinePowerState, + BareMetalMachineReadyState, + RuntimeProtectionStatus, + RuntimeProtectionAgentHealthStatus, + RuntimeProtectionAgentLicenseStatus, + RuntimeProtectionDefinitionUpdateMode, + RuntimeProtectionEnforcementLevel, + SecretRotationStatus, + SecretArchiveReference, + BareMetalMachineProvisioningState, + BareMetalMachinePatchParameters, + BareMetalMachinePatchProperties, + BareMetalMachineCordonParameters, + BareMetalMachineEvacuate, + BareMetalMachinePowerOffParameters, + BareMetalMachineSkipShutdown, + BareMetalMachineReimageParameters, + BareMetalMachineReimageSafeguardMode, + BareMetalMachineReplaceParameters, + BareMetalMachineReplaceSafeguardMode, + BareMetalMachineReplaceStoragePolicy, + BareMetalMachineRunCommandParameters, + BareMetalMachineRunDataExtractsParameters, + BareMetalMachineCommandSpecification, + BareMetalMachineRunReadCommandsParameters, + CloudServicesNetwork, + CloudServicesNetworkProperties, + EgressEndpoint, + EndpointDependency, + CloudServicesNetworkEnableDefaultEgressEndpoints, + CloudServicesNetworkStorageOptions, + CloudServicesNetworkStorageMode, + CloudServicesNetworkDetailedStatus, + CloudServicesNetworkStorageStatus, + CloudServicesNetworkStorageStatusStatus, + CloudServicesNetworkProvisioningState, + CloudServicesNetworkPatchParameters, + CloudServicesNetworkPatchProperties, + CloudServicesNetworkStorageOptionsPatch, + ClusterManager, + ClusterManagerProperties, + ClusterAvailableVersion, + ClusterManagerDetailedStatus, + ManagedResourceGroupConfiguration, + ClusterManagerProvisioningState, + ClusterManagerRelayConfiguration, + ManagedServiceIdentity, + ManagedServiceIdentityType, + UserAssignedIdentity, + DeploymentType, + ClusterManagerPatchParameters, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters, + RelayPrivateEndpointConnectionState, + Cluster, + ClusterProperties, + RackDefinition, + BareMetalMachineConfigurationData, + StorageApplianceConfigurationData, + AnalyticsOutputSettings, + IdentitySelector, + ManagedServiceIdentitySelectorType, + ServicePrincipalInformation, + ClusterType, + CommandOutputSettings, + CommandOutputOverride, + CommandOutputType, + ValidationThreshold, + ValidationThresholdGrouping, + ValidationThresholdType, + RuntimeProtectionConfiguration, + ClusterSecretArchive, + ClusterSecretArchiveEnabled, + SecretArchiveSettings, + ClusterUpdateStrategy, + ClusterUpdateStrategyType, + VulnerabilityScanningSettings, + VulnerabilityScanningSettingsContainerScan, + ClusterAvailableUpgradeVersion, + ControlImpact, + WorkloadImpact, + ClusterCapacity, + ClusterConnectionStatus, + ClusterManagerConnectionStatus, + ClusterDetailedStatus, + ClusterProvisioningState, + ClusterPatchParameters, + ClusterPatchProperties, + VulnerabilityScanningSettingsPatch, + ClusterContinueUpdateVersionParameters, + ClusterContinueUpdateVersionMachineGroupTargetingMode, + ClusterContinueUpdateVersionSafeguardMode, + ClusterDeployParameters, + ClusterInspectParameters, + ClusterInspectAdditionalAction, + FilterDevices, + ClusterRotateCredentialParameters, + ClusterScanRuntimeParameters, + ClusterScanRuntimeParametersScanActivity, + ClusterUpdateVersionParameters, + ClusterUpdateVersionSafeguardMode, + KubernetesCluster, + KubernetesClusterProperties, + AadConfiguration, + AdministratorConfiguration, + SshPublicKey, + ControlPlaneNodeConfiguration, + InitialAgentPoolConfiguration, + AgentOptions, + HugepagesSize, + AttachedNetworkConfiguration, + L2NetworkAttachmentConfiguration, + KubernetesPluginType, + L3NetworkAttachmentConfiguration, + L3NetworkConfigurationIpamEnabled, + TrunkedNetworkAttachmentConfiguration, + KubernetesLabel, + AgentPoolMode, + AgentPoolUpgradeSettings, + NetworkConfiguration, + BgpServiceLoadBalancerConfiguration, + BgpAdvertisement, + AdvertiseToFabric, + ServiceLoadBalancerBgpPeer, + BfdEnabled, + BgpMultiHop, + FabricPeeringEnabled, + IpAddressPool, + L2ServiceLoadBalancerConfiguration, + AvailableUpgrade, + AvailabilityLifecycle, + KubernetesClusterDetailedStatus, + FeatureStatus, + FeatureDetailedStatus, + KubernetesClusterNode, + KubernetesClusterNodeDetailedStatus, + NetworkAttachment, + DefaultGateway, + VirtualMachineIPAllocationMethod, + KubernetesNodePowerState, + KubernetesNodeRole, + KubernetesClusterProvisioningState, + KubernetesClusterPatchParameters, + KubernetesClusterPatchProperties, + AdministratorConfigurationPatch, + ControlPlaneNodePatchConfiguration, + KubernetesClusterRestartNodeParameters, + KubernetesVersion, + KubernetesVersionProperties, + KubernetesVersionValue, + KubernetesVersionProvisioningState, + KubernetesVersionPatchParameters, + L2Network, + L2NetworkProperties, + HybridAksPluginType, + L2NetworkDetailedStatus, + L2NetworkProvisioningState, + L2NetworkPatchParameters, + L3Network, + L3NetworkProperties, + HybridAksIpamEnabled, + IpAllocationType, + L3NetworkDetailedStatus, + L3NetworkProvisioningState, + L3NetworkPatchParameters, + RackSku, + RackSkuProperties, + MachineSkuSlot, + MachineSkuProperties, + BootstrapProtocol, + MachineDisk, + MachineSkuDiskConnectionType, + DiskType, + NetworkInterface, + DeviceConnectionType, + RackSkuProvisioningState, + RackSkuType, + StorageApplianceSkuSlot, + StorageApplianceSkuProperties, + ProxyResource, + Rack, + RackProperties, + RackDetailedStatus, + RackProvisioningState, + RackPatchParameters, + RacksPatchProperties, + StorageAppliance, + StorageApplianceProperties, + StorageApplianceDetailedStatus, + StorageApplianceExpansionShelf, + StorageApplianceMonitoringConfigurationStatus, + StorageApplianceMetricsConfigurationStatusLogLevel, + StorageApplianceMetricsConfigurationStatusMetricsLevel, + RemoteVendorManagementFeature, + RemoteVendorManagementStatus, + StorageApplianceProvisioningState, + StorageAppliancePatchParameters, + StorageAppliancePatchProperties, + StorageApplianceEnableRemoteVendorManagementParameters, + StorageApplianceRunReadCommandsParameters, + StorageApplianceCommandSpecification, + TrunkedNetwork, + TrunkedNetworkProperties, + TrunkedNetworkDetailedStatus, + TrunkedNetworkProvisioningState, + TrunkedNetworkPatchParameters, + VirtualMachine, + VirtualMachineProperties, + VirtualMachineBootMethod, + VirtualMachineIsolateEmulatorThread, + VirtualMachinePlacementHint, + VirtualMachinePlacementHintType, + VirtualMachineSchedulingExecution, + VirtualMachinePlacementHintPodAffinityScope, + StorageProfile, + OsDisk, + OsDiskCreateOption, + OsDiskDeleteOption, + VirtualMachineVirtioInterfaceType, + VirtualMachineDeviceModelType, + ImageRepositoryCredentials, + VirtualMachineDetailedStatus, + VirtualMachinePowerState, + VirtualMachineProvisioningState, + VirtualMachinePatchParameters, + VirtualMachinePatchProperties, + VirtualMachineAssignRelayParameters, + RelayType, + VirtualMachinePowerOffParameters, + SkipShutdown, + Volume, + VolumeProperties, + VolumeDetailedStatus, + VolumeProvisioningState, + VolumePatchParameters, + BareMetalMachineKeySet, + BareMetalMachineKeySetProperties, + BareMetalMachineKeySetPrivilegeLevel, + KeySetUser, + BareMetalMachineKeySetDetailedStatus, + KeySetUserStatus, + BareMetalMachineKeySetUserSetupStatus, + BareMetalMachineKeySetProvisioningState, + BareMetalMachineKeySetPatchParameters, + BareMetalMachineKeySetPatchProperties, + BmcKeySet, + BmcKeySetProperties, + BmcKeySetPrivilegeLevel, + BmcKeySetDetailedStatus, + BmcKeySetProvisioningState, + BmcKeySetPatchParameters, + BmcKeySetPatchProperties, + AgentPool, + AgentPoolProperties, + AgentPoolDetailedStatus, + AgentPoolProvisioningState, + AgentPoolPatchParameters, + AgentPoolPatchProperties, + NodePoolAdministratorConfigurationPatch, + KubernetesClusterFeature, + KubernetesClusterFeatureProperties, + StringKeyValuePair, + KubernetesClusterFeatureAvailabilityLifecycle, + KubernetesClusterFeatureDetailedStatus, + KubernetesClusterFeatureRequired, + KubernetesClusterFeatureProvisioningState, + KubernetesClusterFeaturePatchParameters, + KubernetesClusterFeaturePatchProperties, + Console, + ConsoleProperties, + ConsoleEnabled, + ConsoleDetailedStatus, + ConsoleProvisioningState, + ConsolePatchParameters, + ConsolePatchProperties, + ClusterMetricsConfiguration, + ClusterMetricsConfigurationProperties, + ClusterMetricsConfigurationDetailedStatus, + ClusterMetricsConfigurationProvisioningState, + ClusterMetricsConfigurationPatchParameters, + ClusterMetricsConfigurationPatchProperties, +} from "./models/index.js"; +export { + KnownOrigin, + KnownActionType, + KnownSecurityRuleDirection, + KnownAccessBridgeDetailedStatus, + KnownTransportProtocol, + KnownAccessBridgeProvisioningState, + KnownAccessBridgeAllowedName, + KnownExtendedLocationType, + KnownCreatedByType, + KnownActionStateStatus, + KnownStepStateStatus, + KnownBareMetalMachineCordonStatus, + KnownBareMetalMachineDetailedStatus, + KnownBareMetalMachineHardwareValidationResult, + KnownBareMetalMachineMetricsConfigurationStatusLogLevel, + KnownBareMetalMachineMetricsConfigurationStatusMetricsLevel, + KnownBareMetalMachinePowerState, + KnownBareMetalMachineReadyState, + KnownRuntimeProtectionAgentHealthStatus, + KnownRuntimeProtectionAgentLicenseStatus, + KnownRuntimeProtectionDefinitionUpdateMode, + KnownRuntimeProtectionEnforcementLevel, + KnownBareMetalMachineProvisioningState, + KnownBareMetalMachineEvacuate, + KnownBareMetalMachineSkipShutdown, + KnownBareMetalMachineReimageSafeguardMode, + KnownBareMetalMachineReplaceSafeguardMode, + KnownBareMetalMachineReplaceStoragePolicy, + KnownCloudServicesNetworkEnableDefaultEgressEndpoints, + KnownCloudServicesNetworkStorageMode, + KnownCloudServicesNetworkDetailedStatus, + KnownCloudServicesNetworkStorageStatusStatus, + KnownCloudServicesNetworkProvisioningState, + KnownClusterManagerDetailedStatus, + KnownClusterManagerProvisioningState, + KnownManagedServiceIdentityType, + KnownDeploymentType, + KnownRelayPrivateEndpointConnectionState, + KnownManagedServiceIdentitySelectorType, + KnownClusterType, + KnownCommandOutputType, + KnownValidationThresholdGrouping, + KnownValidationThresholdType, + KnownClusterSecretArchiveEnabled, + KnownClusterUpdateStrategyType, + KnownVulnerabilityScanningSettingsContainerScan, + KnownControlImpact, + KnownWorkloadImpact, + KnownClusterConnectionStatus, + KnownClusterManagerConnectionStatus, + KnownClusterDetailedStatus, + KnownClusterProvisioningState, + KnownClusterContinueUpdateVersionMachineGroupTargetingMode, + KnownClusterContinueUpdateVersionSafeguardMode, + KnownClusterInspectAdditionalAction, + KnownClusterScanRuntimeParametersScanActivity, + KnownClusterUpdateVersionSafeguardMode, + KnownHugepagesSize, + KnownKubernetesPluginType, + KnownL3NetworkConfigurationIpamEnabled, + KnownAgentPoolMode, + KnownAdvertiseToFabric, + KnownBfdEnabled, + KnownBgpMultiHop, + KnownFabricPeeringEnabled, + KnownAvailabilityLifecycle, + KnownKubernetesClusterDetailedStatus, + KnownFeatureDetailedStatus, + KnownKubernetesClusterNodeDetailedStatus, + KnownDefaultGateway, + KnownVirtualMachineIPAllocationMethod, + KnownKubernetesNodePowerState, + KnownKubernetesNodeRole, + KnownKubernetesClusterProvisioningState, + KnownKubernetesVersionProvisioningState, + KnownHybridAksPluginType, + KnownL2NetworkDetailedStatus, + KnownL2NetworkProvisioningState, + KnownHybridAksIpamEnabled, + KnownIpAllocationType, + KnownL3NetworkDetailedStatus, + KnownL3NetworkProvisioningState, + KnownBootstrapProtocol, + KnownMachineSkuDiskConnectionType, + KnownDiskType, + KnownDeviceConnectionType, + KnownRackSkuProvisioningState, + KnownRackSkuType, + KnownRackDetailedStatus, + KnownRackProvisioningState, + KnownStorageApplianceDetailedStatus, + KnownStorageApplianceMetricsConfigurationStatusLogLevel, + KnownStorageApplianceMetricsConfigurationStatusMetricsLevel, + KnownRemoteVendorManagementFeature, + KnownRemoteVendorManagementStatus, + KnownStorageApplianceProvisioningState, + KnownTrunkedNetworkDetailedStatus, + KnownTrunkedNetworkProvisioningState, + KnownVirtualMachineBootMethod, + KnownVirtualMachineIsolateEmulatorThread, + KnownVirtualMachinePlacementHintType, + KnownVirtualMachineSchedulingExecution, + KnownVirtualMachinePlacementHintPodAffinityScope, + KnownOsDiskCreateOption, + KnownOsDiskDeleteOption, + KnownVirtualMachineVirtioInterfaceType, + KnownVirtualMachineDeviceModelType, + KnownVirtualMachineDetailedStatus, + KnownVirtualMachinePowerState, + KnownVirtualMachineProvisioningState, + KnownRelayType, + KnownSkipShutdown, + KnownVolumeDetailedStatus, + KnownVolumeProvisioningState, + KnownBareMetalMachineKeySetPrivilegeLevel, + KnownBareMetalMachineKeySetDetailedStatus, + KnownBareMetalMachineKeySetUserSetupStatus, + KnownBareMetalMachineKeySetProvisioningState, + KnownBmcKeySetPrivilegeLevel, + KnownBmcKeySetDetailedStatus, + KnownBmcKeySetProvisioningState, + KnownAgentPoolDetailedStatus, + KnownAgentPoolProvisioningState, + KnownKubernetesClusterFeatureAvailabilityLifecycle, + KnownKubernetesClusterFeatureDetailedStatus, + KnownKubernetesClusterFeatureRequired, + KnownKubernetesClusterFeatureProvisioningState, + KnownConsoleEnabled, + KnownConsoleDetailedStatus, + KnownConsoleProvisioningState, + KnownClusterMetricsConfigurationDetailedStatus, + KnownClusterMetricsConfigurationProvisioningState, + KnownVersions, +} from "./models/index.js"; +export type { NetworkCloudOptionalParams } from "./api/index.js"; +export type { + AccessBridgesListBySubscriptionOptionalParams, + AccessBridgesListByResourceGroupOptionalParams, + AccessBridgesDeleteOptionalParams, + AccessBridgesUpdateOptionalParams, + AccessBridgesCreateOrUpdateOptionalParams, + AccessBridgesGetOptionalParams, +} from "./api/accessBridges/index.js"; +export type { + AgentPoolsListByKubernetesClusterOptionalParams, + AgentPoolsDeleteOptionalParams, + AgentPoolsUpdateOptionalParams, + AgentPoolsCreateOrUpdateOptionalParams, + AgentPoolsGetOptionalParams, +} from "./api/agentPools/index.js"; +export type { + BareMetalMachineKeySetsListByClusterOptionalParams, + BareMetalMachineKeySetsDeleteOptionalParams, + BareMetalMachineKeySetsUpdateOptionalParams, + BareMetalMachineKeySetsCreateOrUpdateOptionalParams, + BareMetalMachineKeySetsGetOptionalParams, +} from "./api/bareMetalMachineKeySets/index.js"; +export type { + BareMetalMachinesUncordonOptionalParams, + BareMetalMachinesStartOptionalParams, + BareMetalMachinesRunReadCommandsOptionalParams, + BareMetalMachinesRunDataExtractsRestrictedOptionalParams, + BareMetalMachinesRunDataExtractsOptionalParams, + BareMetalMachinesRunCommandOptionalParams, + BareMetalMachinesRestartOptionalParams, + BareMetalMachinesReplaceOptionalParams, + BareMetalMachinesReimageOptionalParams, + BareMetalMachinesPowerOffOptionalParams, + BareMetalMachinesCordonOptionalParams, + BareMetalMachinesListBySubscriptionOptionalParams, + BareMetalMachinesListByResourceGroupOptionalParams, + BareMetalMachinesDeleteOptionalParams, + BareMetalMachinesUpdateOptionalParams, + BareMetalMachinesCreateOrUpdateOptionalParams, + BareMetalMachinesGetOptionalParams, +} from "./api/bareMetalMachines/index.js"; +export type { + BmcKeySetsListByClusterOptionalParams, + BmcKeySetsDeleteOptionalParams, + BmcKeySetsUpdateOptionalParams, + BmcKeySetsCreateOrUpdateOptionalParams, + BmcKeySetsGetOptionalParams, +} from "./api/bmcKeySets/index.js"; +export type { + CloudServicesNetworksListBySubscriptionOptionalParams, + CloudServicesNetworksListByResourceGroupOptionalParams, + CloudServicesNetworksDeleteOptionalParams, + CloudServicesNetworksUpdateOptionalParams, + CloudServicesNetworksCreateOrUpdateOptionalParams, + CloudServicesNetworksGetOptionalParams, +} from "./api/cloudServicesNetworks/index.js"; +export type { + ClusterManagersUpdateRelayPrivateEndpointConnectionOptionalParams, + ClusterManagersListBySubscriptionOptionalParams, + ClusterManagersListByResourceGroupOptionalParams, + ClusterManagersDeleteOptionalParams, + ClusterManagersUpdateOptionalParams, + ClusterManagersCreateOrUpdateOptionalParams, + ClusterManagersGetOptionalParams, +} from "./api/clusterManagers/index.js"; +export type { + ClustersUpdateVersionOptionalParams, + ClustersScanRuntimeOptionalParams, + ClustersRotateCredentialOptionalParams, + ClustersInspectOptionalParams, + ClustersDeployOptionalParams, + ClustersContinueUpdateVersionOptionalParams, + ClustersListBySubscriptionOptionalParams, + ClustersListByResourceGroupOptionalParams, + ClustersDeleteOptionalParams, + ClustersUpdateOptionalParams, + ClustersCreateOrUpdateOptionalParams, + ClustersGetOptionalParams, +} from "./api/clusters/index.js"; +export type { + ConsolesListByVirtualMachineOptionalParams, + ConsolesDeleteOptionalParams, + ConsolesUpdateOptionalParams, + ConsolesCreateOrUpdateOptionalParams, + ConsolesGetOptionalParams, +} from "./api/consoles/index.js"; +export type { + KubernetesClusterFeaturesListByKubernetesClusterOptionalParams, + KubernetesClusterFeaturesDeleteOptionalParams, + KubernetesClusterFeaturesUpdateOptionalParams, + KubernetesClusterFeaturesCreateOrUpdateOptionalParams, + KubernetesClusterFeaturesGetOptionalParams, +} from "./api/kubernetesClusterFeatures/index.js"; +export type { + KubernetesClustersRestartNodeOptionalParams, + KubernetesClustersListBySubscriptionOptionalParams, + KubernetesClustersListByResourceGroupOptionalParams, + KubernetesClustersDeleteOptionalParams, + KubernetesClustersUpdateOptionalParams, + KubernetesClustersCreateOrUpdateOptionalParams, + KubernetesClustersGetOptionalParams, +} from "./api/kubernetesClusters/index.js"; +export type { + KubernetesVersionsListBySubscriptionOptionalParams, + KubernetesVersionsListByResourceGroupOptionalParams, + KubernetesVersionsDeleteOptionalParams, + KubernetesVersionsUpdateOptionalParams, + KubernetesVersionsCreateOrUpdateOptionalParams, + KubernetesVersionsGetOptionalParams, +} from "./api/kubernetesVersions/index.js"; +export type { + L2NetworksListBySubscriptionOptionalParams, + L2NetworksListByResourceGroupOptionalParams, + L2NetworksDeleteOptionalParams, + L2NetworksUpdateOptionalParams, + L2NetworksCreateOrUpdateOptionalParams, + L2NetworksGetOptionalParams, +} from "./api/l2Networks/index.js"; +export type { + L3NetworksListBySubscriptionOptionalParams, + L3NetworksListByResourceGroupOptionalParams, + L3NetworksDeleteOptionalParams, + L3NetworksUpdateOptionalParams, + L3NetworksCreateOrUpdateOptionalParams, + L3NetworksGetOptionalParams, +} from "./api/l3Networks/index.js"; +export type { + MetricsConfigurationsListByClusterOptionalParams, + MetricsConfigurationsDeleteOptionalParams, + MetricsConfigurationsUpdateOptionalParams, + MetricsConfigurationsCreateOrUpdateOptionalParams, + MetricsConfigurationsGetOptionalParams, +} from "./api/metricsConfigurations/index.js"; +export type { OperationsListOptionalParams } from "./api/operations/index.js"; +export type { + RacksListBySubscriptionOptionalParams, + RacksListByResourceGroupOptionalParams, + RacksDeleteOptionalParams, + RacksUpdateOptionalParams, + RacksCreateOrUpdateOptionalParams, + RacksGetOptionalParams, +} from "./api/racks/index.js"; +export type { + RackSkusListBySubscriptionOptionalParams, + RackSkusGetOptionalParams, +} from "./api/rackSkus/index.js"; +export type { + StorageAppliancesRunReadCommandsOptionalParams, + StorageAppliancesEnableRemoteVendorManagementOptionalParams, + StorageAppliancesDisableRemoteVendorManagementOptionalParams, + StorageAppliancesListBySubscriptionOptionalParams, + StorageAppliancesListByResourceGroupOptionalParams, + StorageAppliancesDeleteOptionalParams, + StorageAppliancesUpdateOptionalParams, + StorageAppliancesCreateOrUpdateOptionalParams, + StorageAppliancesGetOptionalParams, +} from "./api/storageAppliances/index.js"; +export type { + TrunkedNetworksListBySubscriptionOptionalParams, + TrunkedNetworksListByResourceGroupOptionalParams, + TrunkedNetworksDeleteOptionalParams, + TrunkedNetworksUpdateOptionalParams, + TrunkedNetworksCreateOrUpdateOptionalParams, + TrunkedNetworksGetOptionalParams, +} from "./api/trunkedNetworks/index.js"; +export type { + VirtualMachinesStartOptionalParams, + VirtualMachinesRestartOptionalParams, + VirtualMachinesReimageOptionalParams, + VirtualMachinesPowerOffOptionalParams, + VirtualMachinesAssignRelayOptionalParams, + VirtualMachinesListBySubscriptionOptionalParams, + VirtualMachinesListByResourceGroupOptionalParams, + VirtualMachinesDeleteOptionalParams, + VirtualMachinesUpdateOptionalParams, + VirtualMachinesCreateOrUpdateOptionalParams, + VirtualMachinesGetOptionalParams, +} from "./api/virtualMachines/index.js"; +export type { + VolumesListBySubscriptionOptionalParams, + VolumesListByResourceGroupOptionalParams, + VolumesDeleteOptionalParams, + VolumesUpdateOptionalParams, + VolumesCreateOrUpdateOptionalParams, + VolumesGetOptionalParams, +} from "./api/volumes/index.js"; +export type { + AccessBridgesOperations, + AgentPoolsOperations, + BareMetalMachineKeySetsOperations, + BareMetalMachinesOperations, + BmcKeySetsOperations, + CloudServicesNetworksOperations, + ClusterManagersOperations, + ClustersOperations, + ConsolesOperations, + KubernetesClusterFeaturesOperations, + KubernetesClustersOperations, + KubernetesVersionsOperations, + L2NetworksOperations, + L3NetworksOperations, + MetricsConfigurationsOperations, + OperationsOperations, + RacksOperations, + RackSkusOperations, + StorageAppliancesOperations, + TrunkedNetworksOperations, + VirtualMachinesOperations, + VolumesOperations, +} from "./classic/index.js"; +export type { PageSettings, ContinuablePage, PagedAsyncIterableIterator }; +export { AzureClouds }; +export type { AzureSupportedClouds }; diff --git a/sdk/networkcloud/arm-networkcloud/src/logger.ts b/sdk/networkcloud/arm-networkcloud/src/logger.ts new file mode 100644 index 000000000000..4af743e95ed5 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("arm-networkcloud"); diff --git a/sdk/networkcloud/arm-networkcloud/src/lroImpl.ts b/sdk/networkcloud/arm-networkcloud/src/lroImpl.ts deleted file mode 100644 index 064aab0f7c7f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/lroImpl.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { AbortSignalLike } from "@azure/abort-controller"; -import type { LongRunningOperation, LroResponse } from "@azure/core-lro"; - -export function createLroSpec(inputs: { - sendOperationFn: (args: any, spec: any) => Promise>; - args: Record; - spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record; -}): LongRunningOperation { - const { args, spec, sendOperationFn } = inputs; - return { - requestMethod: spec.httpMethod, - requestPath: spec.path!, - sendInitialRequest: () => sendOperationFn(args, spec), - sendPollRequest: (path: string, options?: { abortSignal?: AbortSignalLike }) => { - const { requestBody, ...restSpec } = spec; - return sendOperationFn(args, { - ...restSpec, - httpMethod: "GET", - path, - abortSignal: options?.abortSignal, - }); - }, - }; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/models/index.ts b/sdk/networkcloud/arm-networkcloud/src/models/index.ts index 7b400c49a10d..ca7860d7a4df 100644 --- a/sdk/networkcloud/arm-networkcloud/src/models/index.ts +++ b/sdk/networkcloud/arm-networkcloud/src/models/index.ts @@ -1,7841 +1,465 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type * as coreClient from "@azure/core-client"; - -/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ -export interface OperationListResult { - /** - * List of operations supported by the resource provider - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: Operation[]; - /** - * URL to get the next set of operation list results (if there are any). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Details of a REST API operation, returned from the Resource Provider Operations API */ -export interface Operation { - /** - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isDataAction?: boolean; - /** Localized display information for this particular operation. */ - display?: OperationDisplay; - /** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly origin?: Origin; - /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionType?: ActionType; -} - -/** Localized display information for this particular operation. */ -export interface OperationDisplay { - /** - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provider?: string; - /** - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resource?: string; - /** - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operation?: string; - /** - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponse { - /** The error object. */ - error?: ErrorDetail; -} - -/** The error detail. */ -export interface ErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetail[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; -} - -/** BareMetalMachineList represents a list of bare metal machines. */ -export interface BareMetalMachineList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of bare metal machines. */ - value?: BareMetalMachine[]; -} - -/** ExtendedLocation represents the Azure custom location where the resource will be created. */ -export interface ExtendedLocation { - /** The resource ID of the extended location on which the resource will be created. */ - name: string; - /** The extended location type, for example, CustomLocation. */ - type: string; -} - -/** ActionState represents the state of an action taken against a resource. This can be used to represent both explicitly and implicitly defined action types. */ -export interface ActionState { - /** - * The representation of the action for which this is a status. Matches ARM resource action format when the action is an ARM-based action. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionType?: string; - /** - * The correlation ID for the original action request. Omitted if there is no related correlation ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly correlationId?: string; - /** - * The timestamp of when the action reached its final, terminal state. Uses ISO 8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly endTime?: string; - /** - * The description providing additional context for the status value. May be empty or contain guidance in the case of a failure. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The timestamp of when the action began, in ISO 8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startTime?: string; - /** - * The status of the action. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: ActionStateStatus; - /** - * The ordered list of the individual steps which make up the action. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly stepStates?: StepState[]; -} - -/** StepState represents the state of a step in an action. */ -export interface StepState { - /** - * The timestamp for when processing of the step reached its terminal state, in ISO 8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly endTime?: string; - /** - * The message providing additional context for the status value. May be empty, or contain diagnostic information in the case of a failure. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The timestamp for when processing of the step began, in ISO 8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startTime?: string; - /** - * The status of the step. A value of Completed or Failed indicates a terminal state for the step. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: StepStateStatus; - /** - * The name for the step. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly stepName?: string; -} - -/** AdministrativeCredentials represents the admin credentials for the device requiring password-based authentication. */ -export interface AdministrativeCredentials { - /** The password of the administrator of the device used during initialization. */ - password: string; - /** The username of the administrator of the device used during initialization. */ - username: string; -} - -/** CertificateInfo represents the non-private information of an X.509 Certificate. */ -export interface CertificateInfo { - /** - * The hash value of the X.509 Certificate. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hash?: string; - /** - * The textual value of the X.509 Certificate. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: string; -} - -/** HardwareInventory represents the hardware configuration of this machine as exposed to the customer, including information acquired from the model/sku information and from the ironic inspector. */ -export interface HardwareInventory { - /** - * Freeform data extracted from the environment about this machine. This information varies depending on the specific hardware and configuration. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalHostInformation?: string; - /** - * The list of network interfaces and associated details for the bare metal machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly interfaces?: HardwareInventoryNetworkInterface[]; - /** - * Field Deprecated. Will be removed in an upcoming version. The list of network interface cards and associated details for the bare metal machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nics?: Nic[]; -} - -/** HardwareInventoryNetworkInterface represents the network interface details as part of a hardware inventory. */ -export interface HardwareInventoryNetworkInterface { - /** - * The current status of the link. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly linkStatus?: string; - /** - * The MAC address associated with this interface. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly macAddress?: string; - /** - * The name of the interface. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The resource ID of the network interface for the port on the switch that this machine's interface is connected to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkInterfaceId?: string; -} - -/** Type Deprecated. Will be removed in an upcoming version. Nic represents the network interface card details. */ -export interface Nic { - /** - * The information about the device connected to this NIC. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lldpNeighbor?: LldpNeighbor; - /** - * The MAC address associated with this NIC. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly macAddress?: string; - /** - * The name of the NIC/interface. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; -} - -/** Type Deprecated. Will be removed in an upcoming version. LldpNeighbor represents the details about the device connected to the NIC. */ -export interface LldpNeighbor { - /** - * The descriptive information about the port on the connected device. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portDescription?: string; - /** - * The system-assigned name of the port on the connected device. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portName?: string; - /** - * The descriptive information about the connected device. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemDescription?: string; - /** - * The system-assigned name of the connected device. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemName?: string; -} - -/** HardwareValidationStatus represents the latest hardware validation details performed for this bare metal machine. */ -export interface HardwareValidationStatus { - /** - * The timestamp of the hardware validation execution. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastValidationTime?: Date; - /** - * The outcome of the hardware validation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly result?: BareMetalMachineHardwareValidationResult; -} - -/** RuntimeProtectionStatus represents the runtime protection status of the bare metal machine. */ -export interface RuntimeProtectionStatus { - /** - * The timestamp when the malware definitions were last updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly definitionsLastUpdated?: Date; - /** - * The version of the malware definitions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly definitionsVersion?: string; - /** - * The timestamp of the most recently completed scan, or empty if there has never been a scan. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scanCompletedTime?: Date; - /** - * The timestamp of the most recently scheduled scan, or empty if no scan has been scheduled. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scanScheduledTime?: Date; - /** - * The timestamp of the most recently started scan, or empty if there has never been a scan. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scanStartedTime?: Date; -} - -/** SecretRotationStatus represents the status of a secret rotation. */ -export interface SecretRotationStatus { - /** - * The maximum number of days the secret may be used before it must be changed. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly expirePeriodDays?: number; - /** - * The date and time when the secret was last changed. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastRotationTime?: Date; - /** - * The number of days a secret exists before rotations will be attempted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rotationPeriodDays?: number; - /** - * The reference to the secret in a key vault. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly secretArchiveReference?: SecretArchiveReference; - /** - * The type name used to identify the purpose of the secret. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly secretType?: string; -} - -/** SecretArchiveReference represents the reference to a secret in a key vault. */ -export interface SecretArchiveReference { - /** - * The resource ID of the key vault containing the secret. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly keyVaultId?: string; - /** - * The URI of the key containing the secret. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly keyVaultUri?: string; - /** - * The name of the secret in the key vault. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly secretName?: string; - /** - * The version of the secret in the key vault. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly secretVersion?: string; -} - -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - -/** CloudServicesNetworkList represents a list of cloud services networks. */ -export interface CloudServicesNetworkList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of cloud services networks. */ - value?: CloudServicesNetwork[]; -} - -/** EgressEndpoint represents the connection from a cloud services network to the specified endpoint for a common purpose. */ -export interface EgressEndpoint { - /** The descriptive category name of endpoints accessible by the AKS agent node. For example, azure-resource-management, API server, etc. The platform egress endpoints provided by default will use the category 'default'. */ - category: string; - /** The list of endpoint dependencies. */ - endpoints: EndpointDependency[]; -} - -/** EndpointDependency represents the definition of an endpoint, including the domain and details. */ -export interface EndpointDependency { - /** The domain name of the dependency. */ - domainName: string; - /** The port of this endpoint. */ - port?: number; -} - -/** CloudServicesNetworkStorageOptions represents the storage options for the cloud services network. */ -export interface CloudServicesNetworkStorageOptions { - /** The indicator to enable shared storage on the cloud services network. If not specified, the allocation will align with the standard storage enablement. */ - mode?: CloudServicesNetworkStorageMode; - /** The requested storage allocation for the volume in Mebibytes. */ - sizeMiB?: number; - /** The resource ID of the storage appliance that hosts the storage. */ - storageApplianceId?: string; -} - -/** CloudServicesNetworkStorageStatus represents the storage status of the cloud services network. */ -export interface CloudServicesNetworkStorageStatus { - /** - * The indicator of if shared storage is enabled on the cloud services network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly mode?: CloudServicesNetworkStorageMode; - /** - * The size in Mebibytes of the storage allocation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sizeMiB?: number; - /** - * The status of the storage allocation for the cloud services network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: CloudServicesNetworkStorageStatusStatus; - /** - * The description for the status of the shared storage. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly statusMessage?: string; - /** - * The resource ID of the volume created to host the shared storage. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly volumeId?: string; -} - -/** ClusterManagerList represents a list of cluster manager objects. */ -export interface ClusterManagerList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of cluster managers. */ - value?: ClusterManager[]; -} - -/** Managed service identity (system assigned and/or user assigned identities) */ -export interface ManagedServiceIdentity { - /** - * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ - type: ManagedServiceIdentityType; - /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ - userAssignedIdentities?: { - [propertyName: string]: UserAssignedIdentity | null; - }; -} - -/** User assigned identity properties */ -export interface UserAssignedIdentity { - /** - * The principal ID of the assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The client ID of the assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clientId?: string; -} - -/** ClusterAvailableVersion represents the cluster version that the cluster manager can be asked to create and manage. */ -export interface ClusterAvailableVersion { - /** - * The last date the version of the platform is supported. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly supportExpiryDate?: string; - /** - * The version of the cluster to be deployed. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetClusterVersion?: string; -} - -/** ManagedResourceGroupConfiguration represents the configuration of the resource group managed by Azure. */ -export interface ManagedResourceGroupConfiguration { - /** The location of the managed resource group. If not specified, the location of the parent resource is chosen. */ - location?: string; - /** The name for the managed resource group. If not specified, the unique name is automatically generated. */ - name?: string; -} - -/** ClusterList represents a list of clusters. */ -export interface ClusterList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of clusters. */ - value?: Cluster[]; -} - -/** RackDefinition represents details regarding the rack. */ -export interface RackDefinition { - /** The zone name used for this rack when created. Availability zones are used for workload placement. */ - availabilityZone?: string; - /** The unordered list of bare metal machine configuration. */ - bareMetalMachineConfigurationData?: BareMetalMachineConfigurationData[]; - /** The resource ID of the network rack that matches this rack definition. */ - networkRackId: string; - /** The free-form description of the rack's location. */ - rackLocation?: string; - /** The unique identifier for the rack within Network Cloud cluster. An alternate unique alphanumeric value other than a serial number may be provided if desired. */ - rackSerialNumber: string; - /** The resource ID of the sku for the rack being added. */ - rackSkuId: string; - /** The list of storage appliance configuration data for this rack. */ - storageApplianceConfigurationData?: StorageApplianceConfigurationData[]; -} - -/** BareMetalMachineConfigurationData represents configuration for the bare metal machine. */ -export interface BareMetalMachineConfigurationData { - /** - * The connection string for the baseboard management controller including IP address and protocol. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly bmcConnectionString?: string; - /** The credentials of the baseboard management controller on this bare metal machine. The password field is expected to be an Azure Key Vault key URL. Until the cluster is converted to utilize managed identity by setting the secret archive settings, the actual password value should be provided instead. */ - bmcCredentials: AdministrativeCredentials; - /** The MAC address of the BMC for this machine. */ - bmcMacAddress: string; - /** The MAC address associated with the PXE NIC card. */ - bootMacAddress: string; - /** The free-form additional information about the machine, e.g. an asset tag. */ - machineDetails?: string; - /** The user-provided name for the bare metal machine created from this specification. If not provided, the machine name will be generated programmatically. */ - machineName?: string; - /** The slot the physical machine is in the rack based on the BOM configuration. */ - rackSlot: number; - /** The serial number of the machine. Hardware suppliers may use an alternate value. For example, service tag. */ - serialNumber: string; -} - -/** StorageApplianceConfigurationData represents configuration for the storage application. */ -export interface StorageApplianceConfigurationData { - /** The credentials of the administrative interface on this storage appliance. The password field is expected to be an Azure Key Vault key URL. Until the cluster is converted to utilize managed identity by setting the secret archive settings, the actual password value should be provided instead. */ - adminCredentials: AdministrativeCredentials; - /** The slot that storage appliance is in the rack based on the BOM configuration. */ - rackSlot: number; - /** The serial number of the appliance. */ - serialNumber: string; - /** The user-provided name for the storage appliance that will be created from this specification. */ - storageApplianceName?: string; -} - -/** AnalyticsOutputSettings represents the settings for the log analytics workspace used for output of logs from this cluster. */ -export interface AnalyticsOutputSettings { - /** The resource ID of the analytics workspace that is to be used by the specified identity. */ - analyticsWorkspaceId?: string; - /** The selection of the managed identity to use with this analytics workspace. The identity type must be either system assigned or user assigned. */ - associatedIdentity?: IdentitySelector; -} - -/** IdentitySelector represents the selection of a managed identity for use. */ -export interface IdentitySelector { - /** The type of managed identity that is being selected. */ - identityType?: ManagedServiceIdentitySelectorType; - /** The user assigned managed identity resource ID to use. Mutually exclusive with a system assigned identity type. */ - userAssignedIdentityResourceId?: string; -} - -/** ClusterAvailableUpgradeVersion represents the various cluster upgrade parameters. */ -export interface ClusterAvailableUpgradeVersion { - /** - * The indicator of whether the control plane will be impacted during the upgrade. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly controlImpact?: ControlImpact; - /** - * The expected duration needed for this upgrade. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly expectedDuration?: string; - /** - * The impact description including the specific details and release notes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly impactDescription?: string; - /** - * The last date the version of the platform is supported. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly supportExpiryDate?: string; - /** - * The target version this cluster will be upgraded to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetClusterVersion?: string; - /** - * The indicator of whether the workload will be impacted during the upgrade. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly workloadImpact?: WorkloadImpact; -} - -/** ClusterCapacity represents various details regarding compute capacity. */ -export interface ClusterCapacity { - /** The remaining appliance-based storage in GB available for workload use. Measured in gibibytes. */ - availableApplianceStorageGB?: number; - /** The remaining number of cores that are available in this cluster for workload use. */ - availableCoreCount?: number; - /** The remaining machine or host-based storage in GB available for workload use. Measured in gibibytes. */ - availableHostStorageGB?: number; - /** The remaining memory in GB that are available in this cluster for workload use. Measured in gibibytes. */ - availableMemoryGB?: number; - /** The total appliance-based storage in GB supported by this cluster for workload use. Measured in gibibytes. */ - totalApplianceStorageGB?: number; - /** The total number of cores that are supported by this cluster for workload use. */ - totalCoreCount?: number; - /** The total machine or host-based storage in GB supported by this cluster for workload use. Measured in gibibytes. */ - totalHostStorageGB?: number; - /** The total memory supported by this cluster for workload use. Measured in gibibytes. */ - totalMemoryGB?: number; -} - -/** ServicePrincipalInformation represents the details of the service principal to be used by the cluster during Arc Appliance installation. */ -export interface ServicePrincipalInformation { - /** The application ID, also known as client ID, of the service principal. */ - applicationId: string; - /** The password of the service principal. */ - password: string; - /** The principal ID, also known as the object ID, of the service principal. */ - principalId: string; - /** The tenant ID, also known as the directory ID, of the tenant in which the service principal is created. */ - tenantId: string; -} - -/** CommandOutputSettings represents the settings for commands run within the cluster such as bare metal machine run read-only commands. */ -export interface CommandOutputSettings { - /** The selection of the managed identity to use with this storage account container. The identity type must be either system assigned or user assigned. */ - associatedIdentity?: IdentitySelector; - /** The URL of the storage account container that is to be used by the specified identities. */ - containerUrl?: string; - /** The list of optional overrides allowing for association of storage containers and identities to specific types of command output. If a type is not overridden, the default identity and storage container will be utilized. */ - overrides?: CommandOutputOverride[]; -} - -/** CommandOutputOverride represents an overridden value for the command output settings. */ -export interface CommandOutputOverride { - /** The selection of the managed identity to use with this storage account container. The identity type must be either system assigned or user assigned. */ - associatedIdentity?: IdentitySelector; - /** The type of command output for the override. */ - commandOutputType?: CommandOutputType; - /** The URL of the storage account container that is to be used by the specified identities. */ - containerUrl?: string; -} - -/** ValidationThreshold indicates allowed machine and node hardware and deployment failures. */ -export interface ValidationThreshold { - /** Selection of how the type evaluation is applied to the cluster calculation. */ - grouping: ValidationThresholdGrouping; - /** Selection of how the threshold should be evaluated. */ - type: ValidationThresholdType; - /** The numeric threshold value. */ - value: number; -} - -/** RuntimeProtectionConfiguration represents the runtime protection configuration for the cluster. */ -export interface RuntimeProtectionConfiguration { - /** The mode of operation for runtime protection. */ - enforcementLevel?: RuntimeProtectionEnforcementLevel; -} - -/** ClusterSecretArchive configures the key vault to archive the secrets of the cluster for later retrieval. */ -export interface ClusterSecretArchive { - /** The resource ID of the key vault to archive the secrets of the cluster. */ - keyVaultId: string; - /** The indicator if the specified key vault should be used to archive the secrets of the cluster. */ - useKeyVault?: ClusterSecretArchiveEnabled; -} - -/** SecretArchiveSettings represents the settings for the secret archive used to hold credentials for the cluster. */ -export interface SecretArchiveSettings { - /** The selection of the managed identity to use with this vault URI. The identity type must be either system assigned or user assigned. */ - associatedIdentity?: IdentitySelector; - /** The URI for the key vault used as the secret archive. */ - vaultUri?: string; -} - -/** ClusterUpdateStrategy represents the strategy for updating the cluster. */ -export interface 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. */ - maxUnavailable?: number; - /** The mode of operation for runtime protection. */ - strategyType: ClusterUpdateStrategyType; - /** Selection of how the threshold should be evaluated. */ - thresholdType: ValidationThresholdType; - /** The numeric threshold value. */ - thresholdValue: number; - /** The time to wait between the increments of update defined by the strategy. */ - waitTimeMinutes?: number; -} - -/** VulnerabilityScanningSettings represents the settings for how security vulnerability scanning is applied to the cluster. */ -export interface VulnerabilityScanningSettings { - /** The mode selection for container vulnerability scanning. */ - containerScan?: VulnerabilityScanningSettingsContainerScan; -} - -/** KubernetesClusterList represents a list of Kubernetes clusters. */ -export interface KubernetesClusterList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of additional details related to Kubernetes clusters. */ - value?: KubernetesCluster[]; -} - -/** AadConfiguration represents the Azure Active Directory Integration properties. */ -export interface AadConfiguration { - /** The list of Azure Active Directory group object IDs that will have an administrative role on the Kubernetes cluster. */ - adminGroupObjectIds: string[]; -} - -/** AdministratorConfiguration represents the administrative credentials that will be applied to the control plane and agent pool nodes in Kubernetes clusters. */ -export interface AdministratorConfiguration { - /** The user name for the administrator that will be applied to the operating systems that run Kubernetes nodes. If not supplied, a user name will be chosen by the service. */ - adminUsername?: string; - /** The SSH configuration for the operating systems that run the nodes in the Kubernetes cluster. In some cases, specification of public keys may be required to produce a working environment. */ - sshPublicKeys?: SshPublicKey[]; -} - -/** SshPublicKey represents the public key used to authenticate with a resource through SSH. */ -export interface SshPublicKey { - /** The SSH public key data. */ - keyData: string; -} - -/** AvailableUpgrade represents an upgrade available for a Kubernetes cluster. */ -export interface AvailableUpgrade { - /** - * The version lifecycle indicator. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly availabilityLifecycle?: AvailabilityLifecycle; - /** - * The version available for upgrading. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly version?: string; -} - -/** ControlPlaneNodeConfiguration represents the selection of virtual machines and size of the control plane for a Kubernetes cluster. */ -export interface ControlPlaneNodeConfiguration { - /** The administrator credentials to be used for the nodes in the control plane. */ - administratorConfiguration?: AdministratorConfiguration; - /** The list of availability zones of the Network Cloud cluster to be used for the provisioning of nodes in the control plane. If not specified, all availability zones will be used. */ - availabilityZones?: string[]; - /** The number of virtual machines that use this configuration. */ - count: number; - /** The name of the VM SKU supplied during creation. */ - vmSkuName: string; -} - -/** FeatureStatus contains information regarding a Kubernetes cluster feature. */ -export interface FeatureStatus { - /** - * The status representing the state of this feature. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: FeatureDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** - * The name of the feature. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The version of the feature. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly version?: string; -} - -/** InitialAgentPoolConfiguration specifies the configuration of a pool of virtual machines that are initially defined with a Kubernetes cluster. */ -export interface InitialAgentPoolConfiguration { - /** The administrator credentials to be used for the nodes in this agent pool. */ - administratorConfiguration?: AdministratorConfiguration; - /** The configurations that will be applied to each agent in this agent pool. */ - agentOptions?: AgentOptions; - /** The configuration of networks being attached to the agent pool for use by the workloads that run on this Kubernetes cluster. */ - attachedNetworkConfiguration?: AttachedNetworkConfiguration; - /** 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. */ - availabilityZones?: string[]; - /** The number of virtual machines that use this configuration. */ - count: number; - /** The labels applied to the nodes in this agent pool. */ - labels?: KubernetesLabel[]; - /** 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. */ - mode: AgentPoolMode; - /** The name that will be used for the agent pool resource representing this agent pool. */ - name: string; - /** The taints applied to the nodes in this agent pool. */ - taints?: KubernetesLabel[]; - /** The configuration of the agent pool. */ - upgradeSettings?: AgentPoolUpgradeSettings; - /** The name of the VM SKU that determines the size of resources allocated for node VMs. */ - vmSkuName: string; -} - -/** AgentOptions are configurations that will be applied to each agent in an agent pool. */ -export interface AgentOptions { - /** The number of hugepages to allocate. */ - hugepagesCount: number; - /** The size of the hugepages to allocate. */ - hugepagesSize?: HugepagesSize; -} - -/** AttachedNetworkConfiguration represents the set of workload networks to attach to a resource. */ -export interface AttachedNetworkConfiguration { - /** The list of Layer 2 Networks and related configuration for attachment. */ - l2Networks?: L2NetworkAttachmentConfiguration[]; - /** The list of Layer 3 Networks and related configuration for attachment. */ - l3Networks?: L3NetworkAttachmentConfiguration[]; - /** The list of Trunked Networks and related configuration for attachment. */ - trunkedNetworks?: TrunkedNetworkAttachmentConfiguration[]; -} - -/** L2NetworkAttachmentConfiguration represents the configuration of the attachment of a Layer 2 network. */ -export interface L2NetworkAttachmentConfiguration { - /** The resource ID of the network that is being configured for attachment. */ - networkId: string; - /** The indicator of how this network will be utilized by the Kubernetes cluster. */ - pluginType?: KubernetesPluginType; -} - -/** L3NetworkAttachmentConfiguration represents the configuration of the attachment of a Layer 3 network. */ -export interface L3NetworkAttachmentConfiguration { - /** The indication of whether this network will or will not perform IP address management and allocate IP addresses when attached. */ - ipamEnabled?: L3NetworkConfigurationIpamEnabled; - /** The resource ID of the network that is being configured for attachment. */ - networkId: string; - /** The indicator of how this network will be utilized by the Kubernetes cluster. */ - pluginType?: KubernetesPluginType; -} - -/** TrunkedNetworkAttachmentConfiguration represents the configuration of the attachment of a trunked network. */ -export interface TrunkedNetworkAttachmentConfiguration { - /** The resource ID of the network that is being configured for attachment. */ - networkId: string; - /** The indicator of how this network will be utilized by the Kubernetes cluster. */ - pluginType?: KubernetesPluginType; -} - -/** KubernetesLabel represents a single entry for a Kubernetes label or taint such as those used on a node or pod. */ -export interface KubernetesLabel { - /** The name of the label or taint. */ - key: string; - /** The value of the label or taint. */ - value: string; -} - -/** AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool. */ -export interface AgentPoolUpgradeSettings { - /** 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. */ - drainTimeout?: number; - /** 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. */ - maxSurge?: string; - /** 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. */ - maxUnavailable?: string; -} - -/** NetworkConfiguration specifies the Kubernetes cluster network related configuration. */ -export interface NetworkConfiguration { - /** The configuration of networks being attached to the cluster for use by the workloads that run on this Kubernetes cluster. */ - attachedNetworkConfiguration?: AttachedNetworkConfiguration; - /** 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. */ - bgpServiceLoadBalancerConfiguration?: BgpServiceLoadBalancerConfiguration; - /** The resource ID of the associated Cloud Services network. */ - cloudServicesNetworkId: string; - /** The resource ID of the Layer 3 network that is used for creation of the Container Networking Interface network. */ - cniNetworkId: string; - /** The IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in service CIDR. */ - dnsServiceIp?: string; - /** 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. */ - l2ServiceLoadBalancerConfiguration?: L2ServiceLoadBalancerConfiguration; - /** 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. */ - podCidrs?: string[]; - /** 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. */ - serviceCidrs?: string[]; -} - -/** BgpServiceLoadBalancerConfiguration represents the configuration of a BGP service load balancer. */ -export interface BgpServiceLoadBalancerConfiguration { - /** The association of IP address pools to the communities and peers, allowing for announcement of IPs. */ - bgpAdvertisements?: BgpAdvertisement[]; - /** The list of additional BgpPeer entities that the Kubernetes cluster will peer with. All peering must be explicitly defined. */ - bgpPeers?: ServiceLoadBalancerBgpPeer[]; - /** The indicator to specify if the load balancer peers with the network fabric. */ - fabricPeeringEnabled?: FabricPeeringEnabled; - /** The list of pools of IP addresses that can be allocated to load balancer services. */ - ipAddressPools?: IpAddressPool[]; -} - -/** BgpAdvertisement represents the association of IP address pools to the communities and peers. */ -export interface BgpAdvertisement { - /** The indicator of if this advertisement is also made to the network fabric associated with the Network Cloud Cluster. This field is ignored if fabricPeeringEnabled is set to False. */ - advertiseToFabric?: AdvertiseToFabric; - /** The names of the BGP communities to be associated with the announcement, utilizing a BGP community string in 1234:1234 format. */ - communities?: string[]; - /** The names of the IP address pools associated with this announcement. */ - ipAddressPools: string[]; - /** The names of the BGP peers to limit this advertisement to. If no values are specified, all BGP peers will receive this advertisement. */ - peers?: string[]; -} - -/** ServiceLoadBalancerBgpPeer represents the configuration of the BGP service load balancer for the Kubernetes cluster. */ -export interface ServiceLoadBalancerBgpPeer { - /** The indicator of BFD enablement for this BgpPeer. */ - bfdEnabled?: BfdEnabled; - /** The indicator to enable multi-hop peering support. */ - bgpMultiHop?: BgpMultiHop; - /** 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. */ - holdTime?: string; - /** 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. */ - keepAliveTime?: string; - /** The autonomous system number used for the local end of the BGP session. */ - myAsn?: number; - /** The name used to identify this BGP peer for association with a BGP advertisement. */ - name: string; - /** The authentication password for routers enforcing TCP MD5 authenticated sessions. */ - password?: string; - /** The IPv4 or IPv6 address used to connect this BGP session. */ - peerAddress: string; - /** The autonomous system number expected from the remote end of the BGP session. */ - peerAsn: number; - /** The port used to connect this BGP session. */ - peerPort?: number; -} - -/** IpAddressPool represents a pool of IP addresses that can be allocated to a service. */ -export interface 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. For a BGP service load balancer configuration, only CIDR format is supported and excludes /32 (IPv4) and /128 (IPv6) prefixes. */ - addresses: string[]; - /** The indicator to determine if automatic allocation from the pool should occur. */ - autoAssign?: BfdEnabled; - /** The name used to identify this IP address pool for association with a BGP advertisement. */ - name: string; - /** 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. */ - onlyUseHostIps?: BfdEnabled; -} - -/** L2ServiceLoadBalancerConfiguration represents the configuration of a layer 2 service load balancer. */ -export interface L2ServiceLoadBalancerConfiguration { - /** The list of pools of IP addresses that can be allocated to load balancer services. */ - ipAddressPools?: IpAddressPool[]; -} - -/** KubernetesClusterNode represents the details of a node in a Kubernetes cluster. */ -export interface KubernetesClusterNode { - /** - * The resource ID of the agent pool that this node belongs to. This value is not represented on control plane nodes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly agentPoolId?: string; - /** - * The availability zone this node is running within. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly availabilityZone?: string; - /** - * The resource ID of the bare metal machine that hosts this node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly bareMetalMachineId?: string; - /** - * The number of CPU cores configured for this node, derived from the VM SKU specified. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly cpuCores?: number; - /** - * The detailed state of this node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: KubernetesClusterNodeDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** - * The size of the disk configured for this node. Allocations are measured in gibibytes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly diskSizeGB?: number; - /** - * The machine image used to deploy this node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly image?: string; - /** - * The currently running version of Kubernetes and bundled features running on this node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kubernetesVersion?: string; - /** - * The list of labels on this node that have been assigned to the agent pool containing this node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly labels?: KubernetesLabel[]; - /** - * The amount of memory configured for this node, derived from the vm SKU specified. Allocations are measured in gibibytes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly memorySizeGB?: number; - /** - * The mode of the agent pool containing this node. Not applicable for control plane nodes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly mode?: AgentPoolMode; - /** - * The name of this node, as realized in the Kubernetes cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The NetworkAttachments made to this node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkAttachments?: NetworkAttachment[]; - /** - * The power state of this node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly powerState?: KubernetesNodePowerState; - /** - * The role of this node in the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly role?: KubernetesNodeRole; - /** - * The list of taints that have been assigned to the agent pool containing this node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly taints?: KubernetesLabel[]; - /** - * The VM SKU name that was used to create this cluster node. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vmSkuName?: string; -} - -/** NetworkAttachment represents the single network attachment. */ -export interface NetworkAttachment { - /** The resource ID of the associated network attached to the virtual machine. It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources. */ - attachedNetworkId: string; - /** 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. */ - defaultGateway?: DefaultGateway; - /** 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. */ - ipAllocationMethod: VirtualMachineIPAllocationMethod; - /** 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. */ - ipv4Address?: string; - /** 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. */ - ipv6Address?: string; - /** - * The MAC address of the interface for the virtual machine that corresponds to this network attachment. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly macAddress?: string; - /** 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. */ - networkAttachmentName?: string; -} - -/** L2NetworkList represents a list of L2 networks. */ -export interface L2NetworkList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of L2 networks. */ - value?: L2Network[]; -} - -/** L3NetworkList represents a list of L3 networks. */ -export interface L3NetworkList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of L3 networks. */ - value?: L3Network[]; -} - -/** RackSkuList represents a list of rack SKUs. */ -export interface RackSkuList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of Rack SKUs. */ - value?: RackSku[]; -} - -/** MachineSkuSlot represents a single SKU and rack slot associated with the machine. */ -export interface MachineSkuSlot { - /** - * The position in the rack for the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rackSlot?: number; - /** - * The type of bootstrap protocol used. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly bootstrapProtocol?: BootstrapProtocol; - /** - * The count of CPU cores for this machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly cpuCores?: number; - /** - * The count of CPU sockets for this machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly cpuSockets?: number; - /** - * The list of disks. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly disks?: MachineDisk[]; - /** - * The generation of the architecture. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly generation?: string; - /** - * The hardware version of the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hardwareVersion?: string; - /** - * The maximum amount of memory. Measured in gibibytes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly memoryCapacityGB?: number; - /** - * The model of the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly model?: string; - /** - * The list of network interfaces. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkInterfaces?: NetworkInterface[]; - /** - * The count of SMT and physical core threads for this machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly totalThreads?: number; - /** - * The make of the machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vendor?: string; -} - -/** Disk represents the properties of the disk. */ -export interface MachineDisk { - /** - * The maximum amount of storage. Measured in gibibytes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capacityGB?: number; - /** - * The connection type of the rack SKU resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connection?: MachineSkuDiskConnectionType; - /** - * The disk type of rack SKU resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: DiskType; -} - -/** NetworkInterface represents properties of the network interface. */ -export interface NetworkInterface { - /** - * The partial address of Peripheral Component Interconnect (PCI). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly address?: string; - /** - * The connection type of the device. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly deviceConnectionType?: DeviceConnectionType; - /** - * The model name of the device. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly model?: string; - /** - * The physical slot for this device. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly physicalSlot?: number; - /** - * The number of ports on the device. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portCount?: number; - /** - * The maximum amount of data in gigabits that the line card transmits through a port at any given second. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portSpeed?: number; - /** - * The vendor name of the device. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vendor?: string; -} - -/** StorageApplianceSkuSlot represents the single SKU and rack slot associated with the storage appliance. */ -export interface StorageApplianceSkuSlot { - /** - * The position in the rack for the storage appliance. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rackSlot?: number; - /** - * The maximum capacity of the storage appliance. Measured in gibibytes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capacityGB?: number; - /** - * The model of the storage appliance. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly model?: string; -} - -/** RackList represents a list of racks. */ -export interface RackList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of racks. */ - value?: Rack[]; -} - -/** StorageApplianceList represents a list of storage appliances. */ -export interface StorageApplianceList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of storage appliances. */ - value?: StorageAppliance[]; -} - -/** TrunkedNetworkList represents a list of trunked networks. */ -export interface TrunkedNetworkList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of trunked networks. */ - value?: TrunkedNetwork[]; -} - -/** VirtualMachineList represents a list of virtual machines. */ -export interface VirtualMachineList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of virtual machines. */ - value?: VirtualMachine[]; -} - -/** VirtualMachinePlacementHint represents a single scheduling hint of the virtual machine. */ -export interface VirtualMachinePlacementHint { - /** The specification of whether this hint supports affinity or anti-affinity with the referenced resources. */ - hintType: VirtualMachinePlacementHintType; - /** The resource ID of the target object that the placement hints will be checked against, e.g., the bare metal node to host the virtual machine. */ - resourceId: string; - /** The indicator of whether the hint is a hard or soft requirement during scheduling. */ - schedulingExecution: VirtualMachineSchedulingExecution; - /** The scope for the virtual machine affinity or anti-affinity placement hint. It should always be "Machine" in the case of node affinity. */ - scope: VirtualMachinePlacementHintPodAffinityScope; -} - -/** StorageProfile represents information about a disk. */ -export interface StorageProfile { - /** The disk to use with this virtual machine. */ - osDisk: OsDisk; - /** The resource IDs of volumes that are requested to be attached to the virtual machine. */ - volumeAttachments?: string[]; -} - -/** OsDisk represents configuration of the boot disk. */ -export interface OsDisk { - /** The strategy for creating the OS disk. */ - createOption?: OsDiskCreateOption; - /** The strategy for deleting the OS disk. */ - deleteOption?: OsDiskDeleteOption; - /** The size of the disk. Required if the createOption is Ephemeral. Allocations are measured in gibibytes. */ - diskSizeGB: number; -} - -/** ImageRepositoryCredentials represents the credentials used to login to the image repository. */ -export interface ImageRepositoryCredentials { - /** The password or token used to access an image in the target repository. */ - password: string; - /** The URL of the authentication server used to validate the repository credentials. */ - registryUrl: string; - /** The username used to access an image in the target repository. */ - username: string; -} - -/** VolumeList represents a list of volumes. */ -export interface VolumeList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of volumes. */ - value?: Volume[]; -} - -/** The current status of an async operation. */ -export interface OperationStatusResult { - /** - * The end time of the operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly endTime?: Date; - /** - * If present, details of the operation error. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly error?: ErrorDetail; - /** - * Fully qualified ID for the async operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Name of the async operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The operations list. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operations?: OperationStatusResult[]; - /** - * Percent of the operation that is complete. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly percentComplete?: number; - /** - * Fully qualified ID of the resource against which the original async operation was started. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceId?: string; - /** - * The start time of the operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly startTime?: Date; - /** Operation status. */ - status: string; - /** - * For actions that run commands or scripts, the exit code of the script execution. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly exitCode?: string; - /** - * For actions that run commands or scripts, the leading bytes of the output of the script execution. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outputHead?: string; - /** - * For actions that run commands or scripts, a reference to the location of the result. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resultRef?: string; - /** - * For actions that run commands or scripts, the URL where the full output of the script output can be retrieved. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resultUrl?: string; -} - -/** BareMetalMachinePatchParameters represents the body of the request to patch bare metal machine properties. */ -export interface BareMetalMachinePatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; - /** The details provided by the customer during the creation of rack manifests that allows for custom data to be associated with this machine. */ - machineDetails?: string; -} - -/** BareMetalMachineCordonParameters represents the body of the request to evacuate workloads from node on a bare metal machine. */ -export interface BareMetalMachineCordonParameters { - /** The indicator of whether to evacuate the node workload when the bare metal machine is cordoned. */ - evacuate?: BareMetalMachineEvacuate; -} - -/** BareMetalMachinePowerOffParameters represents the body of the request to power off bare metal machine. */ -export interface BareMetalMachinePowerOffParameters { - /** The indicator of whether to skip the graceful OS shutdown and power off the bare metal machine immediately. */ - skipShutdown?: BareMetalMachineSkipShutdown; -} - -/** BareMetalMachineReplaceParameters represents the body of the request to physically swap a bare metal machine for another. */ -export interface BareMetalMachineReplaceParameters { - /** The credentials of the baseboard management controller on this bare metal machine. The password field is expected to be an Azure Key Vault key URL. Until the cluster is converted to utilize managed identity by setting the secret archive settings, the actual password value should be provided instead. */ - bmcCredentials?: AdministrativeCredentials; - /** The MAC address of the BMC device. */ - bmcMacAddress?: string; - /** The MAC address of a NIC connected to the PXE network. */ - bootMacAddress?: string; - /** The OS-level hostname assigned to this machine. */ - machineName?: string; - /** The safeguard mode to use for the replace action, where None indicates to bypass safeguards and All indicates to utilize all safeguards. */ - safeguardMode?: BareMetalMachineReplaceSafeguardMode; - /** The serial number of the bare metal machine. */ - serialNumber?: string; - /** The indicator of whether to bypass clearing storage while replacing a bare metal machine. */ - storagePolicy?: BareMetalMachineReplaceStoragePolicy; -} - -/** BareMetalMachineRunCommandParameters represents the body of the request to execute a script on the bare metal machine. */ -export interface BareMetalMachineRunCommandParameters { - /** The list of string arguments that will be passed to the script in order as separate arguments. */ - arguments?: string[]; - /** The maximum time the script is allowed to run. If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be captured, and the exit code matching a timeout will be returned (252). */ - limitTimeSeconds: number; - /** The base64 encoded script to execute on the bare metal machine. */ - script: string; -} - -/** BareMetalMachineRunDataExtractsParameters represents the body of request containing list of curated data extraction commands to run on the bare metal machine. */ -export interface BareMetalMachineRunDataExtractsParameters { - /** The list of curated data extraction commands to be executed directly against the target machine. */ - commands: BareMetalMachineCommandSpecification[]; - /** The maximum time the commands are allowed to run. If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be captured, and the exit code matching a timeout will be returned (252). */ - limitTimeSeconds: number; -} - -/** BareMetalMachineCommandSpecification represents the command and optional arguments to exercise against the bare metal machine. */ -export interface BareMetalMachineCommandSpecification { - /** The list of string arguments that will be passed to the script in order as separate arguments. */ - arguments?: string[]; - /** The command to execute against the bare metal machine. */ - command: string; -} - -/** BareMetalMachineRunReadCommandsParameters represents the body of request containing list of read-only commands to run on the bare metal machine. */ -export interface BareMetalMachineRunReadCommandsParameters { - /** The list of read-only commands to be executed directly against the target machine. */ - commands: BareMetalMachineCommandSpecification[]; - /** The maximum time the commands are allowed to run. If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be captured, and the exit code matching a timeout will be returned (252). */ - limitTimeSeconds: number; -} - -/** CloudServicesNetworkPatchParameters represents the body of the request to patch the cloud services network. */ -export interface CloudServicesNetworkPatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; - /** The list of egress endpoints. This allows for connection from a Hybrid AKS cluster to the specified endpoint. */ - additionalEgressEndpoints?: EgressEndpoint[]; - /** The indicator of whether the platform default endpoints are allowed for the egress traffic. */ - enableDefaultEgressEndpoints?: CloudServicesNetworkEnableDefaultEgressEndpoints; - /** The storage options for the cloud services network. */ - storageOptions?: CloudServicesNetworkStorageOptionsPatch; -} - -/** CloudServicesNetworkStorageOptionsPatch represents the patchable storage options for the cloud services network. */ -export interface CloudServicesNetworkStorageOptionsPatch { - /** The indicator to enable shared storage on the cloud services network. */ - mode?: CloudServicesNetworkStorageMode; - /** The requested storage allocation for the volume in Mebibytes. */ - sizeMiB?: number; - /** The resource ID of the storage appliance that hosts the storage. */ - storageApplianceId?: string; -} - -/** ClusterManagerPatchParameters represents the body of the request to patch the cluster properties. */ -export interface ClusterManagerPatchParameters { - /** The identity for the resource. */ - identity?: ManagedServiceIdentity; - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; -} - -/** ClusterPatchParameters represents the body of the request to patch the cluster properties. */ -export interface ClusterPatchParameters { - /** The identity for the resource. */ - identity?: ManagedServiceIdentity; - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; - /** 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. */ - aggregatorOrSingleRackDefinition?: RackDefinition; - /** The settings for the log analytics workspace used for output of logs from this cluster. */ - analyticsOutputSettings?: AnalyticsOutputSettings; - /** The customer-provided location information to identify where the cluster resides. */ - clusterLocation?: string; - /** Field Deprecated: Use managed identity to provide cluster privileges. The service principal to be used by the cluster during Arc Appliance installation. */ - clusterServicePrincipal?: ServicePrincipalInformation; - /** The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. */ - commandOutputSettings?: CommandOutputSettings; - /** The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. */ - computeDeploymentThreshold?: ValidationThreshold; - /** The list of rack definitions for the compute racks in a multi-rack cluster, or an empty list in a single-rack cluster. */ - computeRackDefinitions?: RackDefinition[]; - /** The settings for cluster runtime protection. */ - runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; - /** The configuration for use of a key vault to store secrets for later retrieval by the operator. */ - secretArchive?: ClusterSecretArchive; - /** The settings for the secret archive used to hold credentials for the cluster. */ - secretArchiveSettings?: SecretArchiveSettings; - /** The strategy for updating the cluster. */ - updateStrategy?: ClusterUpdateStrategy; - /** The settings for how security vulnerability scanning is applied to the cluster. */ - vulnerabilityScanningSettings?: VulnerabilityScanningSettingsPatch; -} - -/** VulnerabilityScanningSettingsPatch represents the settings for how security vulnerability scanning is applied to the cluster. */ -export interface VulnerabilityScanningSettingsPatch { - /** The mode selection for container vulnerability scanning. */ - containerScan?: VulnerabilityScanningSettingsContainerScan; -} - -/** BareMetalMachineKeySetList represents a list of bare metal machine key sets. */ -export interface BareMetalMachineKeySetList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of bare metal machine key sets. */ - value?: BareMetalMachineKeySet[]; -} - -/** KeySetUser represents the properties of the user in the key set. */ -export interface KeySetUser { - /** The user name that will be used for access. */ - azureUserName: string; - /** The free-form description for this user. */ - description?: string; - /** 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. */ - sshPublicKey: SshPublicKey; - /** The user principal name (email format) used to validate this user's group membership. */ - userPrincipalName?: string; -} - -/** KeySetUserStatus represents the status of the key set user. */ -export interface KeySetUserStatus { - /** - * The user name that will be used for access. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly azureUserName?: string; - /** - * The indicator of whether the user is currently deployed for access. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: BareMetalMachineKeySetUserSetupStatus; - /** - * The additional information describing the current status of this user, if any available. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly statusMessage?: string; -} - -/** BareMetalMachineKeySetPatchParameters represents the body of the request to patch the bare metal machine key set. */ -export interface BareMetalMachineKeySetPatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; - /** The date and time after which the users in this key set will be removed from the bare metal machines. */ - expiration?: Date; - /** The list of IP addresses of jump hosts with management network access from which a login will be allowed for the users. */ - jumpHostsAllowed?: string[]; - /** The unique list of permitted users. */ - userList?: KeySetUser[]; -} - -/** BmcKeySetList represents a list of baseboard management controller key sets. */ -export interface BmcKeySetList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of baseboard management controller key sets. */ - value?: BmcKeySet[]; -} - -/** BmcKeySetPatchParameters represents the body of the request to patch the baseboard management controller key set. */ -export interface BmcKeySetPatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; - /** The date and time after which the users in this key set will be removed from the baseboard management controllers. */ - expiration?: Date; - /** The unique list of permitted users. */ - userList?: KeySetUser[]; -} - -/** ClusterContinueUpdateVersionParameters represents the body of the request to continue the update of a cluster version. */ -export interface ClusterContinueUpdateVersionParameters { - /** The mode by which the cluster will target the next grouping of servers to continue the update. */ - machineGroupTargetingMode?: ClusterContinueUpdateVersionMachineGroupTargetingMode; -} - -/** ClusterDeployParameters represents the body of the request to deploy cluster. */ -export interface ClusterDeployParameters { - /** The names of bare metal machines in the cluster that should be skipped during environment validation. */ - skipValidationsForMachines?: string[]; -} - -/** ClusterMetricsConfigurationList represents a list of metrics configuration of the cluster. */ -export interface ClusterMetricsConfigurationList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of metrics configurations. */ - value?: ClusterMetricsConfiguration[]; -} - -/** ClusterMetricsConfigurationPatchParameters represents the body of the request to patch the metrics configuration of cluster. */ -export interface ClusterMetricsConfigurationPatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; - /** The interval in minutes by which metrics will be collected. */ - collectionInterval?: number; - /** The list of metric names that have been chosen to be enabled in addition to the core set of enabled metrics. */ - enabledMetrics?: string[]; -} - -/** ClusterScanRuntimeParameters defines the parameters for the cluster scan runtime operation. */ -export interface ClusterScanRuntimeParameters { - /** The choice of if the scan operation should run the scan. */ - scanActivity?: ClusterScanRuntimeParametersScanActivity; -} - -/** ClusterUpdateVersionParameters represents the body of the request to update cluster version. */ -export interface ClusterUpdateVersionParameters { - /** The version to be applied to the cluster during update. */ - targetClusterVersion: string; -} - -/** KubernetesClusterPatchParameters represents the body of the request to patch the Hybrid AKS cluster. */ -export interface KubernetesClusterPatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; - /** The configuration of the default administrator credentials. */ - administratorConfiguration?: AdministratorConfigurationPatch; - /** The defining characteristics of the control plane that can be patched for this Kubernetes cluster. */ - controlPlaneNodeConfiguration?: ControlPlaneNodePatchConfiguration; - /** The Kubernetes version for this cluster. */ - kubernetesVersion?: string; -} - -/** AdministratorConfigurationPatch represents the patching capabilities for the administrator configuration. */ -export interface AdministratorConfigurationPatch { - /** SshPublicKey represents the public key used to authenticate with a resource through SSH. */ - sshPublicKeys?: SshPublicKey[]; -} - -/** ControlPlaneNodePatchConfiguration represents the properties of the control plane that can be patched for this Kubernetes cluster. */ -export interface ControlPlaneNodePatchConfiguration { - /** The configuration of administrator credentials for the control plane nodes. */ - administratorConfiguration?: AdministratorConfigurationPatch; - /** The number of virtual machines that use this configuration. */ - count?: number; -} - -/** AgentPoolList represents a list of Kubernetes cluster agent pools. */ -export interface AgentPoolList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of agent pools. */ - value?: AgentPool[]; -} - -/** AgentPoolPatchParameters represents the body of the request to patch the Kubernetes cluster agent pool. */ -export interface AgentPoolPatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; - /** The configuration of administrator credentials for the control plane nodes. */ - administratorConfiguration?: NodePoolAdministratorConfigurationPatch; - /** The number of virtual machines that use this configuration. */ - count?: number; - /** The configuration of the agent pool. */ - upgradeSettings?: AgentPoolUpgradeSettings; -} - -/** NodePoolAdministratorConfigurationPatch represents the patching capabilities for the administrator configuration. */ -export interface NodePoolAdministratorConfigurationPatch { - /** SshPublicKey represents the public key used to authenticate with a resource through SSH. */ - sshPublicKeys?: SshPublicKey[]; -} - -/** KubernetesClusterFeatureList represents the list of Kubernetes cluster feature resources. */ -export interface KubernetesClusterFeatureList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of Kubernetes cluster features. */ - value?: KubernetesClusterFeature[]; -} - -/** StringKeyValuePair represents a single entry in a mapping of keys to values. */ -export interface StringKeyValuePair { - /** The key to the mapped value. */ - key: string; - /** The value of the mapping key. */ - value: string; -} - -/** KubernetesClusterFeaturePatchParameters represents the body of the request to patch the Kubernetes cluster feature. */ -export interface KubernetesClusterFeaturePatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; - /** The configured options for the feature. */ - options?: StringKeyValuePair[]; -} - -/** KubernetesClusterRestartNodeParameters represents the body of the request to restart the node of a Kubernetes cluster. */ -export interface KubernetesClusterRestartNodeParameters { - /** The name of the node to restart. */ - nodeName: string; -} - -/** L2NetworkPatchParameters represents the body of the request to patch the L2 network. */ -export interface L2NetworkPatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; -} - -/** L3NetworkPatchParameters represents the body of the request to patch the cloud services network. */ -export interface L3NetworkPatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; -} - -/** RackPatchParameters represents the body of the request to patch the rack properties. */ -export interface RackPatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; - /** The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, Isle 9, Rack 2B”) */ - rackLocation?: string; - /** The globally unique identifier for the rack. */ - rackSerialNumber?: string; -} - -/** StorageAppliancePatchParameters represents the body of the request to patch storage appliance properties. */ -export interface StorageAppliancePatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; - /** The serial number for the storage appliance. */ - serialNumber?: string; -} - -/** StorageApplianceEnableRemoteVendorManagementParameters represents the body of the request to enable remote vendor management of a storage appliance. */ -export interface StorageApplianceEnableRemoteVendorManagementParameters { - /** Field Deprecated. This field is not used and will be rejected if provided. The list of IPv4 subnets (in CIDR format), IPv6 subnets (in CIDR format), or hostnames that the storage appliance needs accessible in order to turn on the remote vendor management. */ - supportEndpoints?: string[]; -} - -/** StorageApplianceRunReadCommandsParameters represents the body of request containing list of read-only commands to run on the storage appliance. */ -export interface StorageApplianceRunReadCommandsParameters { - /** The list of read-only commands to be executed directly against the target storage appliance. */ - commands: StorageApplianceCommandSpecification[]; - /** The maximum time the commands are allowed to run. */ - limitTimeSeconds: number; -} - -/** StorageApplianceCommandSpecification represents the command and optional arguments to run. */ -export interface StorageApplianceCommandSpecification { - /** The list of strings that will be passed to the script in order as separate arguments. */ - arguments?: string[]; - /** The command to execute. */ - command: string; -} - -/** TrunkedNetworkPatchParameters represents the body of the request to patch the Trunked network. */ -export interface TrunkedNetworkPatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; -} - -/** VirtualMachinePatchParameters represents the body of the request to patch the virtual machine. */ -export interface VirtualMachinePatchParameters { - /** The identity for the resource. */ - identity?: ManagedServiceIdentity; - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; - /** The credentials used to login to the image repository that has access to the specified image. */ - vmImageRepositoryCredentials?: ImageRepositoryCredentials; -} - -/** VirtualMachineAssignRelayParameters represents the body of the request to update the relay used for a Microsoft.HybridCompute machine associated with the virtual machine. */ -export interface VirtualMachineAssignRelayParameters { - /** The resourceId of the Microsoft.HybridCompute machine resource to assign relay usage. */ - machineId: string; - /** The indicator of which relay type the machine should be assigned to use. Platform indicates the use of a platform-dedicated relay. Public indicates the use of the standard public relay for Arc services. */ - relayType?: RelayType; -} - -/** ConsoleList represents a list of virtual machine consoles. */ -export interface ConsoleList { - /** The link used to get the next page of operations. */ - nextLink?: string; - /** The list of virtual machine consoles. */ - value?: Console[]; -} - -/** ConsolePatchParameters represents the body of the request to patch the virtual machine console. */ -export interface ConsolePatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; - /** The indicator of whether the console access is enabled. */ - enabled?: ConsoleEnabled; - /** The date and time after which the key will be disallowed access. */ - expiration?: Date; - /** 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. */ - sshPublicKey?: SshPublicKey; -} - -/** VirtualMachinePowerOffParameters represents the body of the request to power off virtual machine. */ -export interface VirtualMachinePowerOffParameters { - /** The indicator of whether to skip the graceful OS shutdown and power off the virtual machine immediately. */ - skipShutdown?: SkipShutdown; -} - -/** VolumePatchParameters represents the body of the request to patch the volume resource. */ -export interface VolumePatchParameters { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; -} - -/** AgentPoolConfiguration specifies the configuration of a pool of nodes. */ -export interface AgentPoolConfiguration { - /** The administrator credentials to be used for the nodes in this agent pool. */ - administratorConfiguration?: AdministratorConfiguration; - /** The configurations that will be applied to each agent in this agent pool. */ - agentOptions?: AgentOptions; - /** The configuration of networks being attached to the agent pool for use by the workloads that run on this Kubernetes cluster. */ - attachedNetworkConfiguration?: AttachedNetworkConfiguration; - /** 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. */ - availabilityZones?: string[]; - /** The number of virtual machines that use this configuration. */ - count: number; - /** The labels applied to the nodes in this agent pool. */ - labels?: KubernetesLabel[]; - /** 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. */ - mode: AgentPoolMode; - /** The taints applied to the nodes in this agent pool. */ - taints?: KubernetesLabel[]; - /** The configuration of the agent pool. */ - upgradeSettings?: AgentPoolUpgradeSettings; - /** The name of the VM SKU that determines the size of resources allocated for node VMs. */ - vmSkuName: string; -} - -/** TagsParameter represents the resource tags. */ -export interface TagsParameter { - /** The Azure resource tags that will replace the existing ones. */ - tags?: { [propertyName: string]: string }; -} - -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface TrackedResource extends Resource { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; -} - -/** RackSku represents the SKU information of the rack. */ -export interface RackSku extends Resource { - /** - * The list of machine SKUs and associated rack slot for the compute-dedicated machines in this rack model. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly computeMachines?: MachineSkuSlot[]; - /** - * The list of machine SKUs and associated rack slot for the control-plane dedicated machines in this rack model. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly controllerMachines?: MachineSkuSlot[]; - /** - * The free-form text describing the rack. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * The maximum number of compute racks supported by an aggregator rack. 0 if this is a compute rack or a rack for a single rack cluster(rackType="Single"). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maxClusterSlots?: number; - /** - * The provisioning state of the rack SKU resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: RackSkuProvisioningState; - /** - * The type of the rack. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rackType?: RackSkuType; - /** - * The list of appliance SKUs and associated rack slot for the storage appliance(s) in this rack model. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly storageAppliances?: StorageApplianceSkuSlot[]; - /** - * The list of supported SKUs if the rack is an aggregator. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly supportedRackSkuIds?: string[]; -} - -/** BareMetalMachine represents the physical machine in the rack. */ -export interface BareMetalMachine extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster associated with the resource. */ - extendedLocation: ExtendedLocation; - /** - * The current state of any in progress or completed actions. The most recent known instance of each action type is shown. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionStates?: ActionState[]; - /** - * The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly associatedResourceIds?: string[]; - /** The connection string for the baseboard management controller including IP address and protocol. */ - bmcConnectionString: string; - /** The credentials of the baseboard management controller on this bare metal machine. */ - bmcCredentials: AdministrativeCredentials; - /** The MAC address of the BMC device. */ - bmcMacAddress: string; - /** The MAC address of a NIC connected to the PXE network. */ - bootMacAddress: string; - /** - * The CA certificate information issued by the platform for connecting to TLS interfaces for the bare metal machine. Callers add this certificate to the trusted CA store on the Kubernetes control plane nodes to allow secure communication with the bare metal machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly caCertificate?: CertificateInfo; - /** - * The resource ID of the cluster this bare metal machine is associated with. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterId?: string; - /** - * The cordon status of the bare metal machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly cordonStatus?: BareMetalMachineCordonStatus; - /** - * The more detailed status of the bare metal machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: BareMetalMachineDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** - * The hardware inventory, including information acquired from the model/sku information and from the ironic inspector. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hardwareInventory?: HardwareInventory; - /** - * The details of the latest hardware validation performed for this bare metal machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hardwareValidationStatus?: HardwareValidationStatus; - /** - * 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. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hybridAksClustersAssociatedIds?: string[]; - /** - * The name of this machine represented by the host object in the Cluster's Kubernetes control plane. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kubernetesNodeName?: string; - /** - * The version of Kubernetes running on this machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kubernetesVersion?: string; - /** The cluster version that has been applied to this machine during deployment or a version update. */ - machineClusterVersion?: string; - /** The custom details provided by the customer. */ - machineDetails: string; - /** The OS-level hostname assigned to this machine. */ - machineName: string; - /** - * The list of roles that are assigned to the cluster node running on this machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly machineRoles?: string[]; - /** The unique internal identifier of the bare metal machine SKU. */ - machineSkuId: string; - /** - * The IPv4 address that is assigned to the bare metal machine during the cluster deployment. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly oamIpv4Address?: string; - /** - * The IPv6 address that is assigned to the bare metal machine during the cluster deployment. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly oamIpv6Address?: string; - /** - * The image that is currently provisioned to the OS disk. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly osImage?: string; - /** - * The power state derived from the baseboard management controller. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly powerState?: BareMetalMachinePowerState; - /** - * The provisioning state of the bare metal machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: BareMetalMachineProvisioningState; - /** The resource ID of the rack where this bare metal machine resides. */ - rackId: string; - /** The rack slot in which this bare metal machine is located, ordered from the bottom up i.e. the lowest slot is 1. */ - rackSlot: number; - /** - * The indicator of whether the bare metal machine is ready to receive workloads. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly readyState?: BareMetalMachineReadyState; - /** - * The runtime protection status of the bare metal machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly runtimeProtectionStatus?: RuntimeProtectionStatus; - /** - * The list of statuses that represent secret rotation activity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly secretRotationStatus?: SecretRotationStatus[]; - /** The serial number of the bare metal machine. */ - serialNumber: string; - /** - * The discovered value of the machine's service tag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly serviceTag?: string; - /** - * 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. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly virtualMachinesAssociatedIds?: string[]; -} - -/** Upon creation, the additional services that are provided by the platform will be allocated and represented in the status of this resource. All resources associated with this cloud services network will be part of the same layer 2 (L2) isolation domain. At least one service network must be created but may be reused across many virtual machines and/or Hybrid AKS clusters. */ -export interface CloudServicesNetwork extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster associated with the resource. */ - extendedLocation: ExtendedLocation; - /** The list of egress endpoints. This allows for connection from a Hybrid AKS cluster to the specified endpoint. */ - additionalEgressEndpoints?: EgressEndpoint[]; - /** - * The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly associatedResourceIds?: string[]; - /** - * The resource ID of the Network Cloud cluster this cloud services network is associated with. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterId?: string; - /** - * The more detailed status of the cloud services network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: CloudServicesNetworkDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** The indicator of whether the platform default endpoints are allowed for the egress traffic. */ - enableDefaultEgressEndpoints?: CloudServicesNetworkEnableDefaultEgressEndpoints; - /** - * The full list of additional and default egress endpoints that are currently enabled. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly enabledEgressEndpoints?: EgressEndpoint[]; - /** - * Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are associated with this cloud services network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hybridAksClustersAssociatedIds?: string[]; - /** - * The name of the interface that will be present in the virtual machine to represent this network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly interfaceName?: string; - /** - * The provisioning state of the cloud services network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: CloudServicesNetworkProvisioningState; - /** The storage options for the cloud services network. */ - storageOptions?: CloudServicesNetworkStorageOptions; - /** - * The storage status for the cloud services network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly storageStatus?: CloudServicesNetworkStorageStatus; - /** - * Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this cloud services network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly virtualMachinesAssociatedIds?: string[]; -} - -/** ClusterManager represents a control-plane to manage one or more on-premises clusters. */ -export interface ClusterManager extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The identity of the cluster manager. */ - identity?: ManagedServiceIdentity; - /** The resource ID of the Log Analytics workspace that is used for the logs collection. */ - analyticsWorkspaceId?: string; - /** The Azure availability zones within the region that will be used to support the cluster manager resource. */ - availabilityZones?: string[]; - /** - * The list of the cluster versions the manager supports. It is used as input in clusterVersion property of a cluster resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterVersions?: ClusterAvailableVersion[]; - /** - * The detailed status that provides additional information about the cluster manager. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: ClusterManagerDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** The resource ID of the fabric controller that has one to one mapping with the cluster manager. */ - fabricControllerId: string; - /** The configuration of the managed resource group associated with the resource. */ - managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; - /** - * 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. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managerExtendedLocation?: ExtendedLocation; - /** - * The provisioning state of the cluster manager. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ClusterManagerProvisioningState; - /** The size of the Azure virtual machines to use for hosting the cluster manager resource. */ - vmSize?: string; -} - -/** Cluster represents the on-premises Network Cloud cluster. */ -export interface Cluster extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster manager associated with the cluster. */ - extendedLocation: ExtendedLocation; - /** The identity for the resource. */ - identity?: ManagedServiceIdentity; - /** - * The current state of any in progress or completed actions. The most recent known instance of each action type is shown. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionStates?: ActionState[]; - /** 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. */ - aggregatorOrSingleRackDefinition: RackDefinition; - /** The settings for the log analytics workspace used for output of logs from this cluster. */ - analyticsOutputSettings?: AnalyticsOutputSettings; - /** Field Deprecated. The resource ID of the Log Analytics Workspace that will be used for storing relevant logs. */ - analyticsWorkspaceId?: string; - /** - * The list of cluster runtime version upgrades available for this cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly availableUpgradeVersions?: ClusterAvailableUpgradeVersion[]; - /** - * The capacity supported by this cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterCapacity?: ClusterCapacity; - /** - * The latest heartbeat status between the cluster manager and the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterConnectionStatus?: ClusterConnectionStatus; - /** - * 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. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterExtendedLocation?: ExtendedLocation; - /** The customer-provided location information to identify where the cluster resides. */ - clusterLocation?: string; - /** - * The latest connectivity status between cluster manager and the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterManagerConnectionStatus?: ClusterManagerConnectionStatus; - /** - * The resource ID of the cluster manager that manages this cluster. This is set by the Cluster Manager when the cluster is created. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterManagerId?: string; - /** Field Deprecated: Use managed identity to provide cluster privileges. The service principal to be used by the cluster during Arc Appliance installation. */ - clusterServicePrincipal?: ServicePrincipalInformation; - /** The type of rack configuration for the cluster. */ - clusterType: ClusterType; - /** The current runtime version of the cluster. */ - clusterVersion: string; - /** The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. */ - commandOutputSettings?: CommandOutputSettings; - /** The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. */ - computeDeploymentThreshold?: ValidationThreshold; - /** The list of rack definitions for the compute racks in a multi-rack cluster, or an empty list in a single-rack cluster. */ - computeRackDefinitions?: RackDefinition[]; - /** - * The current detailed status of the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: ClusterDetailedStatus; - /** - * The descriptive message about the detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** - * 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). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hybridAksExtendedLocation?: ExtendedLocation; - /** The configuration of the managed resource group associated with the resource. */ - managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; - /** - * The count of Manual Action Taken (MAT) events that have not been validated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly manualActionCount?: number; - /** The resource ID of the Network Fabric associated with the cluster. */ - networkFabricId: string; - /** - * The provisioning state of the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ClusterProvisioningState; - /** The settings for cluster runtime protection. */ - runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; - /** The configuration for use of a key vault to store secrets for later retrieval by the operator. */ - secretArchive?: ClusterSecretArchive; - /** The settings for the secret archive used to hold credentials for the cluster. */ - secretArchiveSettings?: SecretArchiveSettings; - /** - * The support end date of the runtime version of the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly supportExpiryDate?: string; - /** The strategy for updating the cluster. */ - updateStrategy?: ClusterUpdateStrategy; - /** The settings for how security vulnerability scanning is applied to the cluster. */ - vulnerabilityScanningSettings?: VulnerabilityScanningSettings; - /** - * The list of workload resource IDs that are hosted within this cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly workloadResourceIds?: string[]; -} - -/** KubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. */ -export interface KubernetesCluster extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster associated with the resource. */ - extendedLocation: ExtendedLocation; - /** The Azure Active Directory Integration properties. */ - aadConfiguration?: AadConfiguration; - /** The administrative credentials that will be applied to the control plane and agent pool nodes that do not specify their own values. */ - administratorConfiguration?: AdministratorConfiguration; - /** - * The full list of network resource IDs that are attached to this cluster, including those attached only to specific agent pools. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly attachedNetworkIds?: string[]; - /** - * The list of versions that this Kubernetes cluster can be upgraded to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly availableUpgrades?: AvailableUpgrade[]; - /** - * The resource ID of the Network Cloud cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterId?: string; - /** - * The resource ID of the connected cluster set up when this Kubernetes cluster is created. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectedClusterId?: string; - /** - * The current running version of Kubernetes on the control plane. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly controlPlaneKubernetesVersion?: string; - /** The defining characteristics of the control plane for this Kubernetes Cluster. */ - controlPlaneNodeConfiguration: ControlPlaneNodeConfiguration; - /** - * The current status of the Kubernetes cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: KubernetesClusterDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** - * The current feature settings. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly featureStatuses?: FeatureStatus[]; - /** 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. */ - initialAgentPoolConfigurations: InitialAgentPoolConfiguration[]; - /** The Kubernetes version for this cluster. */ - kubernetesVersion: string; - /** The configuration of the managed resource group associated with the resource. */ - managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; - /** The configuration of the Kubernetes cluster networking, including the attachment of networks that span the cluster. */ - networkConfiguration: NetworkConfiguration; - /** - * The details of the nodes in this cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nodes?: KubernetesClusterNode[]; - /** - * The provisioning state of the Kubernetes cluster resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: KubernetesClusterProvisioningState; -} - -/** L2Network represents a network that utilizes a single isolation domain set up for layer-2 resources. */ -export interface L2Network extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster associated with the resource. */ - extendedLocation: ExtendedLocation; - /** - * The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly associatedResourceIds?: string[]; - /** - * The resource ID of the Network Cloud cluster this L2 network is associated with. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterId?: string; - /** - * The more detailed status of the L2 network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: L2NetworkDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** - * Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource ID(s) that are associated with this L2 network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hybridAksClustersAssociatedIds?: string[]; - /** Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS. */ - hybridAksPluginType?: HybridAksPluginType; - /** The default interface name for this L2 network in the virtual machine. This name can be overridden by the name supplied in the network attachment configuration of that virtual machine. */ - interfaceName?: string; - /** The resource ID of the Network Fabric l2IsolationDomain. */ - l2IsolationDomainId: string; - /** - * The provisioning state of the L2 network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: L2NetworkProvisioningState; - /** - * Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource ID(s), excluding any Hybrid AKS virtual machines, that are currently using this L2 network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly virtualMachinesAssociatedIds?: string[]; -} - -/** L3Network represents a network that utilizes a single isolation domain set up for layer-3 resources. */ -export interface L3Network extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster associated with the resource. */ - extendedLocation: ExtendedLocation; - /** - * The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly associatedResourceIds?: string[]; - /** - * The resource ID of the Network Cloud cluster this L3 network is associated with. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterId?: string; - /** - * The more detailed status of the L3 network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: L3NetworkDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** - * Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are associated with this L3 network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hybridAksClustersAssociatedIds?: string[]; - /** Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The indicator of whether or not to disable IPAM allocation on the network attachment definition injected into the Hybrid AKS Cluster. */ - hybridAksIpamEnabled?: HybridAksIpamEnabled; - /** Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS. */ - hybridAksPluginType?: HybridAksPluginType; - /** The default interface name for this L3 network in the virtual machine. This name can be overridden by the name supplied in the network attachment configuration of that virtual machine. */ - interfaceName?: string; - /** The type of the IP address allocation, defaulted to "DualStack". */ - ipAllocationType?: IpAllocationType; - /** The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV4 or DualStack. */ - ipv4ConnectedPrefix?: string; - /** The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV6 or DualStack. */ - ipv6ConnectedPrefix?: string; - /** The resource ID of the Network Fabric l3IsolationDomain. */ - l3IsolationDomainId: string; - /** - * The provisioning state of the L3 network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: L3NetworkProvisioningState; - /** - * Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this L3 network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly virtualMachinesAssociatedIds?: string[]; - /** The VLAN from the l3IsolationDomain that is used for this network. */ - vlan: number; -} - -/** Rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. */ -export interface Rack extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster associated with the resource. */ - extendedLocation: ExtendedLocation; - /** The value that will be used for machines in this rack to represent the availability zones that can be referenced by Hybrid AKS Clusters for node arrangement. */ - availabilityZone: string; - /** - * The resource ID of the cluster the rack is created for. This value is set when the rack is created by the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterId?: string; - /** - * The more detailed status of the rack. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: RackDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** - * The provisioning state of the rack resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: RackProvisioningState; - /** The free-form description of the rack location. (e.g. “DTN Datacenter, Floor 3, Isle 9, Rack 2B”) */ - rackLocation: string; - /** The unique identifier for the rack within Network Cloud cluster. An alternate unique alphanumeric value other than a serial number may be provided if desired. */ - rackSerialNumber: string; - /** The SKU for the rack. */ - rackSkuId: string; -} - -/** StorageAppliance represents on-premises Network Cloud storage appliance. */ -export interface StorageAppliance extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster associated with the resource. */ - extendedLocation: ExtendedLocation; - /** The credentials of the administrative interface on this storage appliance. */ - administratorCredentials: AdministrativeCredentials; - /** - * The CA certificate information issued by the platform for connecting to TLS interfaces for the storage appliance. Callers add this certificate to their trusted CA store to allow secure communication with the storage appliance. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly caCertificate?: CertificateInfo; - /** - * The total capacity of the storage appliance. Measured in GiB. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capacity?: number; - /** - * The amount of storage consumed. Measured in GiB. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capacityUsed?: number; - /** - * The resource ID of the cluster this storage appliance is associated with. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterId?: string; - /** - * The detailed status of the storage appliance. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: StorageApplianceDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** - * The endpoint for the management interface of the storage appliance. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managementIpv4Address?: string; - /** - * The manufacturer of the storage appliance. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly manufacturer?: string; - /** - * The model of the storage appliance. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly model?: string; - /** - * The provisioning state of the storage appliance. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: StorageApplianceProvisioningState; - /** The resource ID of the rack where this storage appliance resides. */ - rackId: string; - /** The slot the storage appliance is in the rack based on the BOM configuration. */ - rackSlot: number; - /** - * The indicator of whether the storage appliance supports remote vendor management. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly remoteVendorManagementFeature?: RemoteVendorManagementFeature; - /** - * The indicator of whether the remote vendor management feature is enabled or disabled, or unsupported if it is an unsupported feature. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly remoteVendorManagementStatus?: RemoteVendorManagementStatus; - /** - * The list of statuses that represent secret rotation activity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly secretRotationStatus?: SecretRotationStatus[]; - /** The serial number for the storage appliance. */ - serialNumber: string; - /** The SKU for the storage appliance. */ - storageApplianceSkuId: string; - /** - * The version of the storage appliance. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly version?: string; -} - -/** TrunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to create a trunked network. */ -export interface TrunkedNetwork extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster associated with the resource. */ - extendedLocation: ExtendedLocation; - /** - * The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly associatedResourceIds?: string[]; - /** - * The resource ID of the Network Cloud cluster this trunked network is associated with. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterId?: string; - /** - * The more detailed status of the trunked network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: TrunkedNetworkDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** - * Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are associated with this trunked network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hybridAksClustersAssociatedIds?: string[]; - /** Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS. */ - hybridAksPluginType?: HybridAksPluginType; - /** The default interface name for this trunked network in the virtual machine. This name can be overridden by the name supplied in the network attachment configuration of that virtual machine. */ - interfaceName?: string; - /** The list of resource IDs representing the Network Fabric isolation domains. It can be any combination of l2IsolationDomain and l3IsolationDomain resources. */ - isolationDomainIds: string[]; - /** - * The provisioning state of the trunked network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: TrunkedNetworkProvisioningState; - /** - * Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this trunked network. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly virtualMachinesAssociatedIds?: string[]; - /** The list of vlans that are selected from the isolation domains for trunking. */ - vlans: number[]; -} - -/** VirtualMachine represents the on-premises Network Cloud virtual machine. */ -export interface VirtualMachine extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster associated with the resource. */ - extendedLocation: ExtendedLocation; - /** The identity for the resource. */ - identity?: ManagedServiceIdentity; - /** The name of the administrator to which the ssh public keys will be added into the authorized keys. */ - adminUsername: string; - /** - * The cluster availability zone containing this virtual machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly availabilityZone?: string; - /** - * The resource ID of the bare metal machine that hosts the virtual machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly bareMetalMachineId?: string; - /** Selects the boot method for the virtual machine. */ - bootMethod?: VirtualMachineBootMethod; - /** The cloud service network that provides platform-level services for the virtual machine. */ - cloudServicesNetworkAttachment: NetworkAttachment; - /** - * The resource ID of the cluster the virtual machine is created for. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterId?: string; - /** The extended location to use for creation of a VM console resource. */ - consoleExtendedLocation?: ExtendedLocation; - /** The number of CPU cores in the virtual machine. */ - cpuCores: number; - /** - * The more detailed status of the virtual machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: VirtualMachineDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** 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. */ - isolateEmulatorThread?: VirtualMachineIsolateEmulatorThread; - /** The memory size of the virtual machine. Allocations are measured in gibibytes. */ - memorySizeGB: number; - /** The list of network attachments to the virtual machine. */ - networkAttachments?: NetworkAttachment[]; - /** Field Deprecated: The Base64 encoded cloud-init network data. The networkDataContent property will be used in preference to this property. */ - networkData?: string; - /** The Base64 encoded cloud-init network data. */ - networkDataContent?: string; - /** The scheduling hints for the virtual machine. */ - placementHints?: VirtualMachinePlacementHint[]; - /** - * The power state of the virtual machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly powerState?: VirtualMachinePowerState; - /** - * The provisioning state of the virtual machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: VirtualMachineProvisioningState; - /** The list of ssh public keys. Each key will be added to the virtual machine using the cloud-init ssh_authorized_keys mechanism for the adminUsername. */ - sshPublicKeys?: SshPublicKey[]; - /** The storage profile that specifies size and other parameters about the disks related to the virtual machine. */ - storageProfile: StorageProfile; - /** Field Deprecated: The Base64 encoded cloud-init user data. The userDataContent property will be used in preference to this property. */ - userData?: string; - /** The Base64 encoded cloud-init user data. */ - userDataContent?: string; - /** Field Deprecated, use virtualizationModel instead. The type of the virtio interface. */ - virtioInterface?: VirtualMachineVirtioInterfaceType; - /** The type of the device model to use. */ - vmDeviceModel?: VirtualMachineDeviceModelType; - /** The virtual machine image that is currently provisioned to the OS disk, using the full url and tag notation used to pull the image. */ - vmImage: string; - /** The credentials used to login to the image repository that has access to the specified image. */ - vmImageRepositoryCredentials?: ImageRepositoryCredentials; - /** - * The resource IDs of volumes that are attached to the virtual machine. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly volumes?: string[]; -} - -/** Volume represents storage made available for use by resources running on the cluster. */ -export interface Volume extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster associated with the resource. */ - extendedLocation: ExtendedLocation; - /** - * The allocated size of the volume in Mebibytes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly allocatedSizeMiB?: number; - /** - * The list of resource IDs that attach the volume. It may include virtual machines and Hybrid AKS clusters. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly attachedTo?: string[]; - /** - * The more detailed status of the volume. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: VolumeDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** - * The provisioning state of the volume. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: VolumeProvisioningState; - /** - * The unique identifier of the volume. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly serialNumber?: string; - /** The requested storage allocation for the volume in Mebibytes. */ - sizeMiB: number; - /** The resource ID of the storage appliance that hosts the volume. */ - storageApplianceId?: string; -} - -/** BareMetalMachineKeySet represents the bare metal machine key set. */ -export interface BareMetalMachineKeySet extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster associated with the resource. */ - extendedLocation: ExtendedLocation; - /** The object ID of Azure Active Directory group that all users in the list must be in for access to be granted. Users that are not in the group will not have access. */ - azureGroupId: string; - /** - * The more detailed status of the key set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: BareMetalMachineKeySetDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** The date and time after which the users in this key set will be removed from the bare metal machines. */ - expiration: Date; - /** The list of IP addresses of jump hosts with management network access from which a login will be allowed for the users. */ - jumpHostsAllowed: string[]; - /** - * The last time this key set was validated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastValidation?: Date; - /** The name of the group that users will be assigned to on the operating system of the machines. */ - osGroupName?: string; - /** The access level allowed for the users in this key set. */ - privilegeLevel: BareMetalMachineKeySetPrivilegeLevel; - /** The name of the access level to apply when the privilege level is set to Other. */ - privilegeLevelName?: string; - /** - * The provisioning state of the bare metal machine key set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: BareMetalMachineKeySetProvisioningState; - /** The unique list of permitted users. */ - userList: KeySetUser[]; - /** - * The status evaluation of each user. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly userListStatus?: KeySetUserStatus[]; -} - -/** BmcKeySet represents the baseboard management controller key set. */ -export interface BmcKeySet extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster associated with the resource. */ - extendedLocation: ExtendedLocation; - /** The object ID of Azure Active Directory group that all users in the list must be in for access to be granted. Users that are not in the group will not have access. */ - azureGroupId: string; - /** - * The more detailed status of the key set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: BmcKeySetDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** The date and time after which the users in this key set will be removed from the baseboard management controllers. */ - expiration: Date; - /** - * The last time this key set was validated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastValidation?: Date; - /** The access level allowed for the users in this key set. */ - privilegeLevel: BmcKeySetPrivilegeLevel; - /** - * The provisioning state of the baseboard management controller key set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: BmcKeySetProvisioningState; - /** The unique list of permitted users. */ - userList: KeySetUser[]; - /** - * The status evaluation of each user. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly userListStatus?: KeySetUserStatus[]; -} - -/** ClusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster. */ -export interface ClusterMetricsConfiguration extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster associated with the resource. */ - extendedLocation: ExtendedLocation; - /** The interval in minutes by which metrics will be collected. */ - collectionInterval: number; - /** - * The more detailed status of the metrics configuration. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: ClusterMetricsConfigurationDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** - * The list of metrics that are available for the cluster but disabled at the moment. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly disabledMetrics?: string[]; - /** The list of metric names that have been chosen to be enabled in addition to the core set of enabled metrics. */ - enabledMetrics?: string[]; - /** - * The provisioning state of the metrics configuration. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ClusterMetricsConfigurationProvisioningState; -} - -/** AgentPool represents the agent pool of Kubernetes cluster. */ -export interface AgentPool extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster associated with the resource. */ - extendedLocation?: ExtendedLocation; - /** The administrator credentials to be used for the nodes in this agent pool. */ - administratorConfiguration?: AdministratorConfiguration; - /** The configurations that will be applied to each agent in this agent pool. */ - agentOptions?: AgentOptions; - /** The configuration of networks being attached to the agent pool for use by the workloads that run on this Kubernetes cluster. */ - attachedNetworkConfiguration?: AttachedNetworkConfiguration; - /** 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. */ - availabilityZones?: string[]; - /** The number of virtual machines that use this configuration. */ - count: number; - /** - * The current status of the agent pool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: AgentPoolDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** - * The Kubernetes version running in this agent pool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kubernetesVersion?: string; - /** The labels applied to the nodes in this agent pool. */ - labels?: KubernetesLabel[]; - /** 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. */ - mode: AgentPoolMode; - /** - * The provisioning state of the agent pool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: AgentPoolProvisioningState; - /** The taints applied to the nodes in this agent pool. */ - taints?: KubernetesLabel[]; - /** The configuration of the agent pool. */ - upgradeSettings?: AgentPoolUpgradeSettings; - /** The name of the VM SKU that determines the size of resources allocated for node VMs. */ - vmSkuName: string; -} - -/** KubernetesClusterFeature represents the feature of a Kubernetes cluster. */ -export interface KubernetesClusterFeature extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The lifecycle indicator of the feature. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly availabilityLifecycle?: KubernetesClusterFeatureAvailabilityLifecycle; - /** - * The detailed status of the feature. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: KubernetesClusterFeatureDetailedStatus; - /** - * The descriptive message for the detailed status of the feature. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** The configured options for the feature. */ - options?: StringKeyValuePair[]; - /** - * The provisioning state of the Kubernetes cluster feature. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: KubernetesClusterFeatureProvisioningState; - /** - * 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. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly required?: KubernetesClusterFeatureRequired; - /** - * The version of the feature. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly version?: string; -} - -/** Console represents the console of an on-premises Network Cloud virtual machine. */ -export interface Console extends TrackedResource { - /** - * Resource ETag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The extended location of the cluster manager associated with the cluster this virtual machine is created on. */ - extendedLocation: ExtendedLocation; - /** - * The more detailed status of the console. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatus?: ConsoleDetailedStatus; - /** - * The descriptive message about the current detailed status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly detailedStatusMessage?: string; - /** The indicator of whether the console access is enabled. */ - enabled: ConsoleEnabled; - /** The date and time after which the key will be disallowed access. */ - expiration?: Date; - /** - * The resource ID of the private link service that is used to provide virtual machine console access. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateLinkServiceId?: string; - /** - * The provisioning state of the virtual machine console. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ConsoleProvisioningState; - /** 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. */ - sshPublicKey: SshPublicKey; - /** - * The unique identifier for the virtual machine that is used to access the console. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly virtualMachineAccessId?: string; -} - -/** Defines headers for BareMetalMachines_createOrUpdate operation. */ -export interface BareMetalMachinesCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for BareMetalMachines_delete operation. */ -export interface BareMetalMachinesDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BareMetalMachines_update operation. */ -export interface BareMetalMachinesUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BareMetalMachines_cordon operation. */ -export interface BareMetalMachinesCordonHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BareMetalMachines_powerOff operation. */ -export interface BareMetalMachinesPowerOffHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BareMetalMachines_reimage operation. */ -export interface BareMetalMachinesReimageHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BareMetalMachines_replace operation. */ -export interface BareMetalMachinesReplaceHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BareMetalMachines_restart operation. */ -export interface BareMetalMachinesRestartHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BareMetalMachines_runCommand operation. */ -export interface BareMetalMachinesRunCommandHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BareMetalMachines_runDataExtracts operation. */ -export interface BareMetalMachinesRunDataExtractsHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BareMetalMachines_runDataExtractsRestricted operation. */ -export interface BareMetalMachinesRunDataExtractsRestrictedHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BareMetalMachines_runReadCommands operation. */ -export interface BareMetalMachinesRunReadCommandsHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BareMetalMachines_start operation. */ -export interface BareMetalMachinesStartHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BareMetalMachines_uncordon operation. */ -export interface BareMetalMachinesUncordonHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for CloudServicesNetworks_createOrUpdate operation. */ -export interface CloudServicesNetworksCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for CloudServicesNetworks_delete operation. */ -export interface CloudServicesNetworksDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for CloudServicesNetworks_update operation. */ -export interface CloudServicesNetworksUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for ClusterManagers_createOrUpdate operation. */ -export interface ClusterManagersCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for ClusterManagers_delete operation. */ -export interface ClusterManagersDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for Clusters_createOrUpdate operation. */ -export interface ClustersCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for Clusters_delete operation. */ -export interface ClustersDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for Clusters_update operation. */ -export interface ClustersUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for Clusters_continueUpdateVersion operation. */ -export interface ClustersContinueUpdateVersionHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for Clusters_deploy operation. */ -export interface ClustersDeployHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for Clusters_scanRuntime operation. */ -export interface ClustersScanRuntimeHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for Clusters_updateVersion operation. */ -export interface ClustersUpdateVersionHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for KubernetesClusters_createOrUpdate operation. */ -export interface KubernetesClustersCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for KubernetesClusters_delete operation. */ -export interface KubernetesClustersDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for KubernetesClusters_update operation. */ -export interface KubernetesClustersUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for KubernetesClusters_restartNode operation. */ -export interface KubernetesClustersRestartNodeHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for L2Networks_createOrUpdate operation. */ -export interface L2NetworksCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for L2Networks_delete operation. */ -export interface L2NetworksDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for L3Networks_createOrUpdate operation. */ -export interface L3NetworksCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for L3Networks_delete operation. */ -export interface L3NetworksDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for Racks_createOrUpdate operation. */ -export interface RacksCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for Racks_delete operation. */ -export interface RacksDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for Racks_update operation. */ -export interface RacksUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for StorageAppliances_createOrUpdate operation. */ -export interface StorageAppliancesCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for StorageAppliances_delete operation. */ -export interface StorageAppliancesDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for StorageAppliances_update operation. */ -export interface StorageAppliancesUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for StorageAppliances_disableRemoteVendorManagement operation. */ -export interface StorageAppliancesDisableRemoteVendorManagementHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for StorageAppliances_enableRemoteVendorManagement operation. */ -export interface StorageAppliancesEnableRemoteVendorManagementHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for StorageAppliances_runReadCommands operation. */ -export interface StorageAppliancesRunReadCommandsHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for TrunkedNetworks_createOrUpdate operation. */ -export interface TrunkedNetworksCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for TrunkedNetworks_delete operation. */ -export interface TrunkedNetworksDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for VirtualMachines_createOrUpdate operation. */ -export interface VirtualMachinesCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for VirtualMachines_delete operation. */ -export interface VirtualMachinesDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for VirtualMachines_update operation. */ -export interface VirtualMachinesUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for VirtualMachines_assignRelay operation. */ -export interface VirtualMachinesAssignRelayHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for VirtualMachines_powerOff operation. */ -export interface VirtualMachinesPowerOffHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for VirtualMachines_reimage operation. */ -export interface VirtualMachinesReimageHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for VirtualMachines_restart operation. */ -export interface VirtualMachinesRestartHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for VirtualMachines_start operation. */ -export interface VirtualMachinesStartHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for Volumes_createOrUpdate operation. */ -export interface VolumesCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for Volumes_delete operation. */ -export interface VolumesDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BareMetalMachineKeySets_createOrUpdate operation. */ -export interface BareMetalMachineKeySetsCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for BareMetalMachineKeySets_delete operation. */ -export interface BareMetalMachineKeySetsDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BareMetalMachineKeySets_update operation. */ -export interface BareMetalMachineKeySetsUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BmcKeySets_createOrUpdate operation. */ -export interface BmcKeySetsCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for BmcKeySets_delete operation. */ -export interface BmcKeySetsDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for BmcKeySets_update operation. */ -export interface BmcKeySetsUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for MetricsConfigurations_createOrUpdate operation. */ -export interface MetricsConfigurationsCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for MetricsConfigurations_delete operation. */ -export interface MetricsConfigurationsDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for MetricsConfigurations_update operation. */ -export interface MetricsConfigurationsUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for AgentPools_createOrUpdate operation. */ -export interface AgentPoolsCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for AgentPools_delete operation. */ -export interface AgentPoolsDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for AgentPools_update operation. */ -export interface AgentPoolsUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for KubernetesClusterFeatures_createOrUpdate operation. */ -export interface KubernetesClusterFeaturesCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for KubernetesClusterFeatures_delete operation. */ -export interface KubernetesClusterFeaturesDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for KubernetesClusterFeatures_update operation. */ -export interface KubernetesClusterFeaturesUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for Consoles_createOrUpdate operation. */ -export interface ConsolesCreateOrUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; -} - -/** Defines headers for Consoles_delete operation. */ -export interface ConsolesDeleteHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Defines headers for Consoles_update operation. */ -export interface ConsolesUpdateHeaders { - /** The URL to retrieve the status of the asynchronous operation. */ - azureAsyncOperation?: string; - /** The URL to retrieve the status of the asynchronous operation. */ - location?: string; -} - -/** Known values of {@link Origin} that the service accepts. */ -export enum KnownOrigin { - /** User */ - User = "user", - /** System */ - System = "system", - /** UserSystem */ - UserSystem = "user,system", -} - -/** - * Defines values for Origin. \ - * {@link KnownOrigin} can be used interchangeably with Origin, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **user** \ - * **system** \ - * **user,system** - */ -export type Origin = string; - -/** Known values of {@link ActionType} that the service accepts. */ -export enum KnownActionType { - /** Internal */ - Internal = "Internal", -} - -/** - * Defines values for ActionType. \ - * {@link KnownActionType} can be used interchangeably with ActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Internal** - */ -export type ActionType = string; - -/** Known values of {@link ActionStateStatus} that the service accepts. */ -export enum KnownActionStateStatus { - /** Completed */ - Completed = "Completed", - /** InProgress */ - InProgress = "InProgress", - /** Failed */ - Failed = "Failed", -} - -/** - * Defines values for ActionStateStatus. \ - * {@link KnownActionStateStatus} can be used interchangeably with ActionStateStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Completed** \ - * **InProgress** \ - * **Failed** - */ -export type ActionStateStatus = string; - -/** Known values of {@link StepStateStatus} that the service accepts. */ -export enum KnownStepStateStatus { - /** Completed */ - Completed = "Completed", - /** InProgress */ - InProgress = "InProgress", - /** Failed */ - Failed = "Failed", - /** NotStarted */ - NotStarted = "NotStarted", -} - -/** - * Defines values for StepStateStatus. \ - * {@link KnownStepStateStatus} can be used interchangeably with StepStateStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Completed** \ - * **InProgress** \ - * **Failed** \ - * **NotStarted** - */ -export type StepStateStatus = string; - -/** Known values of {@link BareMetalMachineCordonStatus} that the service accepts. */ -export enum KnownBareMetalMachineCordonStatus { - /** Cordoned */ - Cordoned = "Cordoned", - /** Uncordoned */ - Uncordoned = "Uncordoned", -} - -/** - * Defines values for BareMetalMachineCordonStatus. \ - * {@link KnownBareMetalMachineCordonStatus} can be used interchangeably with BareMetalMachineCordonStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Cordoned** \ - * **Uncordoned** - */ -export type BareMetalMachineCordonStatus = string; - -/** Known values of {@link BareMetalMachineDetailedStatus} that the service accepts. */ -export enum KnownBareMetalMachineDetailedStatus { - /** Preparing */ - Preparing = "Preparing", - /** Error */ - Error = "Error", - /** Available */ - Available = "Available", - /** Provisioning */ - Provisioning = "Provisioning", - /** Provisioned */ - Provisioned = "Provisioned", - /** Deprovisioning */ - Deprovisioning = "Deprovisioning", -} - -/** - * Defines values for BareMetalMachineDetailedStatus. \ - * {@link KnownBareMetalMachineDetailedStatus} can be used interchangeably with BareMetalMachineDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Preparing** \ - * **Error** \ - * **Available** \ - * **Provisioning** \ - * **Provisioned** \ - * **Deprovisioning** - */ -export type BareMetalMachineDetailedStatus = string; - -/** Known values of {@link BareMetalMachineHardwareValidationResult} that the service accepts. */ -export enum KnownBareMetalMachineHardwareValidationResult { - /** Pass */ - Pass = "Pass", - /** Fail */ - Fail = "Fail", -} - -/** - * Defines values for BareMetalMachineHardwareValidationResult. \ - * {@link KnownBareMetalMachineHardwareValidationResult} can be used interchangeably with BareMetalMachineHardwareValidationResult, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Pass** \ - * **Fail** - */ -export type BareMetalMachineHardwareValidationResult = string; - -/** Known values of {@link BareMetalMachinePowerState} that the service accepts. */ -export enum KnownBareMetalMachinePowerState { - /** On */ - On = "On", - /** Off */ - Off = "Off", -} - -/** - * Defines values for BareMetalMachinePowerState. \ - * {@link KnownBareMetalMachinePowerState} can be used interchangeably with BareMetalMachinePowerState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **On** \ - * **Off** - */ -export type BareMetalMachinePowerState = string; - -/** Known values of {@link BareMetalMachineProvisioningState} that the service accepts. */ -export enum KnownBareMetalMachineProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Provisioning */ - Provisioning = "Provisioning", - /** Accepted */ - Accepted = "Accepted", -} - -/** - * Defines values for BareMetalMachineProvisioningState. \ - * {@link KnownBareMetalMachineProvisioningState} can be used interchangeably with BareMetalMachineProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Provisioning** \ - * **Accepted** - */ -export type BareMetalMachineProvisioningState = string; - -/** Known values of {@link BareMetalMachineReadyState} that the service accepts. */ -export enum KnownBareMetalMachineReadyState { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for BareMetalMachineReadyState. \ - * {@link KnownBareMetalMachineReadyState} can be used interchangeably with BareMetalMachineReadyState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type BareMetalMachineReadyState = string; - -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key", -} - -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; - -/** Known values of {@link CloudServicesNetworkDetailedStatus} that the service accepts. */ -export enum KnownCloudServicesNetworkDetailedStatus { - /** Error */ - Error = "Error", - /** Available */ - Available = "Available", - /** Provisioning */ - Provisioning = "Provisioning", -} - -/** - * Defines values for CloudServicesNetworkDetailedStatus. \ - * {@link KnownCloudServicesNetworkDetailedStatus} can be used interchangeably with CloudServicesNetworkDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Error** \ - * **Available** \ - * **Provisioning** - */ -export type CloudServicesNetworkDetailedStatus = string; - -/** Known values of {@link CloudServicesNetworkEnableDefaultEgressEndpoints} that the service accepts. */ -export enum KnownCloudServicesNetworkEnableDefaultEgressEndpoints { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for CloudServicesNetworkEnableDefaultEgressEndpoints. \ - * {@link KnownCloudServicesNetworkEnableDefaultEgressEndpoints} can be used interchangeably with CloudServicesNetworkEnableDefaultEgressEndpoints, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type CloudServicesNetworkEnableDefaultEgressEndpoints = string; - -/** Known values of {@link CloudServicesNetworkProvisioningState} that the service accepts. */ -export enum KnownCloudServicesNetworkProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Provisioning */ - Provisioning = "Provisioning", - /** Accepted */ - Accepted = "Accepted", -} - -/** - * Defines values for CloudServicesNetworkProvisioningState. \ - * {@link KnownCloudServicesNetworkProvisioningState} can be used interchangeably with CloudServicesNetworkProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Provisioning** \ - * **Accepted** - */ -export type CloudServicesNetworkProvisioningState = string; - -/** Known values of {@link CloudServicesNetworkStorageMode} that the service accepts. */ -export enum KnownCloudServicesNetworkStorageMode { - /** None */ - None = "None", - /** Standard */ - Standard = "Standard", -} - -/** - * Defines values for CloudServicesNetworkStorageMode. \ - * {@link KnownCloudServicesNetworkStorageMode} can be used interchangeably with CloudServicesNetworkStorageMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **Standard** - */ -export type CloudServicesNetworkStorageMode = string; - -/** Known values of {@link CloudServicesNetworkStorageStatusStatus} that the service accepts. */ -export enum KnownCloudServicesNetworkStorageStatusStatus { - /** Available */ - Available = "Available", - /** ExpandingVolume */ - ExpandingVolume = "ExpandingVolume", - /** ExpansionFailed */ - ExpansionFailed = "ExpansionFailed", -} - -/** - * Defines values for CloudServicesNetworkStorageStatusStatus. \ - * {@link KnownCloudServicesNetworkStorageStatusStatus} can be used interchangeably with CloudServicesNetworkStorageStatusStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Available** \ - * **ExpandingVolume** \ - * **ExpansionFailed** - */ -export type CloudServicesNetworkStorageStatusStatus = string; - -/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ -export enum KnownManagedServiceIdentityType { - /** None */ - None = "None", - /** SystemAssigned */ - SystemAssigned = "SystemAssigned", - /** UserAssigned */ - UserAssigned = "UserAssigned", - /** SystemAssignedUserAssigned */ - SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", -} - -/** - * Defines values for ManagedServiceIdentityType. \ - * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **SystemAssigned** \ - * **UserAssigned** \ - * **SystemAssigned,UserAssigned** - */ -export type ManagedServiceIdentityType = string; - -/** Known values of {@link ClusterManagerDetailedStatus} that the service accepts. */ -export enum KnownClusterManagerDetailedStatus { - /** Error */ - Error = "Error", - /** Available */ - Available = "Available", - /** Provisioning */ - Provisioning = "Provisioning", - /** ProvisioningFailed */ - ProvisioningFailed = "ProvisioningFailed", - /** Updating */ - Updating = "Updating", - /** UpdateFailed */ - UpdateFailed = "UpdateFailed", -} - -/** - * Defines values for ClusterManagerDetailedStatus. \ - * {@link KnownClusterManagerDetailedStatus} can be used interchangeably with ClusterManagerDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Error** \ - * **Available** \ - * **Provisioning** \ - * **ProvisioningFailed** \ - * **Updating** \ - * **UpdateFailed** - */ -export type ClusterManagerDetailedStatus = string; - -/** Known values of {@link ClusterManagerProvisioningState} that the service accepts. */ -export enum KnownClusterManagerProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Provisioning */ - Provisioning = "Provisioning", - /** Accepted */ - Accepted = "Accepted", - /** Updating */ - Updating = "Updating", -} - -/** - * Defines values for ClusterManagerProvisioningState. \ - * {@link KnownClusterManagerProvisioningState} can be used interchangeably with ClusterManagerProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Provisioning** \ - * **Accepted** \ - * **Updating** - */ -export type ClusterManagerProvisioningState = string; - -/** Known values of {@link ManagedServiceIdentitySelectorType} that the service accepts. */ -export enum KnownManagedServiceIdentitySelectorType { - /** SystemAssignedIdentity */ - SystemAssignedIdentity = "SystemAssignedIdentity", - /** UserAssignedIdentity */ - UserAssignedIdentity = "UserAssignedIdentity", -} - -/** - * Defines values for ManagedServiceIdentitySelectorType. \ - * {@link KnownManagedServiceIdentitySelectorType} can be used interchangeably with ManagedServiceIdentitySelectorType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SystemAssignedIdentity** \ - * **UserAssignedIdentity** - */ -export type ManagedServiceIdentitySelectorType = string; - -/** Known values of {@link ControlImpact} that the service accepts. */ -export enum KnownControlImpact { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for ControlImpact. \ - * {@link KnownControlImpact} can be used interchangeably with ControlImpact, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type ControlImpact = string; - -/** Known values of {@link WorkloadImpact} that the service accepts. */ -export enum KnownWorkloadImpact { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for WorkloadImpact. \ - * {@link KnownWorkloadImpact} can be used interchangeably with WorkloadImpact, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type WorkloadImpact = string; - -/** Known values of {@link ClusterConnectionStatus} that the service accepts. */ -export enum KnownClusterConnectionStatus { - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected", - /** Timeout */ - Timeout = "Timeout", - /** Undefined */ - Undefined = "Undefined", -} - -/** - * Defines values for ClusterConnectionStatus. \ - * {@link KnownClusterConnectionStatus} can be used interchangeably with ClusterConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Connected** \ - * **Disconnected** \ - * **Timeout** \ - * **Undefined** - */ -export type ClusterConnectionStatus = string; - -/** Known values of {@link ClusterManagerConnectionStatus} that the service accepts. */ -export enum KnownClusterManagerConnectionStatus { - /** Connected */ - Connected = "Connected", - /** Unreachable */ - Unreachable = "Unreachable", -} - -/** - * Defines values for ClusterManagerConnectionStatus. \ - * {@link KnownClusterManagerConnectionStatus} can be used interchangeably with ClusterManagerConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Connected** \ - * **Unreachable** - */ -export type ClusterManagerConnectionStatus = string; - -/** Known values of {@link ClusterType} that the service accepts. */ -export enum KnownClusterType { - /** SingleRack */ - SingleRack = "SingleRack", - /** MultiRack */ - MultiRack = "MultiRack", -} - -/** - * Defines values for ClusterType. \ - * {@link KnownClusterType} can be used interchangeably with ClusterType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SingleRack** \ - * **MultiRack** - */ -export type ClusterType = string; - -/** Known values of {@link CommandOutputType} that the service accepts. */ -export enum KnownCommandOutputType { - /** BareMetalMachineRunCommand */ - BareMetalMachineRunCommand = "BareMetalMachineRunCommand", - /** BareMetalMachineRunDataExtracts */ - BareMetalMachineRunDataExtracts = "BareMetalMachineRunDataExtracts", - /** BareMetalMachineRunReadCommands */ - BareMetalMachineRunReadCommands = "BareMetalMachineRunReadCommands", - /** StorageRunReadCommands */ - StorageRunReadCommands = "StorageRunReadCommands", - /** BareMetalMachineRunDataExtractsRestricted */ - BareMetalMachineRunDataExtractsRestricted = "BareMetalMachineRunDataExtractsRestricted", -} - -/** - * Defines values for CommandOutputType. \ - * {@link KnownCommandOutputType} can be used interchangeably with CommandOutputType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **BareMetalMachineRunCommand** \ - * **BareMetalMachineRunDataExtracts** \ - * **BareMetalMachineRunReadCommands** \ - * **StorageRunReadCommands** \ - * **BareMetalMachineRunDataExtractsRestricted** - */ -export type CommandOutputType = string; - -/** Known values of {@link ValidationThresholdGrouping} that the service accepts. */ -export enum KnownValidationThresholdGrouping { - /** PerCluster */ - PerCluster = "PerCluster", - /** PerRack */ - PerRack = "PerRack", -} - -/** - * Defines values for ValidationThresholdGrouping. \ - * {@link KnownValidationThresholdGrouping} can be used interchangeably with ValidationThresholdGrouping, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PerCluster** \ - * **PerRack** - */ -export type ValidationThresholdGrouping = string; - -/** Known values of {@link ValidationThresholdType} that the service accepts. */ -export enum KnownValidationThresholdType { - /** CountSuccess */ - CountSuccess = "CountSuccess", - /** PercentSuccess */ - PercentSuccess = "PercentSuccess", -} - -/** - * Defines values for ValidationThresholdType. \ - * {@link KnownValidationThresholdType} can be used interchangeably with ValidationThresholdType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **CountSuccess** \ - * **PercentSuccess** - */ -export type ValidationThresholdType = string; - -/** Known values of {@link ClusterDetailedStatus} that the service accepts. */ -export enum KnownClusterDetailedStatus { - /** PendingDeployment */ - PendingDeployment = "PendingDeployment", - /** Deploying */ - Deploying = "Deploying", - /** Running */ - Running = "Running", - /** Updating */ - Updating = "Updating", - /** UpdatePaused */ - UpdatePaused = "UpdatePaused", - /** Degraded */ - Degraded = "Degraded", - /** Deleting */ - Deleting = "Deleting", - /** Disconnected */ - Disconnected = "Disconnected", - /** Failed */ - Failed = "Failed", -} - -/** - * Defines values for ClusterDetailedStatus. \ - * {@link KnownClusterDetailedStatus} can be used interchangeably with ClusterDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PendingDeployment** \ - * **Deploying** \ - * **Running** \ - * **Updating** \ - * **UpdatePaused** \ - * **Degraded** \ - * **Deleting** \ - * **Disconnected** \ - * **Failed** - */ -export type ClusterDetailedStatus = string; - -/** Known values of {@link ClusterProvisioningState} that the service accepts. */ -export enum KnownClusterProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Accepted */ - Accepted = "Accepted", - /** Validating */ - Validating = "Validating", - /** Updating */ - Updating = "Updating", -} - -/** - * Defines values for ClusterProvisioningState. \ - * {@link KnownClusterProvisioningState} can be used interchangeably with ClusterProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Accepted** \ - * **Validating** \ - * **Updating** - */ -export type ClusterProvisioningState = string; - -/** Known values of {@link RuntimeProtectionEnforcementLevel} that the service accepts. */ -export enum KnownRuntimeProtectionEnforcementLevel { - /** Audit */ - Audit = "Audit", - /** Disabled */ - Disabled = "Disabled", - /** OnDemand */ - OnDemand = "OnDemand", - /** Passive */ - Passive = "Passive", - /** RealTime */ - RealTime = "RealTime", -} - -/** - * Defines values for RuntimeProtectionEnforcementLevel. \ - * {@link KnownRuntimeProtectionEnforcementLevel} can be used interchangeably with RuntimeProtectionEnforcementLevel, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Audit** \ - * **Disabled** \ - * **OnDemand** \ - * **Passive** \ - * **RealTime** - */ -export type RuntimeProtectionEnforcementLevel = string; - -/** Known values of {@link ClusterSecretArchiveEnabled} that the service accepts. */ -export enum KnownClusterSecretArchiveEnabled { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for ClusterSecretArchiveEnabled. \ - * {@link KnownClusterSecretArchiveEnabled} can be used interchangeably with ClusterSecretArchiveEnabled, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type ClusterSecretArchiveEnabled = string; - -/** Known values of {@link ClusterUpdateStrategyType} that the service accepts. */ -export enum KnownClusterUpdateStrategyType { - /** Rack */ - Rack = "Rack", - /** PauseAfterRack */ - PauseAfterRack = "PauseAfterRack", -} - -/** - * Defines values for ClusterUpdateStrategyType. \ - * {@link KnownClusterUpdateStrategyType} can be used interchangeably with ClusterUpdateStrategyType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Rack** \ - * **PauseAfterRack** - */ -export type ClusterUpdateStrategyType = string; - -/** Known values of {@link VulnerabilityScanningSettingsContainerScan} that the service accepts. */ -export enum KnownVulnerabilityScanningSettingsContainerScan { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled", -} - -/** - * Defines values for VulnerabilityScanningSettingsContainerScan. \ - * {@link KnownVulnerabilityScanningSettingsContainerScan} can be used interchangeably with VulnerabilityScanningSettingsContainerScan, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Disabled** \ - * **Enabled** - */ -export type VulnerabilityScanningSettingsContainerScan = string; - -/** Known values of {@link AvailabilityLifecycle} that the service accepts. */ -export enum KnownAvailabilityLifecycle { - /** Preview */ - Preview = "Preview", - /** GenerallyAvailable */ - GenerallyAvailable = "GenerallyAvailable", -} - -/** - * Defines values for AvailabilityLifecycle. \ - * {@link KnownAvailabilityLifecycle} can be used interchangeably with AvailabilityLifecycle, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Preview** \ - * **GenerallyAvailable** - */ -export type AvailabilityLifecycle = string; - -/** Known values of {@link KubernetesClusterDetailedStatus} that the service accepts. */ -export enum KnownKubernetesClusterDetailedStatus { - /** Available */ - Available = "Available", - /** Error */ - Error = "Error", - /** Provisioning */ - Provisioning = "Provisioning", -} - -/** - * Defines values for KubernetesClusterDetailedStatus. \ - * {@link KnownKubernetesClusterDetailedStatus} can be used interchangeably with KubernetesClusterDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Available** \ - * **Error** \ - * **Provisioning** - */ -export type KubernetesClusterDetailedStatus = string; - -/** Known values of {@link FeatureDetailedStatus} that the service accepts. */ -export enum KnownFeatureDetailedStatus { - /** Running */ - Running = "Running", - /** Failed */ - Failed = "Failed", - /** Unknown */ - Unknown = "Unknown", -} - -/** - * Defines values for FeatureDetailedStatus. \ - * {@link KnownFeatureDetailedStatus} can be used interchangeably with FeatureDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Running** \ - * **Failed** \ - * **Unknown** - */ -export type FeatureDetailedStatus = string; - -/** Known values of {@link HugepagesSize} that the service accepts. */ -export enum KnownHugepagesSize { - /** TwoM */ - TwoM = "2M", - /** OneG */ - OneG = "1G", -} - -/** - * Defines values for HugepagesSize. \ - * {@link KnownHugepagesSize} can be used interchangeably with HugepagesSize, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **2M** \ - * **1G** - */ -export type HugepagesSize = string; - -/** Known values of {@link KubernetesPluginType} that the service accepts. */ -export enum KnownKubernetesPluginType { - /** Dpdk */ - Dpdk = "DPDK", - /** Sriov */ - Sriov = "SRIOV", - /** OSDevice */ - OSDevice = "OSDevice", - /** Macvlan */ - Macvlan = "MACVLAN", - /** Ipvlan */ - Ipvlan = "IPVLAN", -} - -/** - * Defines values for KubernetesPluginType. \ - * {@link KnownKubernetesPluginType} can be used interchangeably with KubernetesPluginType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **DPDK** \ - * **SRIOV** \ - * **OSDevice** \ - * **MACVLAN** \ - * **IPVLAN** - */ -export type KubernetesPluginType = string; - -/** Known values of {@link L3NetworkConfigurationIpamEnabled} that the service accepts. */ -export enum KnownL3NetworkConfigurationIpamEnabled { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for L3NetworkConfigurationIpamEnabled. \ - * {@link KnownL3NetworkConfigurationIpamEnabled} can be used interchangeably with L3NetworkConfigurationIpamEnabled, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type L3NetworkConfigurationIpamEnabled = string; - -/** Known values of {@link AgentPoolMode} that the service accepts. */ -export enum KnownAgentPoolMode { - /** System */ - System = "System", - /** User */ - User = "User", - /** NotApplicable */ - NotApplicable = "NotApplicable", -} - -/** - * Defines values for AgentPoolMode. \ - * {@link KnownAgentPoolMode} can be used interchangeably with AgentPoolMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **System** \ - * **User** \ - * **NotApplicable** - */ -export type AgentPoolMode = string; - -/** Known values of {@link AdvertiseToFabric} that the service accepts. */ -export enum KnownAdvertiseToFabric { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for AdvertiseToFabric. \ - * {@link KnownAdvertiseToFabric} can be used interchangeably with AdvertiseToFabric, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type AdvertiseToFabric = string; - -/** Known values of {@link BfdEnabled} that the service accepts. */ -export enum KnownBfdEnabled { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for BfdEnabled. \ - * {@link KnownBfdEnabled} can be used interchangeably with BfdEnabled, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type BfdEnabled = string; - -/** Known values of {@link BgpMultiHop} that the service accepts. */ -export enum KnownBgpMultiHop { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for BgpMultiHop. \ - * {@link KnownBgpMultiHop} can be used interchangeably with BgpMultiHop, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type BgpMultiHop = string; - -/** Known values of {@link FabricPeeringEnabled} that the service accepts. */ -export enum KnownFabricPeeringEnabled { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for FabricPeeringEnabled. \ - * {@link KnownFabricPeeringEnabled} can be used interchangeably with FabricPeeringEnabled, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type FabricPeeringEnabled = string; - -/** Known values of {@link KubernetesClusterNodeDetailedStatus} that the service accepts. */ -export enum KnownKubernetesClusterNodeDetailedStatus { - /** Available */ - Available = "Available", - /** Error */ - Error = "Error", - /** Provisioning */ - Provisioning = "Provisioning", - /** Running */ - Running = "Running", - /** Scheduling */ - Scheduling = "Scheduling", - /** Stopped */ - Stopped = "Stopped", - /** Terminating */ - Terminating = "Terminating", - /** Unknown */ - Unknown = "Unknown", -} - -/** - * Defines values for KubernetesClusterNodeDetailedStatus. \ - * {@link KnownKubernetesClusterNodeDetailedStatus} can be used interchangeably with KubernetesClusterNodeDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Available** \ - * **Error** \ - * **Provisioning** \ - * **Running** \ - * **Scheduling** \ - * **Stopped** \ - * **Terminating** \ - * **Unknown** - */ -export type KubernetesClusterNodeDetailedStatus = string; - -/** Known values of {@link DefaultGateway} that the service accepts. */ -export enum KnownDefaultGateway { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for DefaultGateway. \ - * {@link KnownDefaultGateway} can be used interchangeably with DefaultGateway, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type DefaultGateway = string; - -/** Known values of {@link VirtualMachineIPAllocationMethod} that the service accepts. */ -export enum KnownVirtualMachineIPAllocationMethod { - /** Dynamic */ - Dynamic = "Dynamic", - /** Static */ - Static = "Static", - /** Disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for VirtualMachineIPAllocationMethod. \ - * {@link KnownVirtualMachineIPAllocationMethod} can be used interchangeably with VirtualMachineIPAllocationMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Dynamic** \ - * **Static** \ - * **Disabled** - */ -export type VirtualMachineIPAllocationMethod = string; - -/** Known values of {@link KubernetesNodePowerState} that the service accepts. */ -export enum KnownKubernetesNodePowerState { - /** On */ - On = "On", - /** Off */ - Off = "Off", - /** Unknown */ - Unknown = "Unknown", -} - -/** - * Defines values for KubernetesNodePowerState. \ - * {@link KnownKubernetesNodePowerState} can be used interchangeably with KubernetesNodePowerState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **On** \ - * **Off** \ - * **Unknown** - */ -export type KubernetesNodePowerState = string; - -/** Known values of {@link KubernetesNodeRole} that the service accepts. */ -export enum KnownKubernetesNodeRole { - /** ControlPlane */ - ControlPlane = "ControlPlane", - /** Worker */ - Worker = "Worker", -} - -/** - * Defines values for KubernetesNodeRole. \ - * {@link KnownKubernetesNodeRole} can be used interchangeably with KubernetesNodeRole, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ControlPlane** \ - * **Worker** - */ -export type KubernetesNodeRole = string; - -/** Known values of {@link KubernetesClusterProvisioningState} that the service accepts. */ -export enum KnownKubernetesClusterProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Accepted */ - Accepted = "Accepted", - /** InProgress */ - InProgress = "InProgress", - /** Created */ - Created = "Created", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", -} - -/** - * Defines values for KubernetesClusterProvisioningState. \ - * {@link KnownKubernetesClusterProvisioningState} can be used interchangeably with KubernetesClusterProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Accepted** \ - * **InProgress** \ - * **Created** \ - * **Updating** \ - * **Deleting** - */ -export type KubernetesClusterProvisioningState = string; - -/** Known values of {@link L2NetworkDetailedStatus} that the service accepts. */ -export enum KnownL2NetworkDetailedStatus { - /** Error */ - Error = "Error", - /** Available */ - Available = "Available", - /** Provisioning */ - Provisioning = "Provisioning", -} - -/** - * Defines values for L2NetworkDetailedStatus. \ - * {@link KnownL2NetworkDetailedStatus} can be used interchangeably with L2NetworkDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Error** \ - * **Available** \ - * **Provisioning** - */ -export type L2NetworkDetailedStatus = string; - -/** Known values of {@link HybridAksPluginType} that the service accepts. */ -export enum KnownHybridAksPluginType { - /** Dpdk */ - Dpdk = "DPDK", - /** Sriov */ - Sriov = "SRIOV", - /** OSDevice */ - OSDevice = "OSDevice", -} - -/** - * Defines values for HybridAksPluginType. \ - * {@link KnownHybridAksPluginType} can be used interchangeably with HybridAksPluginType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **DPDK** \ - * **SRIOV** \ - * **OSDevice** - */ -export type HybridAksPluginType = string; - -/** Known values of {@link L2NetworkProvisioningState} that the service accepts. */ -export enum KnownL2NetworkProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Provisioning */ - Provisioning = "Provisioning", - /** Accepted */ - Accepted = "Accepted", -} - -/** - * Defines values for L2NetworkProvisioningState. \ - * {@link KnownL2NetworkProvisioningState} can be used interchangeably with L2NetworkProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Provisioning** \ - * **Accepted** - */ -export type L2NetworkProvisioningState = string; - -/** Known values of {@link L3NetworkDetailedStatus} that the service accepts. */ -export enum KnownL3NetworkDetailedStatus { - /** Error */ - Error = "Error", - /** Available */ - Available = "Available", - /** Provisioning */ - Provisioning = "Provisioning", -} - -/** - * Defines values for L3NetworkDetailedStatus. \ - * {@link KnownL3NetworkDetailedStatus} can be used interchangeably with L3NetworkDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Error** \ - * **Available** \ - * **Provisioning** - */ -export type L3NetworkDetailedStatus = string; - -/** Known values of {@link HybridAksIpamEnabled} that the service accepts. */ -export enum KnownHybridAksIpamEnabled { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for HybridAksIpamEnabled. \ - * {@link KnownHybridAksIpamEnabled} can be used interchangeably with HybridAksIpamEnabled, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type HybridAksIpamEnabled = string; - -/** Known values of {@link IpAllocationType} that the service accepts. */ -export enum KnownIpAllocationType { - /** IPV4 */ - IPV4 = "IPV4", - /** IPV6 */ - IPV6 = "IPV6", - /** DualStack */ - DualStack = "DualStack", -} - -/** - * Defines values for IpAllocationType. \ - * {@link KnownIpAllocationType} can be used interchangeably with IpAllocationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IPV4** \ - * **IPV6** \ - * **DualStack** - */ -export type IpAllocationType = string; - -/** Known values of {@link L3NetworkProvisioningState} that the service accepts. */ -export enum KnownL3NetworkProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Provisioning */ - Provisioning = "Provisioning", - /** Accepted */ - Accepted = "Accepted", -} - -/** - * Defines values for L3NetworkProvisioningState. \ - * {@link KnownL3NetworkProvisioningState} can be used interchangeably with L3NetworkProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Provisioning** \ - * **Accepted** - */ -export type L3NetworkProvisioningState = string; - -/** Known values of {@link BootstrapProtocol} that the service accepts. */ -export enum KnownBootstrapProtocol { - /** PXE */ - PXE = "PXE", -} - -/** - * Defines values for BootstrapProtocol. \ - * {@link KnownBootstrapProtocol} can be used interchangeably with BootstrapProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PXE** - */ -export type BootstrapProtocol = string; - -/** Known values of {@link MachineSkuDiskConnectionType} that the service accepts. */ -export enum KnownMachineSkuDiskConnectionType { - /** Pcie */ - Pcie = "PCIE", - /** Sata */ - Sata = "SATA", - /** Raid */ - Raid = "RAID", - /** SAS */ - SAS = "SAS", -} - -/** - * Defines values for MachineSkuDiskConnectionType. \ - * {@link KnownMachineSkuDiskConnectionType} can be used interchangeably with MachineSkuDiskConnectionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PCIE** \ - * **SATA** \ - * **RAID** \ - * **SAS** - */ -export type MachineSkuDiskConnectionType = string; - -/** Known values of {@link DiskType} that the service accepts. */ -export enum KnownDiskType { - /** HDD */ - HDD = "HDD", - /** SSD */ - SSD = "SSD", -} - -/** - * Defines values for DiskType. \ - * {@link KnownDiskType} can be used interchangeably with DiskType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **HDD** \ - * **SSD** - */ -export type DiskType = string; - -/** Known values of {@link DeviceConnectionType} that the service accepts. */ -export enum KnownDeviceConnectionType { - /** PCI */ - PCI = "PCI", -} - -/** - * Defines values for DeviceConnectionType. \ - * {@link KnownDeviceConnectionType} can be used interchangeably with DeviceConnectionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PCI** - */ -export type DeviceConnectionType = string; - -/** Known values of {@link RackSkuProvisioningState} that the service accepts. */ -export enum KnownRackSkuProvisioningState { - /** Canceled */ - Canceled = "Canceled", - /** Failed */ - Failed = "Failed", - /** Succeeded */ - Succeeded = "Succeeded", -} - -/** - * Defines values for RackSkuProvisioningState. \ - * {@link KnownRackSkuProvisioningState} can be used interchangeably with RackSkuProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Canceled** \ - * **Failed** \ - * **Succeeded** - */ -export type RackSkuProvisioningState = string; - -/** Known values of {@link RackSkuType} that the service accepts. */ -export enum KnownRackSkuType { - /** Aggregator */ - Aggregator = "Aggregator", - /** Compute */ - Compute = "Compute", - /** Single */ - Single = "Single", -} - -/** - * Defines values for RackSkuType. \ - * {@link KnownRackSkuType} can be used interchangeably with RackSkuType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Aggregator** \ - * **Compute** \ - * **Single** - */ -export type RackSkuType = string; - -/** Known values of {@link RackDetailedStatus} that the service accepts. */ -export enum KnownRackDetailedStatus { - /** Error */ - Error = "Error", - /** Available */ - Available = "Available", - /** Provisioning */ - Provisioning = "Provisioning", -} - -/** - * Defines values for RackDetailedStatus. \ - * {@link KnownRackDetailedStatus} can be used interchangeably with RackDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Error** \ - * **Available** \ - * **Provisioning** - */ -export type RackDetailedStatus = string; - -/** Known values of {@link RackProvisioningState} that the service accepts. */ -export enum KnownRackProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Provisioning */ - Provisioning = "Provisioning", - /** Accepted */ - Accepted = "Accepted", -} - -/** - * Defines values for RackProvisioningState. \ - * {@link KnownRackProvisioningState} can be used interchangeably with RackProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Provisioning** \ - * **Accepted** - */ -export type RackProvisioningState = string; - -/** Known values of {@link StorageApplianceDetailedStatus} that the service accepts. */ -export enum KnownStorageApplianceDetailedStatus { - /** Available */ - Available = "Available", - /** Degraded */ - Degraded = "Degraded", - /** Error */ - Error = "Error", - /** Provisioning */ - Provisioning = "Provisioning", -} - -/** - * Defines values for StorageApplianceDetailedStatus. \ - * {@link KnownStorageApplianceDetailedStatus} can be used interchangeably with StorageApplianceDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Available** \ - * **Degraded** \ - * **Error** \ - * **Provisioning** - */ -export type StorageApplianceDetailedStatus = string; - -/** Known values of {@link StorageApplianceProvisioningState} that the service accepts. */ -export enum KnownStorageApplianceProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Provisioning */ - Provisioning = "Provisioning", - /** Accepted */ - Accepted = "Accepted", -} - -/** - * Defines values for StorageApplianceProvisioningState. \ - * {@link KnownStorageApplianceProvisioningState} can be used interchangeably with StorageApplianceProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Provisioning** \ - * **Accepted** - */ -export type StorageApplianceProvisioningState = string; - -/** Known values of {@link RemoteVendorManagementFeature} that the service accepts. */ -export enum KnownRemoteVendorManagementFeature { - /** Supported */ - Supported = "Supported", - /** Unsupported */ - Unsupported = "Unsupported", -} - -/** - * Defines values for RemoteVendorManagementFeature. \ - * {@link KnownRemoteVendorManagementFeature} can be used interchangeably with RemoteVendorManagementFeature, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Supported** \ - * **Unsupported** - */ -export type RemoteVendorManagementFeature = string; - -/** Known values of {@link RemoteVendorManagementStatus} that the service accepts. */ -export enum KnownRemoteVendorManagementStatus { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled", - /** Unsupported */ - Unsupported = "Unsupported", -} - -/** - * Defines values for RemoteVendorManagementStatus. \ - * {@link KnownRemoteVendorManagementStatus} can be used interchangeably with RemoteVendorManagementStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** \ - * **Unsupported** - */ -export type RemoteVendorManagementStatus = string; - -/** Known values of {@link TrunkedNetworkDetailedStatus} that the service accepts. */ -export enum KnownTrunkedNetworkDetailedStatus { - /** Error */ - Error = "Error", - /** Available */ - Available = "Available", - /** Provisioning */ - Provisioning = "Provisioning", -} - -/** - * Defines values for TrunkedNetworkDetailedStatus. \ - * {@link KnownTrunkedNetworkDetailedStatus} can be used interchangeably with TrunkedNetworkDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Error** \ - * **Available** \ - * **Provisioning** - */ -export type TrunkedNetworkDetailedStatus = string; - -/** Known values of {@link TrunkedNetworkProvisioningState} that the service accepts. */ -export enum KnownTrunkedNetworkProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Provisioning */ - Provisioning = "Provisioning", - /** Accepted */ - Accepted = "Accepted", -} - -/** - * Defines values for TrunkedNetworkProvisioningState. \ - * {@link KnownTrunkedNetworkProvisioningState} can be used interchangeably with TrunkedNetworkProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Provisioning** \ - * **Accepted** - */ -export type TrunkedNetworkProvisioningState = string; - -/** Known values of {@link VirtualMachineBootMethod} that the service accepts. */ -export enum KnownVirtualMachineBootMethod { - /** Uefi */ - Uefi = "UEFI", - /** Bios */ - Bios = "BIOS", -} - -/** - * Defines values for VirtualMachineBootMethod. \ - * {@link KnownVirtualMachineBootMethod} can be used interchangeably with VirtualMachineBootMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **UEFI** \ - * **BIOS** - */ -export type VirtualMachineBootMethod = string; - -/** Known values of {@link VirtualMachineDetailedStatus} that the service accepts. */ -export enum KnownVirtualMachineDetailedStatus { - /** Available */ - Available = "Available", - /** Error */ - Error = "Error", - /** Provisioning */ - Provisioning = "Provisioning", - /** Running */ - Running = "Running", - /** Scheduling */ - Scheduling = "Scheduling", - /** Stopped */ - Stopped = "Stopped", - /** Terminating */ - Terminating = "Terminating", - /** Unknown */ - Unknown = "Unknown", -} - -/** - * Defines values for VirtualMachineDetailedStatus. \ - * {@link KnownVirtualMachineDetailedStatus} can be used interchangeably with VirtualMachineDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Available** \ - * **Error** \ - * **Provisioning** \ - * **Running** \ - * **Scheduling** \ - * **Stopped** \ - * **Terminating** \ - * **Unknown** - */ -export type VirtualMachineDetailedStatus = string; - -/** Known values of {@link VirtualMachineIsolateEmulatorThread} that the service accepts. */ -export enum KnownVirtualMachineIsolateEmulatorThread { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for VirtualMachineIsolateEmulatorThread. \ - * {@link KnownVirtualMachineIsolateEmulatorThread} can be used interchangeably with VirtualMachineIsolateEmulatorThread, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type VirtualMachineIsolateEmulatorThread = string; - -/** Known values of {@link VirtualMachinePlacementHintType} that the service accepts. */ -export enum KnownVirtualMachinePlacementHintType { - /** Affinity */ - Affinity = "Affinity", - /** AntiAffinity */ - AntiAffinity = "AntiAffinity", -} - -/** - * Defines values for VirtualMachinePlacementHintType. \ - * {@link KnownVirtualMachinePlacementHintType} can be used interchangeably with VirtualMachinePlacementHintType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Affinity** \ - * **AntiAffinity** - */ -export type VirtualMachinePlacementHintType = string; - -/** Known values of {@link VirtualMachineSchedulingExecution} that the service accepts. */ -export enum KnownVirtualMachineSchedulingExecution { - /** Hard */ - Hard = "Hard", - /** Soft */ - Soft = "Soft", -} - -/** - * Defines values for VirtualMachineSchedulingExecution. \ - * {@link KnownVirtualMachineSchedulingExecution} can be used interchangeably with VirtualMachineSchedulingExecution, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Hard** \ - * **Soft** - */ -export type VirtualMachineSchedulingExecution = string; - -/** Known values of {@link VirtualMachinePlacementHintPodAffinityScope} that the service accepts. */ -export enum KnownVirtualMachinePlacementHintPodAffinityScope { - /** Rack */ - Rack = "Rack", - /** Machine */ - Machine = "Machine", -} - -/** - * Defines values for VirtualMachinePlacementHintPodAffinityScope. \ - * {@link KnownVirtualMachinePlacementHintPodAffinityScope} can be used interchangeably with VirtualMachinePlacementHintPodAffinityScope, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Rack** \ - * **Machine** - */ -export type VirtualMachinePlacementHintPodAffinityScope = string; - -/** Known values of {@link VirtualMachinePowerState} that the service accepts. */ -export enum KnownVirtualMachinePowerState { - /** On */ - On = "On", - /** Off */ - Off = "Off", - /** Unknown */ - Unknown = "Unknown", -} - -/** - * Defines values for VirtualMachinePowerState. \ - * {@link KnownVirtualMachinePowerState} can be used interchangeably with VirtualMachinePowerState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **On** \ - * **Off** \ - * **Unknown** - */ -export type VirtualMachinePowerState = string; - -/** Known values of {@link VirtualMachineProvisioningState} that the service accepts. */ -export enum KnownVirtualMachineProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Provisioning */ - Provisioning = "Provisioning", - /** Accepted */ - Accepted = "Accepted", -} - -/** - * Defines values for VirtualMachineProvisioningState. \ - * {@link KnownVirtualMachineProvisioningState} can be used interchangeably with VirtualMachineProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Provisioning** \ - * **Accepted** - */ -export type VirtualMachineProvisioningState = string; - -/** Known values of {@link OsDiskCreateOption} that the service accepts. */ -export enum KnownOsDiskCreateOption { - /** Utilize the local storage of the host machine. */ - Ephemeral = "Ephemeral", - /** Utilize a storage appliance backed volume to host the disk. */ - Persistent = "Persistent", -} - -/** - * Defines values for OsDiskCreateOption. \ - * {@link KnownOsDiskCreateOption} can be used interchangeably with OsDiskCreateOption, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Ephemeral**: Utilize the local storage of the host machine. \ - * **Persistent**: Utilize a storage appliance backed volume to host the disk. - */ -export type OsDiskCreateOption = string; - -/** Known values of {@link OsDiskDeleteOption} that the service accepts. */ -export enum KnownOsDiskDeleteOption { - /** Delete */ - Delete = "Delete", -} - -/** - * Defines values for OsDiskDeleteOption. \ - * {@link KnownOsDiskDeleteOption} can be used interchangeably with OsDiskDeleteOption, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Delete** - */ -export type OsDiskDeleteOption = string; - -/** Known values of {@link VirtualMachineVirtioInterfaceType} that the service accepts. */ -export enum KnownVirtualMachineVirtioInterfaceType { - /** Modern */ - Modern = "Modern", - /** Transitional */ - Transitional = "Transitional", -} - -/** - * Defines values for VirtualMachineVirtioInterfaceType. \ - * {@link KnownVirtualMachineVirtioInterfaceType} can be used interchangeably with VirtualMachineVirtioInterfaceType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Modern** \ - * **Transitional** - */ -export type VirtualMachineVirtioInterfaceType = string; - -/** Known values of {@link VirtualMachineDeviceModelType} that the service accepts. */ -export enum KnownVirtualMachineDeviceModelType { - /** Traditional and most compatible device virtualization interface. */ - T1 = "T1", - /** Modern and enhanced device virtualization interface. */ - T2 = "T2", - /** Improved security and functionality (including TPM and secure boot support). Required for windows 11 and server 2025. */ - T3 = "T3", -} - -/** - * Defines values for VirtualMachineDeviceModelType. \ - * {@link KnownVirtualMachineDeviceModelType} can be used interchangeably with VirtualMachineDeviceModelType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **T1**: Traditional and most compatible device virtualization interface. \ - * **T2**: Modern and enhanced device virtualization interface. \ - * **T3**: Improved security and functionality (including TPM and secure boot support). Required for windows 11 and server 2025. - */ -export type VirtualMachineDeviceModelType = string; - -/** Known values of {@link VolumeDetailedStatus} that the service accepts. */ -export enum KnownVolumeDetailedStatus { - /** Error */ - Error = "Error", - /** Active */ - Active = "Active", - /** Provisioning */ - Provisioning = "Provisioning", -} - -/** - * Defines values for VolumeDetailedStatus. \ - * {@link KnownVolumeDetailedStatus} can be used interchangeably with VolumeDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Error** \ - * **Active** \ - * **Provisioning** - */ -export type VolumeDetailedStatus = string; - -/** Known values of {@link VolumeProvisioningState} that the service accepts. */ -export enum KnownVolumeProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Provisioning */ - Provisioning = "Provisioning", - /** Accepted */ - Accepted = "Accepted", -} - -/** - * Defines values for VolumeProvisioningState. \ - * {@link KnownVolumeProvisioningState} can be used interchangeably with VolumeProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Provisioning** \ - * **Accepted** - */ -export type VolumeProvisioningState = string; - -/** Known values of {@link BareMetalMachineEvacuate} that the service accepts. */ -export enum KnownBareMetalMachineEvacuate { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for BareMetalMachineEvacuate. \ - * {@link KnownBareMetalMachineEvacuate} can be used interchangeably with BareMetalMachineEvacuate, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type BareMetalMachineEvacuate = string; - -/** Known values of {@link BareMetalMachineSkipShutdown} that the service accepts. */ -export enum KnownBareMetalMachineSkipShutdown { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for BareMetalMachineSkipShutdown. \ - * {@link KnownBareMetalMachineSkipShutdown} can be used interchangeably with BareMetalMachineSkipShutdown, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type BareMetalMachineSkipShutdown = string; - -/** Known values of {@link BareMetalMachineReplaceSafeguardMode} that the service accepts. */ -export enum KnownBareMetalMachineReplaceSafeguardMode { - /** All */ - All = "All", - /** None */ - None = "None", -} - -/** - * Defines values for BareMetalMachineReplaceSafeguardMode. \ - * {@link KnownBareMetalMachineReplaceSafeguardMode} can be used interchangeably with BareMetalMachineReplaceSafeguardMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **All** \ - * **None** - */ -export type BareMetalMachineReplaceSafeguardMode = string; - -/** Known values of {@link BareMetalMachineReplaceStoragePolicy} that the service accepts. */ -export enum KnownBareMetalMachineReplaceStoragePolicy { - /** Preserve */ - Preserve = "Preserve", - /** DiscardAll */ - DiscardAll = "DiscardAll", -} - -/** - * Defines values for BareMetalMachineReplaceStoragePolicy. \ - * {@link KnownBareMetalMachineReplaceStoragePolicy} can be used interchangeably with BareMetalMachineReplaceStoragePolicy, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Preserve** \ - * **DiscardAll** - */ -export type BareMetalMachineReplaceStoragePolicy = string; - -/** Known values of {@link BareMetalMachineKeySetDetailedStatus} that the service accepts. */ -export enum KnownBareMetalMachineKeySetDetailedStatus { - /** AllActive */ - AllActive = "AllActive", - /** SomeInvalid */ - SomeInvalid = "SomeInvalid", - /** AllInvalid */ - AllInvalid = "AllInvalid", - /** Validating */ - Validating = "Validating", -} - -/** - * Defines values for BareMetalMachineKeySetDetailedStatus. \ - * {@link KnownBareMetalMachineKeySetDetailedStatus} can be used interchangeably with BareMetalMachineKeySetDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AllActive** \ - * **SomeInvalid** \ - * **AllInvalid** \ - * **Validating** - */ -export type BareMetalMachineKeySetDetailedStatus = string; - -/** Known values of {@link BareMetalMachineKeySetPrivilegeLevel} that the service accepts. */ -export enum KnownBareMetalMachineKeySetPrivilegeLevel { - /** Standard */ - Standard = "Standard", - /** Superuser */ - Superuser = "Superuser", - /** Other */ - Other = "Other", -} - -/** - * Defines values for BareMetalMachineKeySetPrivilegeLevel. \ - * {@link KnownBareMetalMachineKeySetPrivilegeLevel} can be used interchangeably with BareMetalMachineKeySetPrivilegeLevel, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard** \ - * **Superuser** \ - * **Other** - */ -export type BareMetalMachineKeySetPrivilegeLevel = string; - -/** Known values of {@link BareMetalMachineKeySetProvisioningState} that the service accepts. */ -export enum KnownBareMetalMachineKeySetProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Accepted */ - Accepted = "Accepted", - /** Provisioning */ - Provisioning = "Provisioning", -} - -/** - * Defines values for BareMetalMachineKeySetProvisioningState. \ - * {@link KnownBareMetalMachineKeySetProvisioningState} can be used interchangeably with BareMetalMachineKeySetProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Accepted** \ - * **Provisioning** - */ -export type BareMetalMachineKeySetProvisioningState = string; - -/** Known values of {@link BareMetalMachineKeySetUserSetupStatus} that the service accepts. */ -export enum KnownBareMetalMachineKeySetUserSetupStatus { - /** Active */ - Active = "Active", - /** Invalid */ - Invalid = "Invalid", -} - -/** - * Defines values for BareMetalMachineKeySetUserSetupStatus. \ - * {@link KnownBareMetalMachineKeySetUserSetupStatus} can be used interchangeably with BareMetalMachineKeySetUserSetupStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Active** \ - * **Invalid** - */ -export type BareMetalMachineKeySetUserSetupStatus = string; - -/** Known values of {@link BmcKeySetDetailedStatus} that the service accepts. */ -export enum KnownBmcKeySetDetailedStatus { - /** AllActive */ - AllActive = "AllActive", - /** SomeInvalid */ - SomeInvalid = "SomeInvalid", - /** AllInvalid */ - AllInvalid = "AllInvalid", - /** Validating */ - Validating = "Validating", -} - -/** - * Defines values for BmcKeySetDetailedStatus. \ - * {@link KnownBmcKeySetDetailedStatus} can be used interchangeably with BmcKeySetDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AllActive** \ - * **SomeInvalid** \ - * **AllInvalid** \ - * **Validating** - */ -export type BmcKeySetDetailedStatus = string; - -/** Known values of {@link BmcKeySetPrivilegeLevel} that the service accepts. */ -export enum KnownBmcKeySetPrivilegeLevel { - /** ReadOnly */ - ReadOnly = "ReadOnly", - /** Administrator */ - Administrator = "Administrator", -} - -/** - * Defines values for BmcKeySetPrivilegeLevel. \ - * {@link KnownBmcKeySetPrivilegeLevel} can be used interchangeably with BmcKeySetPrivilegeLevel, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ReadOnly** \ - * **Administrator** - */ -export type BmcKeySetPrivilegeLevel = string; - -/** Known values of {@link BmcKeySetProvisioningState} that the service accepts. */ -export enum KnownBmcKeySetProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Accepted */ - Accepted = "Accepted", - /** Provisioning */ - Provisioning = "Provisioning", -} - -/** - * Defines values for BmcKeySetProvisioningState. \ - * {@link KnownBmcKeySetProvisioningState} can be used interchangeably with BmcKeySetProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Accepted** \ - * **Provisioning** - */ -export type BmcKeySetProvisioningState = string; - -/** Known values of {@link ClusterContinueUpdateVersionMachineGroupTargetingMode} that the service accepts. */ -export enum KnownClusterContinueUpdateVersionMachineGroupTargetingMode { - /** AlphaByRack */ - AlphaByRack = "AlphaByRack", -} - -/** - * Defines values for ClusterContinueUpdateVersionMachineGroupTargetingMode. \ - * {@link KnownClusterContinueUpdateVersionMachineGroupTargetingMode} can be used interchangeably with ClusterContinueUpdateVersionMachineGroupTargetingMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AlphaByRack** - */ -export type ClusterContinueUpdateVersionMachineGroupTargetingMode = string; - -/** Known values of {@link ClusterMetricsConfigurationDetailedStatus} that the service accepts. */ -export enum KnownClusterMetricsConfigurationDetailedStatus { - /** Processing */ - Processing = "Processing", - /** Applied */ - Applied = "Applied", - /** Error */ - Error = "Error", -} - -/** - * Defines values for ClusterMetricsConfigurationDetailedStatus. \ - * {@link KnownClusterMetricsConfigurationDetailedStatus} can be used interchangeably with ClusterMetricsConfigurationDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Processing** \ - * **Applied** \ - * **Error** - */ -export type ClusterMetricsConfigurationDetailedStatus = string; - -/** Known values of {@link ClusterMetricsConfigurationProvisioningState} that the service accepts. */ -export enum KnownClusterMetricsConfigurationProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Accepted */ - Accepted = "Accepted", - /** Provisioning */ - Provisioning = "Provisioning", -} - -/** - * Defines values for ClusterMetricsConfigurationProvisioningState. \ - * {@link KnownClusterMetricsConfigurationProvisioningState} can be used interchangeably with ClusterMetricsConfigurationProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Accepted** \ - * **Provisioning** - */ -export type ClusterMetricsConfigurationProvisioningState = string; - -/** Known values of {@link ClusterScanRuntimeParametersScanActivity} that the service accepts. */ -export enum KnownClusterScanRuntimeParametersScanActivity { - /** Scan */ - Scan = "Scan", - /** Skip */ - Skip = "Skip", -} - -/** - * Defines values for ClusterScanRuntimeParametersScanActivity. \ - * {@link KnownClusterScanRuntimeParametersScanActivity} can be used interchangeably with ClusterScanRuntimeParametersScanActivity, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Scan** \ - * **Skip** - */ -export type ClusterScanRuntimeParametersScanActivity = string; - -/** Known values of {@link AgentPoolDetailedStatus} that the service accepts. */ -export enum KnownAgentPoolDetailedStatus { - /** Available */ - Available = "Available", - /** Error */ - Error = "Error", - /** Provisioning */ - Provisioning = "Provisioning", -} - -/** - * Defines values for AgentPoolDetailedStatus. \ - * {@link KnownAgentPoolDetailedStatus} can be used interchangeably with AgentPoolDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Available** \ - * **Error** \ - * **Provisioning** - */ -export type AgentPoolDetailedStatus = string; - -/** Known values of {@link AgentPoolProvisioningState} that the service accepts. */ -export enum KnownAgentPoolProvisioningState { - /** Accepted */ - Accepted = "Accepted", - /** Canceled */ - Canceled = "Canceled", - /** Deleting */ - Deleting = "Deleting", - /** Failed */ - Failed = "Failed", - /** InProgress */ - InProgress = "InProgress", - /** Succeeded */ - Succeeded = "Succeeded", - /** Updating */ - Updating = "Updating", -} - -/** - * Defines values for AgentPoolProvisioningState. \ - * {@link KnownAgentPoolProvisioningState} can be used interchangeably with AgentPoolProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Accepted** \ - * **Canceled** \ - * **Deleting** \ - * **Failed** \ - * **InProgress** \ - * **Succeeded** \ - * **Updating** - */ -export type AgentPoolProvisioningState = string; - -/** Known values of {@link KubernetesClusterFeatureAvailabilityLifecycle} that the service accepts. */ -export enum KnownKubernetesClusterFeatureAvailabilityLifecycle { - /** Preview */ - Preview = "Preview", - /** GenerallyAvailable */ - GenerallyAvailable = "GenerallyAvailable", -} - -/** - * Defines values for KubernetesClusterFeatureAvailabilityLifecycle. \ - * {@link KnownKubernetesClusterFeatureAvailabilityLifecycle} can be used interchangeably with KubernetesClusterFeatureAvailabilityLifecycle, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Preview** \ - * **GenerallyAvailable** - */ -export type KubernetesClusterFeatureAvailabilityLifecycle = string; - -/** Known values of {@link KubernetesClusterFeatureDetailedStatus} that the service accepts. */ -export enum KnownKubernetesClusterFeatureDetailedStatus { - /** Error */ - Error = "Error", - /** Provisioning */ - Provisioning = "Provisioning", - /** Installed */ - Installed = "Installed", -} - -/** - * Defines values for KubernetesClusterFeatureDetailedStatus. \ - * {@link KnownKubernetesClusterFeatureDetailedStatus} can be used interchangeably with KubernetesClusterFeatureDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Error** \ - * **Provisioning** \ - * **Installed** - */ -export type KubernetesClusterFeatureDetailedStatus = string; - -/** Known values of {@link KubernetesClusterFeatureProvisioningState} that the service accepts. */ -export enum KnownKubernetesClusterFeatureProvisioningState { - /** Accepted */ - Accepted = "Accepted", - /** Canceled */ - Canceled = "Canceled", - /** Deleting */ - Deleting = "Deleting", - /** Failed */ - Failed = "Failed", - /** Succeeded */ - Succeeded = "Succeeded", - /** Updating */ - Updating = "Updating", -} - -/** - * Defines values for KubernetesClusterFeatureProvisioningState. \ - * {@link KnownKubernetesClusterFeatureProvisioningState} can be used interchangeably with KubernetesClusterFeatureProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Accepted** \ - * **Canceled** \ - * **Deleting** \ - * **Failed** \ - * **Succeeded** \ - * **Updating** - */ -export type KubernetesClusterFeatureProvisioningState = string; - -/** Known values of {@link KubernetesClusterFeatureRequired} that the service accepts. */ -export enum KnownKubernetesClusterFeatureRequired { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for KubernetesClusterFeatureRequired. \ - * {@link KnownKubernetesClusterFeatureRequired} can be used interchangeably with KubernetesClusterFeatureRequired, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type KubernetesClusterFeatureRequired = string; - -/** Known values of {@link RelayType} that the service accepts. */ -export enum KnownRelayType { - /** Platform */ - Platform = "Platform", - /** Public */ - Public = "Public", -} - -/** - * Defines values for RelayType. \ - * {@link KnownRelayType} can be used interchangeably with RelayType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Platform** \ - * **Public** - */ -export type RelayType = string; - -/** Known values of {@link ConsoleDetailedStatus} that the service accepts. */ -export enum KnownConsoleDetailedStatus { - /** Ready */ - Ready = "Ready", - /** Error */ - Error = "Error", -} - -/** - * Defines values for ConsoleDetailedStatus. \ - * {@link KnownConsoleDetailedStatus} can be used interchangeably with ConsoleDetailedStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Ready** \ - * **Error** - */ -export type ConsoleDetailedStatus = string; - -/** Known values of {@link ConsoleEnabled} that the service accepts. */ -export enum KnownConsoleEnabled { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for ConsoleEnabled. \ - * {@link KnownConsoleEnabled} can be used interchangeably with ConsoleEnabled, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type ConsoleEnabled = string; - -/** Known values of {@link ConsoleProvisioningState} that the service accepts. */ -export enum KnownConsoleProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Provisioning */ - Provisioning = "Provisioning", - /** Accepted */ - Accepted = "Accepted", -} - -/** - * Defines values for ConsoleProvisioningState. \ - * {@link KnownConsoleProvisioningState} can be used interchangeably with ConsoleProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Provisioning** \ - * **Accepted** - */ -export type ConsoleProvisioningState = string; - -/** Known values of {@link SkipShutdown} that the service accepts. */ -export enum KnownSkipShutdown { - /** True */ - True = "True", - /** False */ - False = "False", -} - -/** - * Defines values for SkipShutdown. \ - * {@link KnownSkipShutdown} can be used interchangeably with SkipShutdown, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **True** \ - * **False** - */ -export type SkipShutdown = string; - -/** Optional parameters. */ -export interface OperationsListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult; - -/** Optional parameters. */ -export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationListResult; - -/** Optional parameters. */ -export interface BareMetalMachinesListBySubscriptionOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type BareMetalMachinesListBySubscriptionResponse = BareMetalMachineList; - -/** Optional parameters. */ -export interface BareMetalMachinesListByResourceGroupOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByResourceGroup operation. */ -export type BareMetalMachinesListByResourceGroupResponse = BareMetalMachineList; - -/** Optional parameters. */ -export interface BareMetalMachinesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type BareMetalMachinesGetResponse = BareMetalMachine; - -/** Optional parameters. */ -export interface BareMetalMachinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type BareMetalMachinesCreateOrUpdateResponse = BareMetalMachine; - -/** Optional parameters. */ -export interface BareMetalMachinesDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type BareMetalMachinesDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface BareMetalMachinesUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - bareMetalMachineUpdateParameters?: BareMetalMachinePatchParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type BareMetalMachinesUpdateResponse = BareMetalMachine; - -/** Optional parameters. */ -export interface BareMetalMachinesCordonOptionalParams extends coreClient.OperationOptions { - /** The request body. */ - bareMetalMachineCordonParameters?: BareMetalMachineCordonParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the cordon operation. */ -export type BareMetalMachinesCordonResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface BareMetalMachinesPowerOffOptionalParams extends coreClient.OperationOptions { - /** The request body. */ - bareMetalMachinePowerOffParameters?: BareMetalMachinePowerOffParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the powerOff operation. */ -export type BareMetalMachinesPowerOffResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface BareMetalMachinesReimageOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the reimage operation. */ -export type BareMetalMachinesReimageResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface BareMetalMachinesReplaceOptionalParams extends coreClient.OperationOptions { - /** The request body. */ - bareMetalMachineReplaceParameters?: BareMetalMachineReplaceParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the replace operation. */ -export type BareMetalMachinesReplaceResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface BareMetalMachinesRestartOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the restart operation. */ -export type BareMetalMachinesRestartResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface BareMetalMachinesRunCommandOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the runCommand operation. */ -export type BareMetalMachinesRunCommandResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface BareMetalMachinesRunDataExtractsOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the runDataExtracts operation. */ -export type BareMetalMachinesRunDataExtractsResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface BareMetalMachinesRunDataExtractsRestrictedOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the runDataExtractsRestricted operation. */ -export type BareMetalMachinesRunDataExtractsRestrictedResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface BareMetalMachinesRunReadCommandsOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the runReadCommands operation. */ -export type BareMetalMachinesRunReadCommandsResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface BareMetalMachinesStartOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the start operation. */ -export type BareMetalMachinesStartResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface BareMetalMachinesUncordonOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the uncordon operation. */ -export type BareMetalMachinesUncordonResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface BareMetalMachinesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type BareMetalMachinesListBySubscriptionNextResponse = BareMetalMachineList; - -/** Optional parameters. */ -export interface BareMetalMachinesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type BareMetalMachinesListByResourceGroupNextResponse = BareMetalMachineList; - -/** Optional parameters. */ -export interface CloudServicesNetworksListBySubscriptionOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type CloudServicesNetworksListBySubscriptionResponse = CloudServicesNetworkList; - -/** Optional parameters. */ -export interface CloudServicesNetworksListByResourceGroupOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByResourceGroup operation. */ -export type CloudServicesNetworksListByResourceGroupResponse = CloudServicesNetworkList; - -/** Optional parameters. */ -export interface CloudServicesNetworksGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type CloudServicesNetworksGetResponse = CloudServicesNetwork; - -/** Optional parameters. */ -export interface CloudServicesNetworksCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type CloudServicesNetworksCreateOrUpdateResponse = CloudServicesNetwork; - -/** Optional parameters. */ -export interface CloudServicesNetworksDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type CloudServicesNetworksDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface CloudServicesNetworksUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - cloudServicesNetworkUpdateParameters?: CloudServicesNetworkPatchParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type CloudServicesNetworksUpdateResponse = CloudServicesNetwork; - -/** Optional parameters. */ -export interface CloudServicesNetworksListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type CloudServicesNetworksListBySubscriptionNextResponse = CloudServicesNetworkList; - -/** Optional parameters. */ -export interface CloudServicesNetworksListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type CloudServicesNetworksListByResourceGroupNextResponse = CloudServicesNetworkList; - -/** Optional parameters. */ -export interface ClusterManagersListBySubscriptionOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type ClusterManagersListBySubscriptionResponse = ClusterManagerList; - -/** Optional parameters. */ -export interface ClusterManagersListByResourceGroupOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByResourceGroup operation. */ -export type ClusterManagersListByResourceGroupResponse = ClusterManagerList; - -/** Optional parameters. */ -export interface ClusterManagersGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ClusterManagersGetResponse = ClusterManager; - -/** Optional parameters. */ -export interface ClusterManagersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ClusterManagersCreateOrUpdateResponse = ClusterManager; - -/** Optional parameters. */ -export interface ClusterManagersDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type ClusterManagersDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface ClusterManagersUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - clusterManagerUpdateParameters?: ClusterManagerPatchParameters; -} - -/** Contains response data for the update operation. */ -export type ClusterManagersUpdateResponse = ClusterManager; - -/** Optional parameters. */ -export interface ClusterManagersListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type ClusterManagersListBySubscriptionNextResponse = ClusterManagerList; - -/** Optional parameters. */ -export interface ClusterManagersListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ClusterManagersListByResourceGroupNextResponse = ClusterManagerList; - -/** Optional parameters. */ -export interface ClustersListBySubscriptionOptionalParams extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type ClustersListBySubscriptionResponse = ClusterList; - -/** Optional parameters. */ -export interface ClustersListByResourceGroupOptionalParams extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByResourceGroup operation. */ -export type ClustersListByResourceGroupResponse = ClusterList; - -/** Optional parameters. */ -export interface ClustersGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ClustersGetResponse = Cluster; - -/** Optional parameters. */ -export interface ClustersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ClustersCreateOrUpdateResponse = Cluster; - -/** Optional parameters. */ -export interface ClustersDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type ClustersDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface ClustersUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - clusterUpdateParameters?: ClusterPatchParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type ClustersUpdateResponse = Cluster; - -/** Optional parameters. */ -export interface ClustersContinueUpdateVersionOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the continueUpdateVersion operation. */ -export type ClustersContinueUpdateVersionResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface ClustersDeployOptionalParams extends coreClient.OperationOptions { - /** The request body. */ - clusterDeployParameters?: ClusterDeployParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the deploy operation. */ -export type ClustersDeployResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface ClustersScanRuntimeOptionalParams extends coreClient.OperationOptions { - /** The request body. */ - clusterScanRuntimeParameters?: ClusterScanRuntimeParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the scanRuntime operation. */ -export type ClustersScanRuntimeResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface ClustersUpdateVersionOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the updateVersion operation. */ -export type ClustersUpdateVersionResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface ClustersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type ClustersListBySubscriptionNextResponse = ClusterList; - -/** Optional parameters. */ -export interface ClustersListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ClustersListByResourceGroupNextResponse = ClusterList; - -/** Optional parameters. */ -export interface KubernetesClustersListBySubscriptionOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type KubernetesClustersListBySubscriptionResponse = KubernetesClusterList; - -/** Optional parameters. */ -export interface KubernetesClustersListByResourceGroupOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByResourceGroup operation. */ -export type KubernetesClustersListByResourceGroupResponse = KubernetesClusterList; - -/** Optional parameters. */ -export interface KubernetesClustersGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type KubernetesClustersGetResponse = KubernetesCluster; - -/** Optional parameters. */ -export interface KubernetesClustersCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type KubernetesClustersCreateOrUpdateResponse = KubernetesCluster; - -/** Optional parameters. */ -export interface KubernetesClustersDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type KubernetesClustersDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface KubernetesClustersUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - kubernetesClusterUpdateParameters?: KubernetesClusterPatchParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type KubernetesClustersUpdateResponse = KubernetesCluster; - -/** Optional parameters. */ -export interface KubernetesClustersRestartNodeOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the restartNode operation. */ -export type KubernetesClustersRestartNodeResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface KubernetesClustersListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type KubernetesClustersListBySubscriptionNextResponse = KubernetesClusterList; - -/** Optional parameters. */ -export interface KubernetesClustersListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type KubernetesClustersListByResourceGroupNextResponse = KubernetesClusterList; - -/** Optional parameters. */ -export interface L2NetworksListBySubscriptionOptionalParams extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type L2NetworksListBySubscriptionResponse = L2NetworkList; - -/** Optional parameters. */ -export interface L2NetworksListByResourceGroupOptionalParams extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByResourceGroup operation. */ -export type L2NetworksListByResourceGroupResponse = L2NetworkList; - -/** Optional parameters. */ -export interface L2NetworksGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type L2NetworksGetResponse = L2Network; - -/** Optional parameters. */ -export interface L2NetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type L2NetworksCreateOrUpdateResponse = L2Network; - -/** Optional parameters. */ -export interface L2NetworksDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type L2NetworksDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface L2NetworksUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - l2NetworkUpdateParameters?: L2NetworkPatchParameters; -} - -/** Contains response data for the update operation. */ -export type L2NetworksUpdateResponse = L2Network; - -/** Optional parameters. */ -export interface L2NetworksListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type L2NetworksListBySubscriptionNextResponse = L2NetworkList; - -/** Optional parameters. */ -export interface L2NetworksListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type L2NetworksListByResourceGroupNextResponse = L2NetworkList; - -/** Optional parameters. */ -export interface L3NetworksListBySubscriptionOptionalParams extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type L3NetworksListBySubscriptionResponse = L3NetworkList; - -/** Optional parameters. */ -export interface L3NetworksListByResourceGroupOptionalParams extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByResourceGroup operation. */ -export type L3NetworksListByResourceGroupResponse = L3NetworkList; - -/** Optional parameters. */ -export interface L3NetworksGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type L3NetworksGetResponse = L3Network; - -/** Optional parameters. */ -export interface L3NetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type L3NetworksCreateOrUpdateResponse = L3Network; - -/** Optional parameters. */ -export interface L3NetworksDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type L3NetworksDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface L3NetworksUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - l3NetworkUpdateParameters?: L3NetworkPatchParameters; -} - -/** Contains response data for the update operation. */ -export type L3NetworksUpdateResponse = L3Network; - -/** Optional parameters. */ -export interface L3NetworksListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type L3NetworksListBySubscriptionNextResponse = L3NetworkList; - -/** Optional parameters. */ -export interface L3NetworksListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type L3NetworksListByResourceGroupNextResponse = L3NetworkList; - -/** Optional parameters. */ -export interface RackSkusListBySubscriptionOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type RackSkusListBySubscriptionResponse = RackSkuList; - -/** Optional parameters. */ -export interface RackSkusGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type RackSkusGetResponse = RackSku; - -/** Optional parameters. */ -export interface RackSkusListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type RackSkusListBySubscriptionNextResponse = RackSkuList; - -/** Optional parameters. */ -export interface RacksListBySubscriptionOptionalParams extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type RacksListBySubscriptionResponse = RackList; - -/** Optional parameters. */ -export interface RacksListByResourceGroupOptionalParams extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByResourceGroup operation. */ -export type RacksListByResourceGroupResponse = RackList; - -/** Optional parameters. */ -export interface RacksGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type RacksGetResponse = Rack; - -/** Optional parameters. */ -export interface RacksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type RacksCreateOrUpdateResponse = Rack; - -/** Optional parameters. */ -export interface RacksDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type RacksDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface RacksUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - rackUpdateParameters?: RackPatchParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type RacksUpdateResponse = Rack; - -/** Optional parameters. */ -export interface RacksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type RacksListBySubscriptionNextResponse = RackList; - -/** Optional parameters. */ -export interface RacksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type RacksListByResourceGroupNextResponse = RackList; - -/** Optional parameters. */ -export interface StorageAppliancesListBySubscriptionOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type StorageAppliancesListBySubscriptionResponse = StorageApplianceList; - -/** Optional parameters. */ -export interface StorageAppliancesListByResourceGroupOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByResourceGroup operation. */ -export type StorageAppliancesListByResourceGroupResponse = StorageApplianceList; - -/** Optional parameters. */ -export interface StorageAppliancesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type StorageAppliancesGetResponse = StorageAppliance; - -/** Optional parameters. */ -export interface StorageAppliancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type StorageAppliancesCreateOrUpdateResponse = StorageAppliance; - -/** Optional parameters. */ -export interface StorageAppliancesDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type StorageAppliancesDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface StorageAppliancesUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - storageApplianceUpdateParameters?: StorageAppliancePatchParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type StorageAppliancesUpdateResponse = StorageAppliance; - -/** Optional parameters. */ -export interface StorageAppliancesDisableRemoteVendorManagementOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the disableRemoteVendorManagement operation. */ -export type StorageAppliancesDisableRemoteVendorManagementResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface StorageAppliancesEnableRemoteVendorManagementOptionalParams - extends coreClient.OperationOptions { - /** The request body. */ - storageApplianceEnableRemoteVendorManagementParameters?: StorageApplianceEnableRemoteVendorManagementParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the enableRemoteVendorManagement operation. */ -export type StorageAppliancesEnableRemoteVendorManagementResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface StorageAppliancesRunReadCommandsOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the runReadCommands operation. */ -export type StorageAppliancesRunReadCommandsResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface StorageAppliancesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type StorageAppliancesListBySubscriptionNextResponse = StorageApplianceList; - -/** Optional parameters. */ -export interface StorageAppliancesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type StorageAppliancesListByResourceGroupNextResponse = StorageApplianceList; - -/** Optional parameters. */ -export interface TrunkedNetworksListBySubscriptionOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type TrunkedNetworksListBySubscriptionResponse = TrunkedNetworkList; - -/** Optional parameters. */ -export interface TrunkedNetworksListByResourceGroupOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByResourceGroup operation. */ -export type TrunkedNetworksListByResourceGroupResponse = TrunkedNetworkList; - -/** Optional parameters. */ -export interface TrunkedNetworksGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type TrunkedNetworksGetResponse = TrunkedNetwork; - -/** Optional parameters. */ -export interface TrunkedNetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type TrunkedNetworksCreateOrUpdateResponse = TrunkedNetwork; - -/** Optional parameters. */ -export interface TrunkedNetworksDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type TrunkedNetworksDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface TrunkedNetworksUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - trunkedNetworkUpdateParameters?: TrunkedNetworkPatchParameters; -} - -/** Contains response data for the update operation. */ -export type TrunkedNetworksUpdateResponse = TrunkedNetwork; - -/** Optional parameters. */ -export interface TrunkedNetworksListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type TrunkedNetworksListBySubscriptionNextResponse = TrunkedNetworkList; - -/** Optional parameters. */ -export interface TrunkedNetworksListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type TrunkedNetworksListByResourceGroupNextResponse = TrunkedNetworkList; - -/** Optional parameters. */ -export interface VirtualMachinesListBySubscriptionOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type VirtualMachinesListBySubscriptionResponse = VirtualMachineList; - -/** Optional parameters. */ -export interface VirtualMachinesListByResourceGroupOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByResourceGroup operation. */ -export type VirtualMachinesListByResourceGroupResponse = VirtualMachineList; - -/** Optional parameters. */ -export interface VirtualMachinesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VirtualMachinesGetResponse = VirtualMachine; - -/** Optional parameters. */ -export interface VirtualMachinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type VirtualMachinesCreateOrUpdateResponse = VirtualMachine; - -/** Optional parameters. */ -export interface VirtualMachinesDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type VirtualMachinesDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface VirtualMachinesUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - virtualMachineUpdateParameters?: VirtualMachinePatchParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type VirtualMachinesUpdateResponse = VirtualMachine; - -/** Optional parameters. */ -export interface VirtualMachinesAssignRelayOptionalParams extends coreClient.OperationOptions { - /** The request body. */ - virtualMachineAssignRelayParameters?: VirtualMachineAssignRelayParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the assignRelay operation. */ -export type VirtualMachinesAssignRelayResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface VirtualMachinesPowerOffOptionalParams extends coreClient.OperationOptions { - /** The request body. */ - virtualMachinePowerOffParameters?: VirtualMachinePowerOffParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the powerOff operation. */ -export type VirtualMachinesPowerOffResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface VirtualMachinesReimageOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the reimage operation. */ -export type VirtualMachinesReimageResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface VirtualMachinesRestartOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the restart operation. */ -export type VirtualMachinesRestartResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface VirtualMachinesStartOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the start operation. */ -export type VirtualMachinesStartResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface VirtualMachinesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type VirtualMachinesListBySubscriptionNextResponse = VirtualMachineList; - -/** Optional parameters. */ -export interface VirtualMachinesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type VirtualMachinesListByResourceGroupNextResponse = VirtualMachineList; - -/** Optional parameters. */ -export interface VolumesListBySubscriptionOptionalParams extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type VolumesListBySubscriptionResponse = VolumeList; - -/** Optional parameters. */ -export interface VolumesListByResourceGroupOptionalParams extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByResourceGroup operation. */ -export type VolumesListByResourceGroupResponse = VolumeList; - -/** Optional parameters. */ -export interface VolumesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type VolumesGetResponse = Volume; - -/** Optional parameters. */ -export interface VolumesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type VolumesCreateOrUpdateResponse = Volume; - -/** Optional parameters. */ -export interface VolumesDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type VolumesDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface VolumesUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - volumeUpdateParameters?: VolumePatchParameters; -} - -/** Contains response data for the update operation. */ -export type VolumesUpdateResponse = Volume; - -/** Optional parameters. */ -export interface VolumesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type VolumesListBySubscriptionNextResponse = VolumeList; - -/** Optional parameters. */ -export interface VolumesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type VolumesListByResourceGroupNextResponse = VolumeList; - -/** Optional parameters. */ -export interface BareMetalMachineKeySetsListByClusterOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByCluster operation. */ -export type BareMetalMachineKeySetsListByClusterResponse = BareMetalMachineKeySetList; - -/** Optional parameters. */ -export interface BareMetalMachineKeySetsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type BareMetalMachineKeySetsGetResponse = BareMetalMachineKeySet; - -/** Optional parameters. */ -export interface BareMetalMachineKeySetsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type BareMetalMachineKeySetsCreateOrUpdateResponse = BareMetalMachineKeySet; - -/** Optional parameters. */ -export interface BareMetalMachineKeySetsDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type BareMetalMachineKeySetsDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface BareMetalMachineKeySetsUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - bareMetalMachineKeySetUpdateParameters?: BareMetalMachineKeySetPatchParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type BareMetalMachineKeySetsUpdateResponse = BareMetalMachineKeySet; - -/** Optional parameters. */ -export interface BareMetalMachineKeySetsListByClusterNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByClusterNext operation. */ -export type BareMetalMachineKeySetsListByClusterNextResponse = BareMetalMachineKeySetList; - -/** Optional parameters. */ -export interface BmcKeySetsListByClusterOptionalParams extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByCluster operation. */ -export type BmcKeySetsListByClusterResponse = BmcKeySetList; - -/** Optional parameters. */ -export interface BmcKeySetsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type BmcKeySetsGetResponse = BmcKeySet; - -/** Optional parameters. */ -export interface BmcKeySetsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type BmcKeySetsCreateOrUpdateResponse = BmcKeySet; - -/** Optional parameters. */ -export interface BmcKeySetsDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type BmcKeySetsDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface BmcKeySetsUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - bmcKeySetUpdateParameters?: BmcKeySetPatchParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type BmcKeySetsUpdateResponse = BmcKeySet; - -/** Optional parameters. */ -export interface BmcKeySetsListByClusterNextOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the listByClusterNext operation. */ -export type BmcKeySetsListByClusterNextResponse = BmcKeySetList; - -/** Optional parameters. */ -export interface MetricsConfigurationsListByClusterOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByCluster operation. */ -export type MetricsConfigurationsListByClusterResponse = ClusterMetricsConfigurationList; - -/** Optional parameters. */ -export interface MetricsConfigurationsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type MetricsConfigurationsGetResponse = ClusterMetricsConfiguration; - -/** Optional parameters. */ -export interface MetricsConfigurationsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type MetricsConfigurationsCreateOrUpdateResponse = ClusterMetricsConfiguration; - -/** Optional parameters. */ -export interface MetricsConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type MetricsConfigurationsDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface MetricsConfigurationsUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - metricsConfigurationUpdateParameters?: ClusterMetricsConfigurationPatchParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type MetricsConfigurationsUpdateResponse = ClusterMetricsConfiguration; - -/** Optional parameters. */ -export interface MetricsConfigurationsListByClusterNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByClusterNext operation. */ -export type MetricsConfigurationsListByClusterNextResponse = ClusterMetricsConfigurationList; - -/** Optional parameters. */ -export interface AgentPoolsListByKubernetesClusterOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByKubernetesCluster operation. */ -export type AgentPoolsListByKubernetesClusterResponse = AgentPoolList; - -/** Optional parameters. */ -export interface AgentPoolsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AgentPoolsGetResponse = AgentPool; - -/** Optional parameters. */ -export interface AgentPoolsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type AgentPoolsCreateOrUpdateResponse = AgentPool; - -/** Optional parameters. */ -export interface AgentPoolsDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type AgentPoolsDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface AgentPoolsUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - agentPoolUpdateParameters?: AgentPoolPatchParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type AgentPoolsUpdateResponse = AgentPool; - -/** Optional parameters. */ -export interface AgentPoolsListByKubernetesClusterNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByKubernetesClusterNext operation. */ -export type AgentPoolsListByKubernetesClusterNextResponse = AgentPoolList; - -/** Optional parameters. */ -export interface KubernetesClusterFeaturesListByKubernetesClusterOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByKubernetesCluster operation. */ -export type KubernetesClusterFeaturesListByKubernetesClusterResponse = KubernetesClusterFeatureList; - -/** Optional parameters. */ -export interface KubernetesClusterFeaturesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type KubernetesClusterFeaturesGetResponse = KubernetesClusterFeature; - -/** Optional parameters. */ -export interface KubernetesClusterFeaturesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type KubernetesClusterFeaturesCreateOrUpdateResponse = KubernetesClusterFeature; - -/** Optional parameters. */ -export interface KubernetesClusterFeaturesDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type KubernetesClusterFeaturesDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface KubernetesClusterFeaturesUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - kubernetesClusterFeatureUpdateParameters?: KubernetesClusterFeaturePatchParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type KubernetesClusterFeaturesUpdateResponse = KubernetesClusterFeature; - -/** Optional parameters. */ -export interface KubernetesClusterFeaturesListByKubernetesClusterNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByKubernetesClusterNext operation. */ -export type KubernetesClusterFeaturesListByKubernetesClusterNextResponse = - KubernetesClusterFeatureList; - -/** Optional parameters. */ -export interface ConsolesListByVirtualMachineOptionalParams extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; - /** The opaque token that the server returns to indicate where to continue listing resources from. This is used for paging through large result sets. */ - skipToken?: string; -} - -/** Contains response data for the listByVirtualMachine operation. */ -export type ConsolesListByVirtualMachineResponse = ConsoleList; - -/** Optional parameters. */ -export interface ConsolesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ConsolesGetResponse = Console; - -/** Optional parameters. */ -export interface ConsolesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ConsolesCreateOrUpdateResponse = Console; - -/** Optional parameters. */ -export interface ConsolesDeleteOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type ConsolesDeleteResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface ConsolesUpdateOptionalParams extends coreClient.OperationOptions { - /** The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. */ - ifMatch?: string; - /** Set to '*' to allow a new record set to be created, but to prevent updating an existing resource. Other values will result in error from server as they are not supported. */ - ifNoneMatch?: string; - /** The request body. */ - consoleUpdateParameters?: ConsolePatchParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type ConsolesUpdateResponse = Console; - -/** Optional parameters. */ -export interface ConsolesListByVirtualMachineNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByVirtualMachineNext operation. */ -export type ConsolesListByVirtualMachineNextResponse = ConsoleList; - -/** Optional parameters. */ -export interface NetworkCloudOptionalParams extends coreClient.ServiceClientOptions { - /** server parameter */ - $host?: string; - /** Api Version */ - apiVersion?: string; - /** Overrides client endpoint. */ - endpoint?: string; -} +export type { + Operation, + OperationDisplay, + Origin, + ActionType, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, + AccessBridge, + AccessBridgeProperties, + AccessBridgeSecurityRule, + SecurityRuleDirection, + AccessBridgeDetailedStatus, + AccessBridgeEndpoint, + TransportProtocol, + AccessBridgeProvisioningState, + AccessBridgeAllowedName, + ExtendedLocation, + ExtendedLocationType, + TrackedResource, + Resource, + SystemData, + CreatedByType, + AccessBridgePatchParameters, + AccessBridgePatchProperties, + OperationStatusResult, + OperationStatusResultProperties, + BareMetalMachine, + BareMetalMachineProperties, + AdministrativeCredentials, + ActionState, + ActionStateStatus, + StepState, + StepStateStatus, + CertificateInfo, + BareMetalMachineCordonStatus, + BareMetalMachineDetailedStatus, + HardwareInventory, + HardwareInventoryNetworkInterface, + Nic, + LldpNeighbor, + HardwareValidationStatus, + BareMetalMachineHardwareValidationResult, + BareMetalMachineMonitoringConfigurationStatus, + BareMetalMachineMetricsConfigurationStatusLogLevel, + BareMetalMachineMetricsConfigurationStatusMetricsLevel, + BareMetalMachinePowerState, + BareMetalMachineReadyState, + RuntimeProtectionStatus, + RuntimeProtectionAgentHealthStatus, + RuntimeProtectionAgentLicenseStatus, + RuntimeProtectionDefinitionUpdateMode, + RuntimeProtectionEnforcementLevel, + SecretRotationStatus, + SecretArchiveReference, + BareMetalMachineProvisioningState, + BareMetalMachinePatchParameters, + BareMetalMachinePatchProperties, + BareMetalMachineCordonParameters, + BareMetalMachineEvacuate, + BareMetalMachinePowerOffParameters, + BareMetalMachineSkipShutdown, + BareMetalMachineReimageParameters, + BareMetalMachineReimageSafeguardMode, + BareMetalMachineReplaceParameters, + BareMetalMachineReplaceSafeguardMode, + BareMetalMachineReplaceStoragePolicy, + BareMetalMachineRunCommandParameters, + BareMetalMachineRunDataExtractsParameters, + BareMetalMachineCommandSpecification, + BareMetalMachineRunReadCommandsParameters, + CloudServicesNetwork, + CloudServicesNetworkProperties, + EgressEndpoint, + EndpointDependency, + CloudServicesNetworkEnableDefaultEgressEndpoints, + CloudServicesNetworkStorageOptions, + CloudServicesNetworkStorageMode, + CloudServicesNetworkDetailedStatus, + CloudServicesNetworkStorageStatus, + CloudServicesNetworkStorageStatusStatus, + CloudServicesNetworkProvisioningState, + CloudServicesNetworkPatchParameters, + CloudServicesNetworkPatchProperties, + CloudServicesNetworkStorageOptionsPatch, + ClusterManager, + ClusterManagerProperties, + ClusterAvailableVersion, + ClusterManagerDetailedStatus, + ManagedResourceGroupConfiguration, + ClusterManagerProvisioningState, + ClusterManagerRelayConfiguration, + ManagedServiceIdentity, + ManagedServiceIdentityType, + UserAssignedIdentity, + DeploymentType, + ClusterManagerPatchParameters, + ClusterManagerUpdateRelayPrivateEndpointConnectionParameters, + RelayPrivateEndpointConnectionState, + Cluster, + ClusterProperties, + RackDefinition, + BareMetalMachineConfigurationData, + StorageApplianceConfigurationData, + AnalyticsOutputSettings, + IdentitySelector, + ManagedServiceIdentitySelectorType, + ServicePrincipalInformation, + ClusterType, + CommandOutputSettings, + CommandOutputOverride, + CommandOutputType, + ValidationThreshold, + ValidationThresholdGrouping, + ValidationThresholdType, + RuntimeProtectionConfiguration, + ClusterSecretArchive, + ClusterSecretArchiveEnabled, + SecretArchiveSettings, + ClusterUpdateStrategy, + ClusterUpdateStrategyType, + VulnerabilityScanningSettings, + VulnerabilityScanningSettingsContainerScan, + ClusterAvailableUpgradeVersion, + ControlImpact, + WorkloadImpact, + ClusterCapacity, + ClusterConnectionStatus, + ClusterManagerConnectionStatus, + ClusterDetailedStatus, + ClusterProvisioningState, + ClusterPatchParameters, + ClusterPatchProperties, + VulnerabilityScanningSettingsPatch, + ClusterContinueUpdateVersionParameters, + ClusterContinueUpdateVersionMachineGroupTargetingMode, + ClusterContinueUpdateVersionSafeguardMode, + ClusterDeployParameters, + ClusterInspectParameters, + ClusterInspectAdditionalAction, + FilterDevices, + ClusterRotateCredentialParameters, + ClusterScanRuntimeParameters, + ClusterScanRuntimeParametersScanActivity, + ClusterUpdateVersionParameters, + ClusterUpdateVersionSafeguardMode, + KubernetesCluster, + KubernetesClusterProperties, + AadConfiguration, + AdministratorConfiguration, + SshPublicKey, + ControlPlaneNodeConfiguration, + InitialAgentPoolConfiguration, + AgentOptions, + HugepagesSize, + AttachedNetworkConfiguration, + L2NetworkAttachmentConfiguration, + KubernetesPluginType, + L3NetworkAttachmentConfiguration, + L3NetworkConfigurationIpamEnabled, + TrunkedNetworkAttachmentConfiguration, + KubernetesLabel, + AgentPoolMode, + AgentPoolUpgradeSettings, + NetworkConfiguration, + BgpServiceLoadBalancerConfiguration, + BgpAdvertisement, + AdvertiseToFabric, + ServiceLoadBalancerBgpPeer, + BfdEnabled, + BgpMultiHop, + FabricPeeringEnabled, + IpAddressPool, + L2ServiceLoadBalancerConfiguration, + AvailableUpgrade, + AvailabilityLifecycle, + KubernetesClusterDetailedStatus, + FeatureStatus, + FeatureDetailedStatus, + KubernetesClusterNode, + KubernetesClusterNodeDetailedStatus, + NetworkAttachment, + DefaultGateway, + VirtualMachineIPAllocationMethod, + KubernetesNodePowerState, + KubernetesNodeRole, + KubernetesClusterProvisioningState, + KubernetesClusterPatchParameters, + KubernetesClusterPatchProperties, + AdministratorConfigurationPatch, + ControlPlaneNodePatchConfiguration, + KubernetesClusterRestartNodeParameters, + KubernetesVersion, + KubernetesVersionProperties, + KubernetesVersionValue, + KubernetesVersionProvisioningState, + KubernetesVersionPatchParameters, + L2Network, + L2NetworkProperties, + HybridAksPluginType, + L2NetworkDetailedStatus, + L2NetworkProvisioningState, + L2NetworkPatchParameters, + L3Network, + L3NetworkProperties, + HybridAksIpamEnabled, + IpAllocationType, + L3NetworkDetailedStatus, + L3NetworkProvisioningState, + L3NetworkPatchParameters, + RackSku, + RackSkuProperties, + MachineSkuSlot, + MachineSkuProperties, + BootstrapProtocol, + MachineDisk, + MachineSkuDiskConnectionType, + DiskType, + NetworkInterface, + DeviceConnectionType, + RackSkuProvisioningState, + RackSkuType, + StorageApplianceSkuSlot, + StorageApplianceSkuProperties, + ProxyResource, + Rack, + RackProperties, + RackDetailedStatus, + RackProvisioningState, + RackPatchParameters, + RacksPatchProperties, + StorageAppliance, + StorageApplianceProperties, + StorageApplianceDetailedStatus, + StorageApplianceExpansionShelf, + StorageApplianceMonitoringConfigurationStatus, + StorageApplianceMetricsConfigurationStatusLogLevel, + StorageApplianceMetricsConfigurationStatusMetricsLevel, + RemoteVendorManagementFeature, + RemoteVendorManagementStatus, + StorageApplianceProvisioningState, + StorageAppliancePatchParameters, + StorageAppliancePatchProperties, + StorageApplianceEnableRemoteVendorManagementParameters, + StorageApplianceRunReadCommandsParameters, + StorageApplianceCommandSpecification, + TrunkedNetwork, + TrunkedNetworkProperties, + TrunkedNetworkDetailedStatus, + TrunkedNetworkProvisioningState, + TrunkedNetworkPatchParameters, + VirtualMachine, + VirtualMachineProperties, + VirtualMachineBootMethod, + VirtualMachineIsolateEmulatorThread, + VirtualMachinePlacementHint, + VirtualMachinePlacementHintType, + VirtualMachineSchedulingExecution, + VirtualMachinePlacementHintPodAffinityScope, + StorageProfile, + OsDisk, + OsDiskCreateOption, + OsDiskDeleteOption, + VirtualMachineVirtioInterfaceType, + VirtualMachineDeviceModelType, + ImageRepositoryCredentials, + VirtualMachineDetailedStatus, + VirtualMachinePowerState, + VirtualMachineProvisioningState, + VirtualMachinePatchParameters, + VirtualMachinePatchProperties, + VirtualMachineAssignRelayParameters, + RelayType, + VirtualMachinePowerOffParameters, + SkipShutdown, + Volume, + VolumeProperties, + VolumeDetailedStatus, + VolumeProvisioningState, + VolumePatchParameters, + BareMetalMachineKeySet, + BareMetalMachineKeySetProperties, + BareMetalMachineKeySetPrivilegeLevel, + KeySetUser, + BareMetalMachineKeySetDetailedStatus, + KeySetUserStatus, + BareMetalMachineKeySetUserSetupStatus, + BareMetalMachineKeySetProvisioningState, + BareMetalMachineKeySetPatchParameters, + BareMetalMachineKeySetPatchProperties, + BmcKeySet, + BmcKeySetProperties, + BmcKeySetPrivilegeLevel, + BmcKeySetDetailedStatus, + BmcKeySetProvisioningState, + BmcKeySetPatchParameters, + BmcKeySetPatchProperties, + AgentPool, + AgentPoolProperties, + AgentPoolDetailedStatus, + AgentPoolProvisioningState, + AgentPoolPatchParameters, + AgentPoolPatchProperties, + NodePoolAdministratorConfigurationPatch, + KubernetesClusterFeature, + KubernetesClusterFeatureProperties, + StringKeyValuePair, + KubernetesClusterFeatureAvailabilityLifecycle, + KubernetesClusterFeatureDetailedStatus, + KubernetesClusterFeatureRequired, + KubernetesClusterFeatureProvisioningState, + KubernetesClusterFeaturePatchParameters, + KubernetesClusterFeaturePatchProperties, + Console, + ConsoleProperties, + ConsoleEnabled, + ConsoleDetailedStatus, + ConsoleProvisioningState, + ConsolePatchParameters, + ConsolePatchProperties, + ClusterMetricsConfiguration, + ClusterMetricsConfigurationProperties, + ClusterMetricsConfigurationDetailedStatus, + ClusterMetricsConfigurationProvisioningState, + ClusterMetricsConfigurationPatchParameters, + ClusterMetricsConfigurationPatchProperties, +} from "./models.js"; +export { + KnownOrigin, + KnownActionType, + KnownSecurityRuleDirection, + KnownAccessBridgeDetailedStatus, + KnownTransportProtocol, + KnownAccessBridgeProvisioningState, + KnownAccessBridgeAllowedName, + KnownExtendedLocationType, + KnownCreatedByType, + KnownActionStateStatus, + KnownStepStateStatus, + KnownBareMetalMachineCordonStatus, + KnownBareMetalMachineDetailedStatus, + KnownBareMetalMachineHardwareValidationResult, + KnownBareMetalMachineMetricsConfigurationStatusLogLevel, + KnownBareMetalMachineMetricsConfigurationStatusMetricsLevel, + KnownBareMetalMachinePowerState, + KnownBareMetalMachineReadyState, + KnownRuntimeProtectionAgentHealthStatus, + KnownRuntimeProtectionAgentLicenseStatus, + KnownRuntimeProtectionDefinitionUpdateMode, + KnownRuntimeProtectionEnforcementLevel, + KnownBareMetalMachineProvisioningState, + KnownBareMetalMachineEvacuate, + KnownBareMetalMachineSkipShutdown, + KnownBareMetalMachineReimageSafeguardMode, + KnownBareMetalMachineReplaceSafeguardMode, + KnownBareMetalMachineReplaceStoragePolicy, + KnownCloudServicesNetworkEnableDefaultEgressEndpoints, + KnownCloudServicesNetworkStorageMode, + KnownCloudServicesNetworkDetailedStatus, + KnownCloudServicesNetworkStorageStatusStatus, + KnownCloudServicesNetworkProvisioningState, + KnownClusterManagerDetailedStatus, + KnownClusterManagerProvisioningState, + KnownManagedServiceIdentityType, + KnownDeploymentType, + KnownRelayPrivateEndpointConnectionState, + KnownManagedServiceIdentitySelectorType, + KnownClusterType, + KnownCommandOutputType, + KnownValidationThresholdGrouping, + KnownValidationThresholdType, + KnownClusterSecretArchiveEnabled, + KnownClusterUpdateStrategyType, + KnownVulnerabilityScanningSettingsContainerScan, + KnownControlImpact, + KnownWorkloadImpact, + KnownClusterConnectionStatus, + KnownClusterManagerConnectionStatus, + KnownClusterDetailedStatus, + KnownClusterProvisioningState, + KnownClusterContinueUpdateVersionMachineGroupTargetingMode, + KnownClusterContinueUpdateVersionSafeguardMode, + KnownClusterInspectAdditionalAction, + KnownClusterScanRuntimeParametersScanActivity, + KnownClusterUpdateVersionSafeguardMode, + KnownHugepagesSize, + KnownKubernetesPluginType, + KnownL3NetworkConfigurationIpamEnabled, + KnownAgentPoolMode, + KnownAdvertiseToFabric, + KnownBfdEnabled, + KnownBgpMultiHop, + KnownFabricPeeringEnabled, + KnownAvailabilityLifecycle, + KnownKubernetesClusterDetailedStatus, + KnownFeatureDetailedStatus, + KnownKubernetesClusterNodeDetailedStatus, + KnownDefaultGateway, + KnownVirtualMachineIPAllocationMethod, + KnownKubernetesNodePowerState, + KnownKubernetesNodeRole, + KnownKubernetesClusterProvisioningState, + KnownKubernetesVersionProvisioningState, + KnownHybridAksPluginType, + KnownL2NetworkDetailedStatus, + KnownL2NetworkProvisioningState, + KnownHybridAksIpamEnabled, + KnownIpAllocationType, + KnownL3NetworkDetailedStatus, + KnownL3NetworkProvisioningState, + KnownBootstrapProtocol, + KnownMachineSkuDiskConnectionType, + KnownDiskType, + KnownDeviceConnectionType, + KnownRackSkuProvisioningState, + KnownRackSkuType, + KnownRackDetailedStatus, + KnownRackProvisioningState, + KnownStorageApplianceDetailedStatus, + KnownStorageApplianceMetricsConfigurationStatusLogLevel, + KnownStorageApplianceMetricsConfigurationStatusMetricsLevel, + KnownRemoteVendorManagementFeature, + KnownRemoteVendorManagementStatus, + KnownStorageApplianceProvisioningState, + KnownTrunkedNetworkDetailedStatus, + KnownTrunkedNetworkProvisioningState, + KnownVirtualMachineBootMethod, + KnownVirtualMachineIsolateEmulatorThread, + KnownVirtualMachinePlacementHintType, + KnownVirtualMachineSchedulingExecution, + KnownVirtualMachinePlacementHintPodAffinityScope, + KnownOsDiskCreateOption, + KnownOsDiskDeleteOption, + KnownVirtualMachineVirtioInterfaceType, + KnownVirtualMachineDeviceModelType, + KnownVirtualMachineDetailedStatus, + KnownVirtualMachinePowerState, + KnownVirtualMachineProvisioningState, + KnownRelayType, + KnownSkipShutdown, + KnownVolumeDetailedStatus, + KnownVolumeProvisioningState, + KnownBareMetalMachineKeySetPrivilegeLevel, + KnownBareMetalMachineKeySetDetailedStatus, + KnownBareMetalMachineKeySetUserSetupStatus, + KnownBareMetalMachineKeySetProvisioningState, + KnownBmcKeySetPrivilegeLevel, + KnownBmcKeySetDetailedStatus, + KnownBmcKeySetProvisioningState, + KnownAgentPoolDetailedStatus, + KnownAgentPoolProvisioningState, + KnownKubernetesClusterFeatureAvailabilityLifecycle, + KnownKubernetesClusterFeatureDetailedStatus, + KnownKubernetesClusterFeatureRequired, + KnownKubernetesClusterFeatureProvisioningState, + KnownConsoleEnabled, + KnownConsoleDetailedStatus, + KnownConsoleProvisioningState, + KnownClusterMetricsConfigurationDetailedStatus, + KnownClusterMetricsConfigurationProvisioningState, + KnownVersions, +} from "./models.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/models/mappers.ts b/sdk/networkcloud/arm-networkcloud/src/models/mappers.ts deleted file mode 100644 index 7b5b0c7634a9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/models/mappers.ts +++ /dev/null @@ -1,8835 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type * as coreClient from "@azure/core-client"; - -export const OperationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Operation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - isDataAction: { - serializedName: "isDataAction", - readOnly: true, - type: { - name: "Boolean", - }, - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplay", - }, - }, - origin: { - serializedName: "origin", - readOnly: true, - type: { - name: "String", - }, - }, - actionType: { - serializedName: "actionType", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - readOnly: true, - type: { - name: "String", - }, - }, - resource: { - serializedName: "resource", - readOnly: true, - type: { - name: "String", - }, - }, - operation: { - serializedName: "operation", - readOnly: true, - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, -}; - -export const ErrorDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorDetail", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String", - }, - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - }, - }, - }, - }, - }, - }, -}; - -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - info: { - serializedName: "info", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - }, - }, -}; - -export const BareMetalMachineList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachineList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BareMetalMachine", - }, - }, - }, - }, - }, - }, -}; - -export const ExtendedLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExtendedLocation", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ActionState: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActionState", - modelProperties: { - actionType: { - serializedName: "actionType", - readOnly: true, - type: { - name: "String", - }, - }, - correlationId: { - serializedName: "correlationId", - readOnly: true, - type: { - name: "String", - }, - }, - endTime: { - serializedName: "endTime", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - startTime: { - serializedName: "startTime", - readOnly: true, - type: { - name: "String", - }, - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String", - }, - }, - stepStates: { - serializedName: "stepStates", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StepState", - }, - }, - }, - }, - }, - }, -}; - -export const StepState: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StepState", - modelProperties: { - endTime: { - serializedName: "endTime", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - startTime: { - serializedName: "startTime", - readOnly: true, - type: { - name: "String", - }, - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String", - }, - }, - stepName: { - serializedName: "stepName", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AdministrativeCredentials: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AdministrativeCredentials", - modelProperties: { - password: { - constraints: { - MinLength: 1, - }, - serializedName: "password", - required: true, - type: { - name: "String", - }, - }, - username: { - constraints: { - MinLength: 1, - }, - serializedName: "username", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CertificateInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CertificateInfo", - modelProperties: { - hash: { - serializedName: "hash", - readOnly: true, - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HardwareInventory: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HardwareInventory", - modelProperties: { - additionalHostInformation: { - serializedName: "additionalHostInformation", - readOnly: true, - type: { - name: "String", - }, - }, - interfaces: { - serializedName: "interfaces", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HardwareInventoryNetworkInterface", - }, - }, - }, - }, - nics: { - serializedName: "nics", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Nic", - }, - }, - }, - }, - }, - }, -}; - -export const HardwareInventoryNetworkInterface: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HardwareInventoryNetworkInterface", - modelProperties: { - linkStatus: { - serializedName: "linkStatus", - readOnly: true, - type: { - name: "String", - }, - }, - macAddress: { - serializedName: "macAddress", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - networkInterfaceId: { - serializedName: "networkInterfaceId", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Nic: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Nic", - modelProperties: { - lldpNeighbor: { - serializedName: "lldpNeighbor", - type: { - name: "Composite", - className: "LldpNeighbor", - }, - }, - macAddress: { - serializedName: "macAddress", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LldpNeighbor: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LldpNeighbor", - modelProperties: { - portDescription: { - serializedName: "portDescription", - readOnly: true, - type: { - name: "String", - }, - }, - portName: { - serializedName: "portName", - readOnly: true, - type: { - name: "String", - }, - }, - systemDescription: { - serializedName: "systemDescription", - readOnly: true, - type: { - name: "String", - }, - }, - systemName: { - serializedName: "systemName", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HardwareValidationStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HardwareValidationStatus", - modelProperties: { - lastValidationTime: { - serializedName: "lastValidationTime", - readOnly: true, - type: { - name: "DateTime", - }, - }, - result: { - serializedName: "result", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RuntimeProtectionStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RuntimeProtectionStatus", - modelProperties: { - definitionsLastUpdated: { - serializedName: "definitionsLastUpdated", - readOnly: true, - type: { - name: "DateTime", - }, - }, - definitionsVersion: { - serializedName: "definitionsVersion", - readOnly: true, - type: { - name: "String", - }, - }, - scanCompletedTime: { - serializedName: "scanCompletedTime", - readOnly: true, - type: { - name: "DateTime", - }, - }, - scanScheduledTime: { - serializedName: "scanScheduledTime", - readOnly: true, - type: { - name: "DateTime", - }, - }, - scanStartedTime: { - serializedName: "scanStartedTime", - readOnly: true, - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const SecretRotationStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecretRotationStatus", - modelProperties: { - expirePeriodDays: { - serializedName: "expirePeriodDays", - readOnly: true, - type: { - name: "Number", - }, - }, - lastRotationTime: { - serializedName: "lastRotationTime", - readOnly: true, - type: { - name: "DateTime", - }, - }, - rotationPeriodDays: { - serializedName: "rotationPeriodDays", - readOnly: true, - type: { - name: "Number", - }, - }, - secretArchiveReference: { - serializedName: "secretArchiveReference", - type: { - name: "Composite", - className: "SecretArchiveReference", - }, - }, - secretType: { - serializedName: "secretType", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecretArchiveReference: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecretArchiveReference", - modelProperties: { - keyVaultId: { - serializedName: "keyVaultId", - readOnly: true, - type: { - name: "String", - }, - }, - keyVaultUri: { - serializedName: "keyVaultUri", - readOnly: true, - type: { - name: "String", - }, - }, - secretName: { - serializedName: "secretName", - readOnly: true, - type: { - name: "String", - }, - }, - secretVersion: { - serializedName: "secretVersion", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Resource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - }, - }, -}; - -export const SystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String", - }, - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String", - }, - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime", - }, - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String", - }, - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String", - }, - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const CloudServicesNetworkList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudServicesNetworkList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CloudServicesNetwork", - }, - }, - }, - }, - }, - }, -}; - -export const EgressEndpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EgressEndpoint", - modelProperties: { - category: { - serializedName: "category", - required: true, - type: { - name: "String", - }, - }, - endpoints: { - constraints: { - MinItems: 1, - }, - serializedName: "endpoints", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EndpointDependency", - }, - }, - }, - }, - }, - }, -}; - -export const EndpointDependency: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EndpointDependency", - modelProperties: { - domainName: { - serializedName: "domainName", - required: true, - type: { - name: "String", - }, - }, - port: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1, - }, - serializedName: "port", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const CloudServicesNetworkStorageOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudServicesNetworkStorageOptions", - modelProperties: { - mode: { - serializedName: "mode", - type: { - name: "String", - }, - }, - sizeMiB: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "sizeMiB", - type: { - name: "Number", - }, - }, - storageApplianceId: { - serializedName: "storageApplianceId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CloudServicesNetworkStorageStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudServicesNetworkStorageStatus", - modelProperties: { - mode: { - serializedName: "mode", - readOnly: true, - type: { - name: "String", - }, - }, - sizeMiB: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "sizeMiB", - readOnly: true, - type: { - name: "Number", - }, - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String", - }, - }, - statusMessage: { - serializedName: "statusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - volumeId: { - serializedName: "volumeId", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterManagerList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterManagerList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClusterManager", - }, - }, - }, - }, - }, - }, -}; - -export const ManagedServiceIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedServiceIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "Uuid", - }, - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "Uuid", - }, - }, - type: { - serializedName: "type", - required: true, - type: { - name: "String", - }, - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserAssignedIdentity" }, - }, - }, - }, - }, - }, -}; - -export const UserAssignedIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UserAssignedIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "Uuid", - }, - }, - clientId: { - serializedName: "clientId", - readOnly: true, - type: { - name: "Uuid", - }, - }, - }, - }, -}; - -export const ClusterAvailableVersion: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterAvailableVersion", - modelProperties: { - supportExpiryDate: { - serializedName: "supportExpiryDate", - readOnly: true, - type: { - name: "String", - }, - }, - targetClusterVersion: { - serializedName: "targetClusterVersion", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ManagedResourceGroupConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedResourceGroupConfiguration", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - name: { - constraints: { - MaxLength: 75, - }, - serializedName: "name", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Cluster", - }, - }, - }, - }, - }, - }, -}; - -export const RackDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RackDefinition", - modelProperties: { - availabilityZone: { - constraints: { - Pattern: new RegExp("^[a-zA-Z0-9]{1,10}$"), - }, - serializedName: "availabilityZone", - type: { - name: "String", - }, - }, - bareMetalMachineConfigurationData: { - serializedName: "bareMetalMachineConfigurationData", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BareMetalMachineConfigurationData", - }, - }, - }, - }, - networkRackId: { - serializedName: "networkRackId", - required: true, - type: { - name: "String", - }, - }, - rackLocation: { - constraints: { - MaxLength: 256, - }, - serializedName: "rackLocation", - type: { - name: "String", - }, - }, - rackSerialNumber: { - constraints: { - MaxLength: 64, - MinLength: 1, - }, - serializedName: "rackSerialNumber", - required: true, - type: { - name: "String", - }, - }, - rackSkuId: { - serializedName: "rackSkuId", - required: true, - type: { - name: "String", - }, - }, - storageApplianceConfigurationData: { - serializedName: "storageApplianceConfigurationData", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageApplianceConfigurationData", - }, - }, - }, - }, - }, - }, -}; - -export const BareMetalMachineConfigurationData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachineConfigurationData", - modelProperties: { - bmcConnectionString: { - serializedName: "bmcConnectionString", - readOnly: true, - type: { - name: "String", - }, - }, - bmcCredentials: { - serializedName: "bmcCredentials", - type: { - name: "Composite", - className: "AdministrativeCredentials", - }, - }, - bmcMacAddress: { - constraints: { - Pattern: new RegExp("^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"), - }, - serializedName: "bmcMacAddress", - required: true, - type: { - name: "String", - }, - }, - bootMacAddress: { - constraints: { - Pattern: new RegExp("^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"), - }, - serializedName: "bootMacAddress", - required: true, - type: { - name: "String", - }, - }, - machineDetails: { - constraints: { - MaxLength: 256, - }, - serializedName: "machineDetails", - type: { - name: "String", - }, - }, - machineName: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9]{0,62}[a-zA-Z0-9])$"), - }, - serializedName: "machineName", - type: { - name: "String", - }, - }, - rackSlot: { - constraints: { - InclusiveMaximum: 256, - InclusiveMinimum: 1, - }, - serializedName: "rackSlot", - required: true, - type: { - name: "Number", - }, - }, - serialNumber: { - constraints: { - MaxLength: 64, - }, - serializedName: "serialNumber", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StorageApplianceConfigurationData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageApplianceConfigurationData", - modelProperties: { - adminCredentials: { - serializedName: "adminCredentials", - type: { - name: "Composite", - className: "AdministrativeCredentials", - }, - }, - rackSlot: { - constraints: { - InclusiveMaximum: 256, - InclusiveMinimum: 1, - }, - serializedName: "rackSlot", - required: true, - type: { - name: "Number", - }, - }, - serialNumber: { - serializedName: "serialNumber", - required: true, - type: { - name: "String", - }, - }, - storageApplianceName: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$"), - }, - serializedName: "storageApplianceName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AnalyticsOutputSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AnalyticsOutputSettings", - modelProperties: { - analyticsWorkspaceId: { - serializedName: "analyticsWorkspaceId", - type: { - name: "String", - }, - }, - associatedIdentity: { - serializedName: "associatedIdentity", - type: { - name: "Composite", - className: "IdentitySelector", - }, - }, - }, - }, -}; - -export const IdentitySelector: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IdentitySelector", - modelProperties: { - identityType: { - serializedName: "identityType", - type: { - name: "String", - }, - }, - userAssignedIdentityResourceId: { - serializedName: "userAssignedIdentityResourceId", - nullable: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterAvailableUpgradeVersion: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterAvailableUpgradeVersion", - modelProperties: { - controlImpact: { - serializedName: "controlImpact", - readOnly: true, - type: { - name: "String", - }, - }, - expectedDuration: { - serializedName: "expectedDuration", - readOnly: true, - type: { - name: "String", - }, - }, - impactDescription: { - serializedName: "impactDescription", - readOnly: true, - type: { - name: "String", - }, - }, - supportExpiryDate: { - serializedName: "supportExpiryDate", - readOnly: true, - type: { - name: "String", - }, - }, - targetClusterVersion: { - serializedName: "targetClusterVersion", - readOnly: true, - type: { - name: "String", - }, - }, - workloadImpact: { - serializedName: "workloadImpact", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterCapacity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterCapacity", - modelProperties: { - availableApplianceStorageGB: { - serializedName: "availableApplianceStorageGB", - type: { - name: "Number", - }, - }, - availableCoreCount: { - serializedName: "availableCoreCount", - type: { - name: "Number", - }, - }, - availableHostStorageGB: { - serializedName: "availableHostStorageGB", - type: { - name: "Number", - }, - }, - availableMemoryGB: { - serializedName: "availableMemoryGB", - type: { - name: "Number", - }, - }, - totalApplianceStorageGB: { - serializedName: "totalApplianceStorageGB", - type: { - name: "Number", - }, - }, - totalCoreCount: { - serializedName: "totalCoreCount", - type: { - name: "Number", - }, - }, - totalHostStorageGB: { - serializedName: "totalHostStorageGB", - type: { - name: "Number", - }, - }, - totalMemoryGB: { - serializedName: "totalMemoryGB", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ServicePrincipalInformation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServicePrincipalInformation", - modelProperties: { - applicationId: { - serializedName: "applicationId", - required: true, - type: { - name: "String", - }, - }, - password: { - serializedName: "password", - required: true, - type: { - name: "String", - }, - }, - principalId: { - serializedName: "principalId", - required: true, - type: { - name: "String", - }, - }, - tenantId: { - serializedName: "tenantId", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CommandOutputSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CommandOutputSettings", - modelProperties: { - associatedIdentity: { - serializedName: "associatedIdentity", - type: { - name: "Composite", - className: "IdentitySelector", - }, - }, - containerUrl: { - serializedName: "containerUrl", - type: { - name: "String", - }, - }, - overrides: { - serializedName: "overrides", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CommandOutputOverride", - }, - }, - }, - }, - }, - }, -}; - -export const CommandOutputOverride: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CommandOutputOverride", - modelProperties: { - associatedIdentity: { - serializedName: "associatedIdentity", - type: { - name: "Composite", - className: "IdentitySelector", - }, - }, - commandOutputType: { - serializedName: "commandOutputType", - type: { - name: "String", - }, - }, - containerUrl: { - serializedName: "containerUrl", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ValidationThreshold: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ValidationThreshold", - modelProperties: { - grouping: { - serializedName: "grouping", - required: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - required: true, - type: { - name: "String", - }, - }, - value: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "value", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const RuntimeProtectionConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RuntimeProtectionConfiguration", - modelProperties: { - enforcementLevel: { - defaultValue: "Disabled", - serializedName: "enforcementLevel", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterSecretArchive: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterSecretArchive", - modelProperties: { - keyVaultId: { - serializedName: "keyVaultId", - required: true, - type: { - name: "String", - }, - }, - useKeyVault: { - defaultValue: "False", - serializedName: "useKeyVault", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SecretArchiveSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecretArchiveSettings", - modelProperties: { - associatedIdentity: { - serializedName: "associatedIdentity", - type: { - name: "Composite", - className: "IdentitySelector", - }, - }, - vaultUri: { - serializedName: "vaultUri", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterUpdateStrategy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterUpdateStrategy", - modelProperties: { - maxUnavailable: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "maxUnavailable", - type: { - name: "Number", - }, - }, - strategyType: { - serializedName: "strategyType", - required: true, - type: { - name: "String", - }, - }, - thresholdType: { - serializedName: "thresholdType", - required: true, - type: { - name: "String", - }, - }, - thresholdValue: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "thresholdValue", - required: true, - type: { - name: "Number", - }, - }, - waitTimeMinutes: { - defaultValue: 15, - constraints: { - InclusiveMaximum: 60, - InclusiveMinimum: 0, - }, - serializedName: "waitTimeMinutes", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VulnerabilityScanningSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VulnerabilityScanningSettings", - modelProperties: { - containerScan: { - serializedName: "containerScan", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KubernetesClusterList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesClusterList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KubernetesCluster", - }, - }, - }, - }, - }, - }, -}; - -export const AadConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AadConfiguration", - modelProperties: { - adminGroupObjectIds: { - constraints: { - MinItems: 1, - }, - serializedName: "adminGroupObjectIds", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const AdministratorConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AdministratorConfiguration", - modelProperties: { - adminUsername: { - serializedName: "adminUsername", - type: { - name: "String", - }, - }, - sshPublicKeys: { - serializedName: "sshPublicKeys", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SshPublicKey", - }, - }, - }, - }, - }, - }, -}; - -export const SshPublicKey: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SshPublicKey", - modelProperties: { - keyData: { - constraints: { - MinLength: 1, - }, - serializedName: "keyData", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailableUpgrade: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableUpgrade", - modelProperties: { - availabilityLifecycle: { - serializedName: "availabilityLifecycle", - readOnly: true, - type: { - name: "String", - }, - }, - version: { - serializedName: "version", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ControlPlaneNodeConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ControlPlaneNodeConfiguration", - modelProperties: { - administratorConfiguration: { - serializedName: "administratorConfiguration", - type: { - name: "Composite", - className: "AdministratorConfiguration", - }, - }, - availabilityZones: { - serializedName: "availabilityZones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - count: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "count", - required: true, - type: { - name: "Number", - }, - }, - vmSkuName: { - serializedName: "vmSkuName", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FeatureStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FeatureStatus", - modelProperties: { - detailedStatus: { - serializedName: "detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - version: { - serializedName: "version", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const InitialAgentPoolConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InitialAgentPoolConfiguration", - modelProperties: { - administratorConfiguration: { - serializedName: "administratorConfiguration", - type: { - name: "Composite", - className: "AdministratorConfiguration", - }, - }, - agentOptions: { - serializedName: "agentOptions", - type: { - name: "Composite", - className: "AgentOptions", - }, - }, - attachedNetworkConfiguration: { - serializedName: "attachedNetworkConfiguration", - type: { - name: "Composite", - className: "AttachedNetworkConfiguration", - }, - }, - availabilityZones: { - serializedName: "availabilityZones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - count: { - serializedName: "count", - required: true, - type: { - name: "Number", - }, - }, - labels: { - serializedName: "labels", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KubernetesLabel", - }, - }, - }, - }, - mode: { - serializedName: "mode", - required: true, - type: { - name: "String", - }, - }, - name: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$"), - }, - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - taints: { - serializedName: "taints", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KubernetesLabel", - }, - }, - }, - }, - upgradeSettings: { - serializedName: "upgradeSettings", - type: { - name: "Composite", - className: "AgentPoolUpgradeSettings", - }, - }, - vmSkuName: { - serializedName: "vmSkuName", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AgentOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AgentOptions", - modelProperties: { - hugepagesCount: { - serializedName: "hugepagesCount", - required: true, - type: { - name: "Number", - }, - }, - hugepagesSize: { - defaultValue: "2M", - serializedName: "hugepagesSize", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AttachedNetworkConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AttachedNetworkConfiguration", - modelProperties: { - l2Networks: { - serializedName: "l2Networks", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "L2NetworkAttachmentConfiguration", - }, - }, - }, - }, - l3Networks: { - serializedName: "l3Networks", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "L3NetworkAttachmentConfiguration", - }, - }, - }, - }, - trunkedNetworks: { - serializedName: "trunkedNetworks", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TrunkedNetworkAttachmentConfiguration", - }, - }, - }, - }, - }, - }, -}; - -export const L2NetworkAttachmentConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "L2NetworkAttachmentConfiguration", - modelProperties: { - networkId: { - serializedName: "networkId", - required: true, - type: { - name: "String", - }, - }, - pluginType: { - serializedName: "pluginType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const L3NetworkAttachmentConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "L3NetworkAttachmentConfiguration", - modelProperties: { - ipamEnabled: { - defaultValue: "False", - serializedName: "ipamEnabled", - type: { - name: "String", - }, - }, - networkId: { - serializedName: "networkId", - required: true, - type: { - name: "String", - }, - }, - pluginType: { - serializedName: "pluginType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TrunkedNetworkAttachmentConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrunkedNetworkAttachmentConfiguration", - modelProperties: { - networkId: { - serializedName: "networkId", - required: true, - type: { - name: "String", - }, - }, - pluginType: { - serializedName: "pluginType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KubernetesLabel: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesLabel", - modelProperties: { - key: { - serializedName: "key", - required: true, - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AgentPoolUpgradeSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AgentPoolUpgradeSettings", - modelProperties: { - drainTimeout: { - constraints: { - InclusiveMaximum: 86400, - InclusiveMinimum: 60, - }, - serializedName: "drainTimeout", - type: { - name: "Number", - }, - }, - maxSurge: { - serializedName: "maxSurge", - type: { - name: "String", - }, - }, - maxUnavailable: { - serializedName: "maxUnavailable", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkConfiguration", - modelProperties: { - attachedNetworkConfiguration: { - serializedName: "attachedNetworkConfiguration", - type: { - name: "Composite", - className: "AttachedNetworkConfiguration", - }, - }, - bgpServiceLoadBalancerConfiguration: { - serializedName: "bgpServiceLoadBalancerConfiguration", - type: { - name: "Composite", - className: "BgpServiceLoadBalancerConfiguration", - }, - }, - cloudServicesNetworkId: { - serializedName: "cloudServicesNetworkId", - required: true, - type: { - name: "String", - }, - }, - cniNetworkId: { - serializedName: "cniNetworkId", - required: true, - type: { - name: "String", - }, - }, - dnsServiceIp: { - serializedName: "dnsServiceIp", - type: { - name: "String", - }, - }, - l2ServiceLoadBalancerConfiguration: { - serializedName: "l2ServiceLoadBalancerConfiguration", - type: { - name: "Composite", - className: "L2ServiceLoadBalancerConfiguration", - }, - }, - podCidrs: { - serializedName: "podCidrs", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - serviceCidrs: { - serializedName: "serviceCidrs", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const BgpServiceLoadBalancerConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BgpServiceLoadBalancerConfiguration", - modelProperties: { - bgpAdvertisements: { - serializedName: "bgpAdvertisements", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BgpAdvertisement", - }, - }, - }, - }, - bgpPeers: { - serializedName: "bgpPeers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceLoadBalancerBgpPeer", - }, - }, - }, - }, - fabricPeeringEnabled: { - defaultValue: "True", - serializedName: "fabricPeeringEnabled", - type: { - name: "String", - }, - }, - ipAddressPools: { - serializedName: "ipAddressPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpAddressPool", - }, - }, - }, - }, - }, - }, -}; - -export const BgpAdvertisement: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BgpAdvertisement", - modelProperties: { - advertiseToFabric: { - defaultValue: "True", - serializedName: "advertiseToFabric", - type: { - name: "String", - }, - }, - communities: { - serializedName: "communities", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - ipAddressPools: { - serializedName: "ipAddressPools", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - peers: { - serializedName: "peers", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ServiceLoadBalancerBgpPeer: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceLoadBalancerBgpPeer", - modelProperties: { - bfdEnabled: { - serializedName: "bfdEnabled", - type: { - name: "String", - }, - }, - bgpMultiHop: { - defaultValue: "False", - serializedName: "bgpMultiHop", - type: { - name: "String", - }, - }, - holdTime: { - serializedName: "holdTime", - type: { - name: "String", - }, - }, - keepAliveTime: { - serializedName: "keepAliveTime", - type: { - name: "String", - }, - }, - myAsn: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "myAsn", - type: { - name: "Number", - }, - }, - name: { - constraints: { - Pattern: new RegExp("^[a-z0-9]([a-z0-9.-]{0,61}[a-z0-9]){0,1}$"), - }, - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - password: { - constraints: { - Pattern: new RegExp("^[a-zA-Z0-9]{0,80}$"), - MaxLength: 80, - }, - serializedName: "password", - type: { - name: "String", - }, - }, - peerAddress: { - serializedName: "peerAddress", - required: true, - type: { - name: "String", - }, - }, - peerAsn: { - constraints: { - InclusiveMaximum: 4294967295, - InclusiveMinimum: 0, - }, - serializedName: "peerAsn", - required: true, - type: { - name: "Number", - }, - }, - peerPort: { - defaultValue: 179, - serializedName: "peerPort", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const IpAddressPool: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpAddressPool", - modelProperties: { - addresses: { - serializedName: "addresses", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - autoAssign: { - serializedName: "autoAssign", - type: { - name: "String", - }, - }, - name: { - constraints: { - Pattern: new RegExp("^[a-z0-9]([a-z0-9.-]{0,61}[a-z0-9]){0,1}$"), - }, - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - onlyUseHostIps: { - serializedName: "onlyUseHostIps", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const L2ServiceLoadBalancerConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "L2ServiceLoadBalancerConfiguration", - modelProperties: { - ipAddressPools: { - serializedName: "ipAddressPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpAddressPool", - }, - }, - }, - }, - }, - }, -}; - -export const KubernetesClusterNode: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesClusterNode", - modelProperties: { - agentPoolId: { - serializedName: "agentPoolId", - readOnly: true, - type: { - name: "String", - }, - }, - availabilityZone: { - serializedName: "availabilityZone", - readOnly: true, - type: { - name: "String", - }, - }, - bareMetalMachineId: { - serializedName: "bareMetalMachineId", - readOnly: true, - type: { - name: "String", - }, - }, - cpuCores: { - serializedName: "cpuCores", - readOnly: true, - type: { - name: "Number", - }, - }, - detailedStatus: { - serializedName: "detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - diskSizeGB: { - serializedName: "diskSizeGB", - readOnly: true, - type: { - name: "Number", - }, - }, - image: { - serializedName: "image", - readOnly: true, - type: { - name: "String", - }, - }, - kubernetesVersion: { - serializedName: "kubernetesVersion", - readOnly: true, - type: { - name: "String", - }, - }, - labels: { - serializedName: "labels", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KubernetesLabel", - }, - }, - }, - }, - memorySizeGB: { - serializedName: "memorySizeGB", - readOnly: true, - type: { - name: "Number", - }, - }, - mode: { - serializedName: "mode", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - networkAttachments: { - serializedName: "networkAttachments", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkAttachment", - }, - }, - }, - }, - powerState: { - serializedName: "powerState", - readOnly: true, - type: { - name: "String", - }, - }, - role: { - serializedName: "role", - readOnly: true, - type: { - name: "String", - }, - }, - taints: { - serializedName: "taints", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KubernetesLabel", - }, - }, - }, - }, - vmSkuName: { - serializedName: "vmSkuName", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkAttachment: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkAttachment", - modelProperties: { - attachedNetworkId: { - serializedName: "attachedNetworkId", - required: true, - type: { - name: "String", - }, - }, - defaultGateway: { - serializedName: "defaultGateway", - type: { - name: "String", - }, - }, - ipAllocationMethod: { - serializedName: "ipAllocationMethod", - required: true, - type: { - name: "String", - }, - }, - ipv4Address: { - serializedName: "ipv4Address", - type: { - name: "String", - }, - }, - ipv6Address: { - serializedName: "ipv6Address", - type: { - name: "String", - }, - }, - macAddress: { - serializedName: "macAddress", - readOnly: true, - type: { - name: "String", - }, - }, - networkAttachmentName: { - constraints: { - MaxLength: 15, - }, - serializedName: "networkAttachmentName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const L2NetworkList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "L2NetworkList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "L2Network", - }, - }, - }, - }, - }, - }, -}; - -export const L3NetworkList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "L3NetworkList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "L3Network", - }, - }, - }, - }, - }, - }, -}; - -export const RackSkuList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RackSkuList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RackSku", - }, - }, - }, - }, - }, - }, -}; - -export const MachineSkuSlot: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineSkuSlot", - modelProperties: { - rackSlot: { - serializedName: "rackSlot", - readOnly: true, - type: { - name: "Number", - }, - }, - bootstrapProtocol: { - serializedName: "properties.bootstrapProtocol", - readOnly: true, - type: { - name: "String", - }, - }, - cpuCores: { - serializedName: "properties.cpuCores", - readOnly: true, - type: { - name: "Number", - }, - }, - cpuSockets: { - serializedName: "properties.cpuSockets", - readOnly: true, - type: { - name: "Number", - }, - }, - disks: { - serializedName: "properties.disks", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MachineDisk", - }, - }, - }, - }, - generation: { - serializedName: "properties.generation", - readOnly: true, - type: { - name: "String", - }, - }, - hardwareVersion: { - serializedName: "properties.hardwareVersion", - readOnly: true, - type: { - name: "String", - }, - }, - memoryCapacityGB: { - serializedName: "properties.memoryCapacityGB", - readOnly: true, - type: { - name: "Number", - }, - }, - model: { - serializedName: "properties.model", - readOnly: true, - type: { - name: "String", - }, - }, - networkInterfaces: { - serializedName: "properties.networkInterfaces", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterface", - }, - }, - }, - }, - totalThreads: { - serializedName: "properties.totalThreads", - readOnly: true, - type: { - name: "Number", - }, - }, - vendor: { - serializedName: "properties.vendor", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const MachineDisk: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MachineDisk", - modelProperties: { - capacityGB: { - serializedName: "capacityGB", - readOnly: true, - type: { - name: "Number", - }, - }, - connection: { - serializedName: "connection", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkInterface: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterface", - modelProperties: { - address: { - serializedName: "address", - readOnly: true, - type: { - name: "String", - }, - }, - deviceConnectionType: { - serializedName: "deviceConnectionType", - readOnly: true, - type: { - name: "String", - }, - }, - model: { - serializedName: "model", - readOnly: true, - type: { - name: "String", - }, - }, - physicalSlot: { - serializedName: "physicalSlot", - readOnly: true, - type: { - name: "Number", - }, - }, - portCount: { - serializedName: "portCount", - readOnly: true, - type: { - name: "Number", - }, - }, - portSpeed: { - serializedName: "portSpeed", - readOnly: true, - type: { - name: "Number", - }, - }, - vendor: { - serializedName: "vendor", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StorageApplianceSkuSlot: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageApplianceSkuSlot", - modelProperties: { - rackSlot: { - serializedName: "rackSlot", - readOnly: true, - type: { - name: "Number", - }, - }, - capacityGB: { - serializedName: "properties.capacityGB", - readOnly: true, - type: { - name: "Number", - }, - }, - model: { - serializedName: "properties.model", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RackList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RackList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Rack", - }, - }, - }, - }, - }, - }, -}; - -export const StorageApplianceList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageApplianceList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageAppliance", - }, - }, - }, - }, - }, - }, -}; - -export const TrunkedNetworkList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrunkedNetworkList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TrunkedNetwork", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualMachineList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachine", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualMachinePlacementHint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachinePlacementHint", - modelProperties: { - hintType: { - serializedName: "hintType", - required: true, - type: { - name: "String", - }, - }, - resourceId: { - serializedName: "resourceId", - required: true, - type: { - name: "String", - }, - }, - schedulingExecution: { - serializedName: "schedulingExecution", - required: true, - type: { - name: "String", - }, - }, - scope: { - serializedName: "scope", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StorageProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageProfile", - modelProperties: { - osDisk: { - serializedName: "osDisk", - type: { - name: "Composite", - className: "OsDisk", - }, - }, - volumeAttachments: { - serializedName: "volumeAttachments", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const OsDisk: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OsDisk", - modelProperties: { - createOption: { - defaultValue: "Ephemeral", - serializedName: "createOption", - type: { - name: "String", - }, - }, - deleteOption: { - defaultValue: "Delete", - serializedName: "deleteOption", - type: { - name: "String", - }, - }, - diskSizeGB: { - serializedName: "diskSizeGB", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ImageRepositoryCredentials: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ImageRepositoryCredentials", - modelProperties: { - password: { - constraints: { - MinLength: 1, - }, - serializedName: "password", - required: true, - type: { - name: "String", - }, - }, - registryUrl: { - serializedName: "registryUrl", - required: true, - type: { - name: "String", - }, - }, - username: { - constraints: { - MinLength: 1, - }, - serializedName: "username", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VolumeList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VolumeList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Volume", - }, - }, - }, - }, - }, - }, -}; - -export const OperationStatusResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationStatusResult", - modelProperties: { - endTime: { - serializedName: "endTime", - readOnly: true, - type: { - name: "DateTime", - }, - }, - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - operations: { - serializedName: "operations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationStatusResult", - }, - }, - }, - }, - percentComplete: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "percentComplete", - readOnly: true, - type: { - name: "Number", - }, - }, - resourceId: { - serializedName: "resourceId", - readOnly: true, - type: { - name: "String", - }, - }, - startTime: { - serializedName: "startTime", - readOnly: true, - type: { - name: "DateTime", - }, - }, - status: { - serializedName: "status", - required: true, - type: { - name: "String", - }, - }, - exitCode: { - serializedName: "properties.exitCode", - readOnly: true, - type: { - name: "String", - }, - }, - outputHead: { - serializedName: "properties.outputHead", - readOnly: true, - type: { - name: "String", - }, - }, - resultRef: { - serializedName: "properties.resultRef", - readOnly: true, - type: { - name: "String", - }, - }, - resultUrl: { - serializedName: "properties.resultUrl", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinePatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinePatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - machineDetails: { - constraints: { - MaxLength: 256, - }, - serializedName: "properties.machineDetails", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachineCordonParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachineCordonParameters", - modelProperties: { - evacuate: { - defaultValue: "False", - serializedName: "evacuate", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinePowerOffParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinePowerOffParameters", - modelProperties: { - skipShutdown: { - defaultValue: "False", - serializedName: "skipShutdown", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachineReplaceParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachineReplaceParameters", - modelProperties: { - bmcCredentials: { - serializedName: "bmcCredentials", - type: { - name: "Composite", - className: "AdministrativeCredentials", - }, - }, - bmcMacAddress: { - constraints: { - Pattern: new RegExp("^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"), - }, - serializedName: "bmcMacAddress", - type: { - name: "String", - }, - }, - bootMacAddress: { - constraints: { - Pattern: new RegExp("^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"), - }, - serializedName: "bootMacAddress", - type: { - name: "String", - }, - }, - machineName: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9]{0,62}[a-zA-Z0-9])$"), - }, - serializedName: "machineName", - type: { - name: "String", - }, - }, - safeguardMode: { - defaultValue: "All", - serializedName: "safeguardMode", - type: { - name: "String", - }, - }, - serialNumber: { - constraints: { - MaxLength: 64, - MinLength: 1, - }, - serializedName: "serialNumber", - type: { - name: "String", - }, - }, - storagePolicy: { - defaultValue: "DiscardAll", - serializedName: "storagePolicy", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachineRunCommandParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachineRunCommandParameters", - modelProperties: { - arguments: { - serializedName: "arguments", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - limitTimeSeconds: { - constraints: { - InclusiveMaximum: 14400, - InclusiveMinimum: 60, - }, - serializedName: "limitTimeSeconds", - required: true, - type: { - name: "Number", - }, - }, - script: { - serializedName: "script", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachineRunDataExtractsParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachineRunDataExtractsParameters", - modelProperties: { - commands: { - constraints: { - MinItems: 1, - }, - serializedName: "commands", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BareMetalMachineCommandSpecification", - }, - }, - }, - }, - limitTimeSeconds: { - constraints: { - InclusiveMaximum: 14400, - InclusiveMinimum: 60, - }, - serializedName: "limitTimeSeconds", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const BareMetalMachineCommandSpecification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachineCommandSpecification", - modelProperties: { - arguments: { - serializedName: "arguments", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - command: { - serializedName: "command", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachineRunReadCommandsParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachineRunReadCommandsParameters", - modelProperties: { - commands: { - constraints: { - MinItems: 1, - }, - serializedName: "commands", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BareMetalMachineCommandSpecification", - }, - }, - }, - }, - limitTimeSeconds: { - constraints: { - InclusiveMaximum: 14400, - InclusiveMinimum: 60, - }, - serializedName: "limitTimeSeconds", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const CloudServicesNetworkPatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudServicesNetworkPatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - additionalEgressEndpoints: { - serializedName: "properties.additionalEgressEndpoints", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EgressEndpoint", - }, - }, - }, - }, - enableDefaultEgressEndpoints: { - serializedName: "properties.enableDefaultEgressEndpoints", - type: { - name: "String", - }, - }, - storageOptions: { - serializedName: "properties.storageOptions", - type: { - name: "Composite", - className: "CloudServicesNetworkStorageOptionsPatch", - }, - }, - }, - }, -}; - -export const CloudServicesNetworkStorageOptionsPatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudServicesNetworkStorageOptionsPatch", - modelProperties: { - mode: { - serializedName: "mode", - type: { - name: "String", - }, - }, - sizeMiB: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "sizeMiB", - type: { - name: "Number", - }, - }, - storageApplianceId: { - serializedName: "storageApplianceId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterManagerPatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterManagerPatchParameters", - modelProperties: { - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const ClusterPatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPatchParameters", - modelProperties: { - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - aggregatorOrSingleRackDefinition: { - serializedName: "properties.aggregatorOrSingleRackDefinition", - type: { - name: "Composite", - className: "RackDefinition", - }, - }, - analyticsOutputSettings: { - serializedName: "properties.analyticsOutputSettings", - type: { - name: "Composite", - className: "AnalyticsOutputSettings", - }, - }, - clusterLocation: { - serializedName: "properties.clusterLocation", - type: { - name: "String", - }, - }, - clusterServicePrincipal: { - serializedName: "properties.clusterServicePrincipal", - type: { - name: "Composite", - className: "ServicePrincipalInformation", - }, - }, - commandOutputSettings: { - serializedName: "properties.commandOutputSettings", - type: { - name: "Composite", - className: "CommandOutputSettings", - }, - }, - computeDeploymentThreshold: { - serializedName: "properties.computeDeploymentThreshold", - type: { - name: "Composite", - className: "ValidationThreshold", - }, - }, - computeRackDefinitions: { - serializedName: "properties.computeRackDefinitions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RackDefinition", - }, - }, - }, - }, - runtimeProtectionConfiguration: { - serializedName: "properties.runtimeProtectionConfiguration", - type: { - name: "Composite", - className: "RuntimeProtectionConfiguration", - }, - }, - secretArchive: { - serializedName: "properties.secretArchive", - type: { - name: "Composite", - className: "ClusterSecretArchive", - }, - }, - secretArchiveSettings: { - serializedName: "properties.secretArchiveSettings", - type: { - name: "Composite", - className: "SecretArchiveSettings", - }, - }, - updateStrategy: { - serializedName: "properties.updateStrategy", - type: { - name: "Composite", - className: "ClusterUpdateStrategy", - }, - }, - vulnerabilityScanningSettings: { - serializedName: "properties.vulnerabilityScanningSettings", - type: { - name: "Composite", - className: "VulnerabilityScanningSettingsPatch", - }, - }, - }, - }, -}; - -export const VulnerabilityScanningSettingsPatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VulnerabilityScanningSettingsPatch", - modelProperties: { - containerScan: { - serializedName: "containerScan", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachineKeySetList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachineKeySetList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BareMetalMachineKeySet", - }, - }, - }, - }, - }, - }, -}; - -export const KeySetUser: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KeySetUser", - modelProperties: { - azureUserName: { - serializedName: "azureUserName", - required: true, - type: { - name: "String", - }, - }, - description: { - constraints: { - MaxLength: 256, - }, - serializedName: "description", - type: { - name: "String", - }, - }, - sshPublicKey: { - serializedName: "sshPublicKey", - type: { - name: "Composite", - className: "SshPublicKey", - }, - }, - userPrincipalName: { - serializedName: "userPrincipalName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KeySetUserStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KeySetUserStatus", - modelProperties: { - azureUserName: { - serializedName: "azureUserName", - readOnly: true, - type: { - name: "String", - }, - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String", - }, - }, - statusMessage: { - constraints: { - MaxLength: 256, - }, - serializedName: "statusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachineKeySetPatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachineKeySetPatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - expiration: { - serializedName: "properties.expiration", - type: { - name: "DateTime", - }, - }, - jumpHostsAllowed: { - serializedName: "properties.jumpHostsAllowed", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - userList: { - serializedName: "properties.userList", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeySetUser", - }, - }, - }, - }, - }, - }, -}; - -export const BmcKeySetList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BmcKeySetList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BmcKeySet", - }, - }, - }, - }, - }, - }, -}; - -export const BmcKeySetPatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BmcKeySetPatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - expiration: { - serializedName: "properties.expiration", - type: { - name: "DateTime", - }, - }, - userList: { - serializedName: "properties.userList", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeySetUser", - }, - }, - }, - }, - }, - }, -}; - -export const ClusterContinueUpdateVersionParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterContinueUpdateVersionParameters", - modelProperties: { - machineGroupTargetingMode: { - defaultValue: "AlphaByRack", - serializedName: "machineGroupTargetingMode", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterDeployParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterDeployParameters", - modelProperties: { - skipValidationsForMachines: { - serializedName: "skipValidationsForMachines", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ClusterMetricsConfigurationList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterMetricsConfigurationList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClusterMetricsConfiguration", - }, - }, - }, - }, - }, - }, -}; - -export const ClusterMetricsConfigurationPatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterMetricsConfigurationPatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - collectionInterval: { - constraints: { - InclusiveMaximum: 1440, - InclusiveMinimum: 1, - }, - serializedName: "properties.collectionInterval", - type: { - name: "Number", - }, - }, - enabledMetrics: { - serializedName: "properties.enabledMetrics", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ClusterScanRuntimeParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterScanRuntimeParameters", - modelProperties: { - scanActivity: { - defaultValue: "Scan", - serializedName: "scanActivity", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterUpdateVersionParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterUpdateVersionParameters", - modelProperties: { - targetClusterVersion: { - serializedName: "targetClusterVersion", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KubernetesClusterPatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesClusterPatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - administratorConfiguration: { - serializedName: "properties.administratorConfiguration", - type: { - name: "Composite", - className: "AdministratorConfigurationPatch", - }, - }, - controlPlaneNodeConfiguration: { - serializedName: "properties.controlPlaneNodeConfiguration", - type: { - name: "Composite", - className: "ControlPlaneNodePatchConfiguration", - }, - }, - kubernetesVersion: { - serializedName: "properties.kubernetesVersion", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AdministratorConfigurationPatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AdministratorConfigurationPatch", - modelProperties: { - sshPublicKeys: { - serializedName: "sshPublicKeys", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SshPublicKey", - }, - }, - }, - }, - }, - }, -}; - -export const ControlPlaneNodePatchConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ControlPlaneNodePatchConfiguration", - modelProperties: { - administratorConfiguration: { - serializedName: "administratorConfiguration", - type: { - name: "Composite", - className: "AdministratorConfigurationPatch", - }, - }, - count: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "count", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AgentPoolList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AgentPoolList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AgentPool", - }, - }, - }, - }, - }, - }, -}; - -export const AgentPoolPatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AgentPoolPatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - administratorConfiguration: { - serializedName: "properties.administratorConfiguration", - type: { - name: "Composite", - className: "NodePoolAdministratorConfigurationPatch", - }, - }, - count: { - serializedName: "properties.count", - type: { - name: "Number", - }, - }, - upgradeSettings: { - serializedName: "properties.upgradeSettings", - type: { - name: "Composite", - className: "AgentPoolUpgradeSettings", - }, - }, - }, - }, -}; - -export const NodePoolAdministratorConfigurationPatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodePoolAdministratorConfigurationPatch", - modelProperties: { - sshPublicKeys: { - serializedName: "sshPublicKeys", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SshPublicKey", - }, - }, - }, - }, - }, - }, -}; - -export const KubernetesClusterFeatureList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesClusterFeatureList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KubernetesClusterFeature", - }, - }, - }, - }, - }, - }, -}; - -export const StringKeyValuePair: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StringKeyValuePair", - modelProperties: { - key: { - serializedName: "key", - required: true, - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KubernetesClusterFeaturePatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesClusterFeaturePatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - options: { - serializedName: "properties.options", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StringKeyValuePair", - }, - }, - }, - }, - }, - }, -}; - -export const KubernetesClusterRestartNodeParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesClusterRestartNodeParameters", - modelProperties: { - nodeName: { - serializedName: "nodeName", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const L2NetworkPatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "L2NetworkPatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const L3NetworkPatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "L3NetworkPatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const RackPatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RackPatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - rackLocation: { - constraints: { - MaxLength: 256, - }, - serializedName: "properties.rackLocation", - type: { - name: "String", - }, - }, - rackSerialNumber: { - constraints: { - MaxLength: 64, - MinLength: 1, - }, - serializedName: "properties.rackSerialNumber", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StorageAppliancePatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageAppliancePatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - serialNumber: { - serializedName: "properties.serialNumber", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StorageApplianceEnableRemoteVendorManagementParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageApplianceEnableRemoteVendorManagementParameters", - modelProperties: { - supportEndpoints: { - serializedName: "supportEndpoints", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const StorageApplianceRunReadCommandsParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageApplianceRunReadCommandsParameters", - modelProperties: { - commands: { - constraints: { - MinItems: 1, - }, - serializedName: "commands", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageApplianceCommandSpecification", - }, - }, - }, - }, - limitTimeSeconds: { - constraints: { - InclusiveMaximum: 14400, - InclusiveMinimum: 60, - }, - serializedName: "limitTimeSeconds", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const StorageApplianceCommandSpecification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageApplianceCommandSpecification", - modelProperties: { - arguments: { - serializedName: "arguments", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - command: { - serializedName: "command", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TrunkedNetworkPatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrunkedNetworkPatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const VirtualMachinePatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachinePatchParameters", - modelProperties: { - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - vmImageRepositoryCredentials: { - serializedName: "properties.vmImageRepositoryCredentials", - type: { - name: "Composite", - className: "ImageRepositoryCredentials", - }, - }, - }, - }, -}; - -export const VirtualMachineAssignRelayParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineAssignRelayParameters", - modelProperties: { - machineId: { - serializedName: "machineId", - required: true, - type: { - name: "String", - }, - }, - relayType: { - defaultValue: "Platform", - serializedName: "relayType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConsoleList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConsoleList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Console", - }, - }, - }, - }, - }, - }, -}; - -export const ConsolePatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConsolePatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - enabled: { - serializedName: "properties.enabled", - type: { - name: "String", - }, - }, - expiration: { - serializedName: "properties.expiration", - type: { - name: "DateTime", - }, - }, - sshPublicKey: { - serializedName: "properties.sshPublicKey", - type: { - name: "Composite", - className: "SshPublicKey", - }, - }, - }, - }, -}; - -export const VirtualMachinePowerOffParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachinePowerOffParameters", - modelProperties: { - skipShutdown: { - defaultValue: "False", - serializedName: "skipShutdown", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VolumePatchParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VolumePatchParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const AgentPoolConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AgentPoolConfiguration", - modelProperties: { - administratorConfiguration: { - serializedName: "administratorConfiguration", - type: { - name: "Composite", - className: "AdministratorConfiguration", - }, - }, - agentOptions: { - serializedName: "agentOptions", - type: { - name: "Composite", - className: "AgentOptions", - }, - }, - attachedNetworkConfiguration: { - serializedName: "attachedNetworkConfiguration", - type: { - name: "Composite", - className: "AttachedNetworkConfiguration", - }, - }, - availabilityZones: { - serializedName: "availabilityZones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - count: { - serializedName: "count", - required: true, - type: { - name: "Number", - }, - }, - labels: { - serializedName: "labels", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KubernetesLabel", - }, - }, - }, - }, - mode: { - serializedName: "mode", - required: true, - type: { - name: "String", - }, - }, - taints: { - serializedName: "taints", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KubernetesLabel", - }, - }, - }, - }, - upgradeSettings: { - serializedName: "upgradeSettings", - type: { - name: "Composite", - className: "AgentPoolUpgradeSettings", - }, - }, - vmSkuName: { - serializedName: "vmSkuName", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagsParameter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TagsParameter", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const TrackedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RackSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RackSku", - modelProperties: { - ...Resource.type.modelProperties, - computeMachines: { - serializedName: "properties.computeMachines", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MachineSkuSlot", - }, - }, - }, - }, - controllerMachines: { - serializedName: "properties.controllerMachines", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MachineSkuSlot", - }, - }, - }, - }, - description: { - serializedName: "properties.description", - readOnly: true, - type: { - name: "String", - }, - }, - maxClusterSlots: { - serializedName: "properties.maxClusterSlots", - readOnly: true, - type: { - name: "Number", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - rackType: { - serializedName: "properties.rackType", - readOnly: true, - type: { - name: "String", - }, - }, - storageAppliances: { - serializedName: "properties.storageAppliances", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageApplianceSkuSlot", - }, - }, - }, - }, - supportedRackSkuIds: { - serializedName: "properties.supportedRackSkuIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const BareMetalMachine: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachine", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - actionStates: { - serializedName: "properties.actionStates", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ActionState", - }, - }, - }, - }, - associatedResourceIds: { - serializedName: "properties.associatedResourceIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - bmcConnectionString: { - serializedName: "properties.bmcConnectionString", - required: true, - type: { - name: "String", - }, - }, - bmcCredentials: { - serializedName: "properties.bmcCredentials", - type: { - name: "Composite", - className: "AdministrativeCredentials", - }, - }, - bmcMacAddress: { - constraints: { - Pattern: new RegExp("^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"), - }, - serializedName: "properties.bmcMacAddress", - required: true, - type: { - name: "String", - }, - }, - bootMacAddress: { - constraints: { - Pattern: new RegExp("^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"), - }, - serializedName: "properties.bootMacAddress", - required: true, - type: { - name: "String", - }, - }, - caCertificate: { - serializedName: "properties.caCertificate", - type: { - name: "Composite", - className: "CertificateInfo", - }, - }, - clusterId: { - serializedName: "properties.clusterId", - readOnly: true, - type: { - name: "String", - }, - }, - cordonStatus: { - serializedName: "properties.cordonStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - hardwareInventory: { - serializedName: "properties.hardwareInventory", - type: { - name: "Composite", - className: "HardwareInventory", - }, - }, - hardwareValidationStatus: { - serializedName: "properties.hardwareValidationStatus", - type: { - name: "Composite", - className: "HardwareValidationStatus", - }, - }, - hybridAksClustersAssociatedIds: { - serializedName: "properties.hybridAksClustersAssociatedIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - kubernetesNodeName: { - serializedName: "properties.kubernetesNodeName", - readOnly: true, - type: { - name: "String", - }, - }, - kubernetesVersion: { - serializedName: "properties.kubernetesVersion", - readOnly: true, - type: { - name: "String", - }, - }, - machineClusterVersion: { - serializedName: "properties.machineClusterVersion", - type: { - name: "String", - }, - }, - machineDetails: { - constraints: { - MaxLength: 256, - }, - serializedName: "properties.machineDetails", - required: true, - type: { - name: "String", - }, - }, - machineName: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9]{0,62}[a-zA-Z0-9])$"), - }, - serializedName: "properties.machineName", - required: true, - type: { - name: "String", - }, - }, - machineRoles: { - serializedName: "properties.machineRoles", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - machineSkuId: { - serializedName: "properties.machineSkuId", - required: true, - type: { - name: "String", - }, - }, - oamIpv4Address: { - serializedName: "properties.oamIpv4Address", - readOnly: true, - type: { - name: "String", - }, - }, - oamIpv6Address: { - serializedName: "properties.oamIpv6Address", - readOnly: true, - type: { - name: "String", - }, - }, - osImage: { - serializedName: "properties.osImage", - readOnly: true, - type: { - name: "String", - }, - }, - powerState: { - serializedName: "properties.powerState", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - rackId: { - serializedName: "properties.rackId", - required: true, - type: { - name: "String", - }, - }, - rackSlot: { - constraints: { - InclusiveMaximum: 256, - InclusiveMinimum: 1, - }, - serializedName: "properties.rackSlot", - required: true, - type: { - name: "Number", - }, - }, - readyState: { - serializedName: "properties.readyState", - readOnly: true, - type: { - name: "String", - }, - }, - runtimeProtectionStatus: { - serializedName: "properties.runtimeProtectionStatus", - type: { - name: "Composite", - className: "RuntimeProtectionStatus", - }, - }, - secretRotationStatus: { - serializedName: "properties.secretRotationStatus", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecretRotationStatus", - }, - }, - }, - }, - serialNumber: { - constraints: { - MaxLength: 64, - MinLength: 1, - }, - serializedName: "properties.serialNumber", - required: true, - type: { - name: "String", - }, - }, - serviceTag: { - serializedName: "properties.serviceTag", - readOnly: true, - type: { - name: "String", - }, - }, - virtualMachinesAssociatedIds: { - serializedName: "properties.virtualMachinesAssociatedIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const CloudServicesNetwork: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudServicesNetwork", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - additionalEgressEndpoints: { - serializedName: "properties.additionalEgressEndpoints", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EgressEndpoint", - }, - }, - }, - }, - associatedResourceIds: { - serializedName: "properties.associatedResourceIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - clusterId: { - serializedName: "properties.clusterId", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - enableDefaultEgressEndpoints: { - serializedName: "properties.enableDefaultEgressEndpoints", - type: { - name: "String", - }, - }, - enabledEgressEndpoints: { - serializedName: "properties.enabledEgressEndpoints", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EgressEndpoint", - }, - }, - }, - }, - hybridAksClustersAssociatedIds: { - serializedName: "properties.hybridAksClustersAssociatedIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - interfaceName: { - serializedName: "properties.interfaceName", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - storageOptions: { - serializedName: "properties.storageOptions", - type: { - name: "Composite", - className: "CloudServicesNetworkStorageOptions", - }, - }, - storageStatus: { - serializedName: "properties.storageStatus", - type: { - name: "Composite", - className: "CloudServicesNetworkStorageStatus", - }, - }, - virtualMachinesAssociatedIds: { - serializedName: "properties.virtualMachinesAssociatedIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ClusterManager: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterManager", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - analyticsWorkspaceId: { - serializedName: "properties.analyticsWorkspaceId", - type: { - name: "String", - }, - }, - availabilityZones: { - serializedName: "properties.availabilityZones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - clusterVersions: { - serializedName: "properties.clusterVersions", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClusterAvailableVersion", - }, - }, - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - fabricControllerId: { - serializedName: "properties.fabricControllerId", - required: true, - type: { - name: "String", - }, - }, - managedResourceGroupConfiguration: { - serializedName: "properties.managedResourceGroupConfiguration", - type: { - name: "Composite", - className: "ManagedResourceGroupConfiguration", - }, - }, - managerExtendedLocation: { - serializedName: "properties.managerExtendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - vmSize: { - serializedName: "properties.vmSize", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Cluster: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Cluster", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - actionStates: { - serializedName: "properties.actionStates", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ActionState", - }, - }, - }, - }, - aggregatorOrSingleRackDefinition: { - serializedName: "properties.aggregatorOrSingleRackDefinition", - type: { - name: "Composite", - className: "RackDefinition", - }, - }, - analyticsOutputSettings: { - serializedName: "properties.analyticsOutputSettings", - type: { - name: "Composite", - className: "AnalyticsOutputSettings", - }, - }, - analyticsWorkspaceId: { - serializedName: "properties.analyticsWorkspaceId", - type: { - name: "String", - }, - }, - availableUpgradeVersions: { - serializedName: "properties.availableUpgradeVersions", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClusterAvailableUpgradeVersion", - }, - }, - }, - }, - clusterCapacity: { - serializedName: "properties.clusterCapacity", - type: { - name: "Composite", - className: "ClusterCapacity", - }, - }, - clusterConnectionStatus: { - serializedName: "properties.clusterConnectionStatus", - readOnly: true, - type: { - name: "String", - }, - }, - clusterExtendedLocation: { - serializedName: "properties.clusterExtendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - clusterLocation: { - constraints: { - MaxLength: 256, - }, - serializedName: "properties.clusterLocation", - type: { - name: "String", - }, - }, - clusterManagerConnectionStatus: { - serializedName: "properties.clusterManagerConnectionStatus", - readOnly: true, - type: { - name: "String", - }, - }, - clusterManagerId: { - serializedName: "properties.clusterManagerId", - readOnly: true, - type: { - name: "String", - }, - }, - clusterServicePrincipal: { - serializedName: "properties.clusterServicePrincipal", - type: { - name: "Composite", - className: "ServicePrincipalInformation", - }, - }, - clusterType: { - serializedName: "properties.clusterType", - required: true, - type: { - name: "String", - }, - }, - clusterVersion: { - serializedName: "properties.clusterVersion", - required: true, - type: { - name: "String", - }, - }, - commandOutputSettings: { - serializedName: "properties.commandOutputSettings", - type: { - name: "Composite", - className: "CommandOutputSettings", - }, - }, - computeDeploymentThreshold: { - serializedName: "properties.computeDeploymentThreshold", - type: { - name: "Composite", - className: "ValidationThreshold", - }, - }, - computeRackDefinitions: { - serializedName: "properties.computeRackDefinitions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RackDefinition", - }, - }, - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - hybridAksExtendedLocation: { - serializedName: "properties.hybridAksExtendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - managedResourceGroupConfiguration: { - serializedName: "properties.managedResourceGroupConfiguration", - type: { - name: "Composite", - className: "ManagedResourceGroupConfiguration", - }, - }, - manualActionCount: { - serializedName: "properties.manualActionCount", - readOnly: true, - type: { - name: "Number", - }, - }, - networkFabricId: { - serializedName: "properties.networkFabricId", - required: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - runtimeProtectionConfiguration: { - serializedName: "properties.runtimeProtectionConfiguration", - type: { - name: "Composite", - className: "RuntimeProtectionConfiguration", - }, - }, - secretArchive: { - serializedName: "properties.secretArchive", - type: { - name: "Composite", - className: "ClusterSecretArchive", - }, - }, - secretArchiveSettings: { - serializedName: "properties.secretArchiveSettings", - type: { - name: "Composite", - className: "SecretArchiveSettings", - }, - }, - supportExpiryDate: { - serializedName: "properties.supportExpiryDate", - readOnly: true, - type: { - name: "String", - }, - }, - updateStrategy: { - serializedName: "properties.updateStrategy", - type: { - name: "Composite", - className: "ClusterUpdateStrategy", - }, - }, - vulnerabilityScanningSettings: { - serializedName: "properties.vulnerabilityScanningSettings", - type: { - name: "Composite", - className: "VulnerabilityScanningSettings", - }, - }, - workloadResourceIds: { - serializedName: "properties.workloadResourceIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const KubernetesCluster: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesCluster", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - aadConfiguration: { - serializedName: "properties.aadConfiguration", - type: { - name: "Composite", - className: "AadConfiguration", - }, - }, - administratorConfiguration: { - serializedName: "properties.administratorConfiguration", - type: { - name: "Composite", - className: "AdministratorConfiguration", - }, - }, - attachedNetworkIds: { - serializedName: "properties.attachedNetworkIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - availableUpgrades: { - serializedName: "properties.availableUpgrades", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailableUpgrade", - }, - }, - }, - }, - clusterId: { - serializedName: "properties.clusterId", - readOnly: true, - type: { - name: "String", - }, - }, - connectedClusterId: { - serializedName: "properties.connectedClusterId", - readOnly: true, - type: { - name: "String", - }, - }, - controlPlaneKubernetesVersion: { - serializedName: "properties.controlPlaneKubernetesVersion", - readOnly: true, - type: { - name: "String", - }, - }, - controlPlaneNodeConfiguration: { - serializedName: "properties.controlPlaneNodeConfiguration", - type: { - name: "Composite", - className: "ControlPlaneNodeConfiguration", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - featureStatuses: { - serializedName: "properties.featureStatuses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FeatureStatus", - }, - }, - }, - }, - initialAgentPoolConfigurations: { - constraints: { - MinItems: 1, - }, - serializedName: "properties.initialAgentPoolConfigurations", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InitialAgentPoolConfiguration", - }, - }, - }, - }, - kubernetesVersion: { - serializedName: "properties.kubernetesVersion", - required: true, - type: { - name: "String", - }, - }, - managedResourceGroupConfiguration: { - serializedName: "properties.managedResourceGroupConfiguration", - type: { - name: "Composite", - className: "ManagedResourceGroupConfiguration", - }, - }, - networkConfiguration: { - serializedName: "properties.networkConfiguration", - type: { - name: "Composite", - className: "NetworkConfiguration", - }, - }, - nodes: { - serializedName: "properties.nodes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KubernetesClusterNode", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const L2Network: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "L2Network", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - associatedResourceIds: { - serializedName: "properties.associatedResourceIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - clusterId: { - serializedName: "properties.clusterId", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - hybridAksClustersAssociatedIds: { - serializedName: "properties.hybridAksClustersAssociatedIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - hybridAksPluginType: { - serializedName: "properties.hybridAksPluginType", - type: { - name: "String", - }, - }, - interfaceName: { - constraints: { - Pattern: new RegExp("^[a-zA-Z0-9@._-]*$"), - MaxLength: 12, - }, - serializedName: "properties.interfaceName", - type: { - name: "String", - }, - }, - l2IsolationDomainId: { - serializedName: "properties.l2IsolationDomainId", - required: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - virtualMachinesAssociatedIds: { - serializedName: "properties.virtualMachinesAssociatedIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const L3Network: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "L3Network", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - associatedResourceIds: { - serializedName: "properties.associatedResourceIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - clusterId: { - serializedName: "properties.clusterId", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - hybridAksClustersAssociatedIds: { - serializedName: "properties.hybridAksClustersAssociatedIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - hybridAksIpamEnabled: { - defaultValue: "True", - serializedName: "properties.hybridAksIpamEnabled", - type: { - name: "String", - }, - }, - hybridAksPluginType: { - serializedName: "properties.hybridAksPluginType", - type: { - name: "String", - }, - }, - interfaceName: { - constraints: { - Pattern: new RegExp("^[a-zA-Z0-9@._-]*$"), - MaxLength: 12, - }, - serializedName: "properties.interfaceName", - type: { - name: "String", - }, - }, - ipAllocationType: { - defaultValue: "DualStack", - serializedName: "properties.ipAllocationType", - type: { - name: "String", - }, - }, - ipv4ConnectedPrefix: { - serializedName: "properties.ipv4ConnectedPrefix", - type: { - name: "String", - }, - }, - ipv6ConnectedPrefix: { - serializedName: "properties.ipv6ConnectedPrefix", - type: { - name: "String", - }, - }, - l3IsolationDomainId: { - serializedName: "properties.l3IsolationDomainId", - required: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - virtualMachinesAssociatedIds: { - serializedName: "properties.virtualMachinesAssociatedIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - vlan: { - serializedName: "properties.vlan", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const Rack: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Rack", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - availabilityZone: { - constraints: { - Pattern: new RegExp("^[a-zA-Z0-9]{1,10}$"), - }, - serializedName: "properties.availabilityZone", - required: true, - type: { - name: "String", - }, - }, - clusterId: { - serializedName: "properties.clusterId", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - rackLocation: { - constraints: { - MaxLength: 256, - }, - serializedName: "properties.rackLocation", - required: true, - type: { - name: "String", - }, - }, - rackSerialNumber: { - constraints: { - MaxLength: 64, - MinLength: 1, - }, - serializedName: "properties.rackSerialNumber", - required: true, - type: { - name: "String", - }, - }, - rackSkuId: { - serializedName: "properties.rackSkuId", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StorageAppliance: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageAppliance", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - administratorCredentials: { - serializedName: "properties.administratorCredentials", - type: { - name: "Composite", - className: "AdministrativeCredentials", - }, - }, - caCertificate: { - serializedName: "properties.caCertificate", - type: { - name: "Composite", - className: "CertificateInfo", - }, - }, - capacity: { - serializedName: "properties.capacity", - readOnly: true, - type: { - name: "Number", - }, - }, - capacityUsed: { - serializedName: "properties.capacityUsed", - readOnly: true, - type: { - name: "Number", - }, - }, - clusterId: { - serializedName: "properties.clusterId", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - managementIpv4Address: { - serializedName: "properties.managementIpv4Address", - readOnly: true, - type: { - name: "String", - }, - }, - manufacturer: { - serializedName: "properties.manufacturer", - readOnly: true, - type: { - name: "String", - }, - }, - model: { - serializedName: "properties.model", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - rackId: { - serializedName: "properties.rackId", - required: true, - type: { - name: "String", - }, - }, - rackSlot: { - constraints: { - InclusiveMaximum: 256, - InclusiveMinimum: 1, - }, - serializedName: "properties.rackSlot", - required: true, - type: { - name: "Number", - }, - }, - remoteVendorManagementFeature: { - serializedName: "properties.remoteVendorManagementFeature", - readOnly: true, - type: { - name: "String", - }, - }, - remoteVendorManagementStatus: { - serializedName: "properties.remoteVendorManagementStatus", - readOnly: true, - type: { - name: "String", - }, - }, - secretRotationStatus: { - serializedName: "properties.secretRotationStatus", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecretRotationStatus", - }, - }, - }, - }, - serialNumber: { - serializedName: "properties.serialNumber", - required: true, - type: { - name: "String", - }, - }, - storageApplianceSkuId: { - serializedName: "properties.storageApplianceSkuId", - required: true, - type: { - name: "String", - }, - }, - version: { - serializedName: "properties.version", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TrunkedNetwork: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrunkedNetwork", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - associatedResourceIds: { - serializedName: "properties.associatedResourceIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - clusterId: { - serializedName: "properties.clusterId", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - hybridAksClustersAssociatedIds: { - serializedName: "properties.hybridAksClustersAssociatedIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - hybridAksPluginType: { - serializedName: "properties.hybridAksPluginType", - type: { - name: "String", - }, - }, - interfaceName: { - constraints: { - Pattern: new RegExp("^[a-zA-Z0-9@._-]*$"), - MaxLength: 12, - }, - serializedName: "properties.interfaceName", - type: { - name: "String", - }, - }, - isolationDomainIds: { - constraints: { - MinItems: 1, - }, - serializedName: "properties.isolationDomainIds", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - virtualMachinesAssociatedIds: { - serializedName: "properties.virtualMachinesAssociatedIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - vlans: { - constraints: { - MinItems: 1, - }, - serializedName: "properties.vlans", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Number", - }, - }, - }, - }, - }, - }, -}; - -export const VirtualMachine: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachine", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - adminUsername: { - constraints: { - Pattern: new RegExp("^[a-z_][a-z0-9_]{0,31}$"), - MaxLength: 32, - MinLength: 1, - }, - serializedName: "properties.adminUsername", - required: true, - type: { - name: "String", - }, - }, - availabilityZone: { - serializedName: "properties.availabilityZone", - readOnly: true, - type: { - name: "String", - }, - }, - bareMetalMachineId: { - serializedName: "properties.bareMetalMachineId", - readOnly: true, - type: { - name: "String", - }, - }, - bootMethod: { - defaultValue: "UEFI", - serializedName: "properties.bootMethod", - type: { - name: "String", - }, - }, - cloudServicesNetworkAttachment: { - serializedName: "properties.cloudServicesNetworkAttachment", - type: { - name: "Composite", - className: "NetworkAttachment", - }, - }, - clusterId: { - serializedName: "properties.clusterId", - readOnly: true, - type: { - name: "String", - }, - }, - consoleExtendedLocation: { - serializedName: "properties.consoleExtendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - cpuCores: { - constraints: { - InclusiveMinimum: 2, - }, - serializedName: "properties.cpuCores", - required: true, - type: { - name: "Number", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - isolateEmulatorThread: { - defaultValue: "True", - serializedName: "properties.isolateEmulatorThread", - type: { - name: "String", - }, - }, - memorySizeGB: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "properties.memorySizeGB", - required: true, - type: { - name: "Number", - }, - }, - networkAttachments: { - serializedName: "properties.networkAttachments", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkAttachment", - }, - }, - }, - }, - networkData: { - serializedName: "properties.networkData", - type: { - name: "String", - }, - }, - networkDataContent: { - serializedName: "properties.networkDataContent", - type: { - name: "String", - }, - }, - placementHints: { - serializedName: "properties.placementHints", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachinePlacementHint", - }, - }, - }, - }, - powerState: { - serializedName: "properties.powerState", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - sshPublicKeys: { - serializedName: "properties.sshPublicKeys", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SshPublicKey", - }, - }, - }, - }, - storageProfile: { - serializedName: "properties.storageProfile", - type: { - name: "Composite", - className: "StorageProfile", - }, - }, - userData: { - serializedName: "properties.userData", - type: { - name: "String", - }, - }, - userDataContent: { - serializedName: "properties.userDataContent", - type: { - name: "String", - }, - }, - virtioInterface: { - defaultValue: "Modern", - serializedName: "properties.virtioInterface", - type: { - name: "String", - }, - }, - vmDeviceModel: { - defaultValue: "T2", - serializedName: "properties.vmDeviceModel", - type: { - name: "String", - }, - }, - vmImage: { - serializedName: "properties.vmImage", - required: true, - type: { - name: "String", - }, - }, - vmImageRepositoryCredentials: { - serializedName: "properties.vmImageRepositoryCredentials", - type: { - name: "Composite", - className: "ImageRepositoryCredentials", - }, - }, - volumes: { - serializedName: "properties.volumes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const Volume: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Volume", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - allocatedSizeMiB: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "properties.allocatedSizeMiB", - readOnly: true, - type: { - name: "Number", - }, - }, - attachedTo: { - serializedName: "properties.attachedTo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - serialNumber: { - serializedName: "properties.serialNumber", - readOnly: true, - type: { - name: "String", - }, - }, - sizeMiB: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "properties.sizeMiB", - required: true, - type: { - name: "Number", - }, - }, - storageApplianceId: { - serializedName: "properties.storageApplianceId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachineKeySet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachineKeySet", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - azureGroupId: { - serializedName: "properties.azureGroupId", - required: true, - type: { - name: "String", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - expiration: { - serializedName: "properties.expiration", - required: true, - type: { - name: "DateTime", - }, - }, - jumpHostsAllowed: { - serializedName: "properties.jumpHostsAllowed", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - lastValidation: { - serializedName: "properties.lastValidation", - readOnly: true, - type: { - name: "DateTime", - }, - }, - osGroupName: { - constraints: { - Pattern: new RegExp("^([A-Za-z]([A-Za-z0-9]*))$"), - MaxLength: 32, - }, - serializedName: "properties.osGroupName", - type: { - name: "String", - }, - }, - privilegeLevel: { - serializedName: "properties.privilegeLevel", - required: true, - type: { - name: "String", - }, - }, - privilegeLevelName: { - serializedName: "properties.privilegeLevelName", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - userList: { - serializedName: "properties.userList", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeySetUser", - }, - }, - }, - }, - userListStatus: { - serializedName: "properties.userListStatus", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeySetUserStatus", - }, - }, - }, - }, - }, - }, -}; - -export const BmcKeySet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BmcKeySet", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - azureGroupId: { - serializedName: "properties.azureGroupId", - required: true, - type: { - name: "String", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - expiration: { - serializedName: "properties.expiration", - required: true, - type: { - name: "DateTime", - }, - }, - lastValidation: { - serializedName: "properties.lastValidation", - readOnly: true, - type: { - name: "DateTime", - }, - }, - privilegeLevel: { - serializedName: "properties.privilegeLevel", - required: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - userList: { - serializedName: "properties.userList", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeySetUser", - }, - }, - }, - }, - userListStatus: { - serializedName: "properties.userListStatus", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeySetUserStatus", - }, - }, - }, - }, - }, - }, -}; - -export const ClusterMetricsConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterMetricsConfiguration", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - collectionInterval: { - constraints: { - InclusiveMaximum: 1440, - InclusiveMinimum: 1, - }, - serializedName: "properties.collectionInterval", - required: true, - type: { - name: "Number", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - disabledMetrics: { - serializedName: "properties.disabledMetrics", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - enabledMetrics: { - serializedName: "properties.enabledMetrics", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AgentPool: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AgentPool", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - administratorConfiguration: { - serializedName: "properties.administratorConfiguration", - type: { - name: "Composite", - className: "AdministratorConfiguration", - }, - }, - agentOptions: { - serializedName: "properties.agentOptions", - type: { - name: "Composite", - className: "AgentOptions", - }, - }, - attachedNetworkConfiguration: { - serializedName: "properties.attachedNetworkConfiguration", - type: { - name: "Composite", - className: "AttachedNetworkConfiguration", - }, - }, - availabilityZones: { - serializedName: "properties.availabilityZones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - count: { - serializedName: "properties.count", - required: true, - type: { - name: "Number", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - kubernetesVersion: { - serializedName: "properties.kubernetesVersion", - readOnly: true, - type: { - name: "String", - }, - }, - labels: { - serializedName: "properties.labels", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KubernetesLabel", - }, - }, - }, - }, - mode: { - serializedName: "properties.mode", - required: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - taints: { - serializedName: "properties.taints", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KubernetesLabel", - }, - }, - }, - }, - upgradeSettings: { - serializedName: "properties.upgradeSettings", - type: { - name: "Composite", - className: "AgentPoolUpgradeSettings", - }, - }, - vmSkuName: { - serializedName: "properties.vmSkuName", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KubernetesClusterFeature: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesClusterFeature", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - availabilityLifecycle: { - serializedName: "properties.availabilityLifecycle", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - options: { - serializedName: "properties.options", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StringKeyValuePair", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - required: { - serializedName: "properties.required", - readOnly: true, - type: { - name: "String", - }, - }, - version: { - serializedName: "properties.version", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Console: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Console", - modelProperties: { - ...TrackedResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation", - }, - }, - detailedStatus: { - serializedName: "properties.detailedStatus", - readOnly: true, - type: { - name: "String", - }, - }, - detailedStatusMessage: { - serializedName: "properties.detailedStatusMessage", - readOnly: true, - type: { - name: "String", - }, - }, - enabled: { - serializedName: "properties.enabled", - required: true, - type: { - name: "String", - }, - }, - expiration: { - serializedName: "properties.expiration", - type: { - name: "DateTime", - }, - }, - privateLinkServiceId: { - serializedName: "properties.privateLinkServiceId", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - sshPublicKey: { - serializedName: "properties.sshPublicKey", - type: { - name: "Composite", - className: "SshPublicKey", - }, - }, - virtualMachineAccessId: { - serializedName: "properties.virtualMachineAccessId", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinesCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinesCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinesUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinesUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinesCordonHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinesCordonHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinesPowerOffHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinesPowerOffHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinesReimageHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinesReimageHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinesReplaceHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinesReplaceHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinesRestartHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinesRestartHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinesRunCommandHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinesRunCommandHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinesRunDataExtractsHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinesRunDataExtractsHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinesRunDataExtractsRestrictedHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinesRunDataExtractsRestrictedHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinesRunReadCommandsHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinesRunReadCommandsHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinesStartHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinesStartHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachinesUncordonHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachinesUncordonHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CloudServicesNetworksCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudServicesNetworksCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CloudServicesNetworksDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudServicesNetworksDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CloudServicesNetworksUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudServicesNetworksUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterManagersCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterManagersCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterManagersDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterManagersDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClustersCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClustersCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClustersDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClustersDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClustersUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClustersUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClustersContinueUpdateVersionHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClustersContinueUpdateVersionHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClustersDeployHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClustersDeployHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClustersScanRuntimeHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClustersScanRuntimeHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClustersUpdateVersionHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClustersUpdateVersionHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KubernetesClustersCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesClustersCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KubernetesClustersDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesClustersDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KubernetesClustersUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesClustersUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KubernetesClustersRestartNodeHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesClustersRestartNodeHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const L2NetworksCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "L2NetworksCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const L2NetworksDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "L2NetworksDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const L3NetworksCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "L3NetworksCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const L3NetworksDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "L3NetworksDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RacksCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RacksCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RacksDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RacksDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RacksUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RacksUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StorageAppliancesCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageAppliancesCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StorageAppliancesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageAppliancesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StorageAppliancesUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageAppliancesUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StorageAppliancesDisableRemoteVendorManagementHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageAppliancesDisableRemoteVendorManagementHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StorageAppliancesEnableRemoteVendorManagementHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageAppliancesEnableRemoteVendorManagementHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StorageAppliancesRunReadCommandsHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageAppliancesRunReadCommandsHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TrunkedNetworksCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrunkedNetworksCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TrunkedNetworksDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrunkedNetworksDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachinesCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachinesCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachinesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachinesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachinesUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachinesUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachinesAssignRelayHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachinesAssignRelayHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachinesPowerOffHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachinesPowerOffHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachinesReimageHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachinesReimageHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachinesRestartHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachinesRestartHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachinesStartHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachinesStartHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VolumesCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VolumesCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VolumesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VolumesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachineKeySetsCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachineKeySetsCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachineKeySetsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachineKeySetsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BareMetalMachineKeySetsUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BareMetalMachineKeySetsUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BmcKeySetsCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BmcKeySetsCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BmcKeySetsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BmcKeySetsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BmcKeySetsUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BmcKeySetsUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const MetricsConfigurationsCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricsConfigurationsCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const MetricsConfigurationsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricsConfigurationsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const MetricsConfigurationsUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricsConfigurationsUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AgentPoolsCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AgentPoolsCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AgentPoolsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AgentPoolsDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AgentPoolsUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AgentPoolsUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KubernetesClusterFeaturesCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesClusterFeaturesCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KubernetesClusterFeaturesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesClusterFeaturesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KubernetesClusterFeaturesUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KubernetesClusterFeaturesUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConsolesCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConsolesCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConsolesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConsolesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConsolesUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConsolesUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/models/models.ts b/sdk/networkcloud/arm-networkcloud/src/models/models.ts new file mode 100644 index 000000000000..770afacc8036 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/models/models.ts @@ -0,0 +1,11649 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { areAllPropsUndefined } from "../static-helpers/serialization/check-prop-undefined.js"; + +/** + * This file contains only generated model types and their (de)serializers. + * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input. + */ +/* eslint-disable @typescript-eslint/naming-convention */ +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface _OperationListResult { + /** The Operation items on this page */ + value: Operation[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _operationListResultDeserializer(item: any): _OperationListResult { + return { + value: operationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function operationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return operationDeserializer(item); + }); +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ + readonly name?: string; + /** Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations. */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; + /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ + readonly origin?: Origin; + /** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ + readonly actionType?: ActionType; +} + +export function operationDeserializer(item: any): Operation { + return { + name: item["name"], + isDataAction: item["isDataAction"], + display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]), + origin: item["origin"], + actionType: item["actionType"], + }; +} + +/** Localized display information for an operation. */ +export interface OperationDisplay { + /** The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */ + readonly provider?: string; + /** The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". */ + readonly resource?: string; + /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". */ + readonly operation?: string; + /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ + readonly description?: string; +} + +export function operationDisplayDeserializer(item: any): OperationDisplay { + return { + provider: item["provider"], + resource: item["resource"], + operation: item["operation"], + description: item["description"], + }; +} + +/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ +export enum KnownOrigin { + /** Indicates the operation is initiated by a user. */ + User = "user", + /** Indicates the operation is initiated by a system. */ + System = "system", + /** Indicates the operation is initiated by a user or system. */ + UserSystem = "user,system", +} + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user**: Indicates the operation is initiated by a user. \ + * **system**: Indicates the operation is initiated by a system. \ + * **user,system**: Indicates the operation is initiated by a user or system. + */ +export type Origin = string; + +/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +export enum KnownActionType { + /** Actions are for internal-only APIs. */ + Internal = "Internal", +} + +/** + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal**: Actions are for internal-only APIs. + */ +export type ActionType = string; + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +export function errorResponseDeserializer(item: any): ErrorResponse { + return { + error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]), + }; +} + +/** The error detail. */ +export interface ErrorDetail { + /** The error code. */ + readonly code?: string; + /** The error message. */ + readonly message?: string; + /** The error target. */ + readonly target?: string; + /** The error details. */ + readonly details?: ErrorDetail[]; + /** The error additional info. */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +export function errorDetailDeserializer(item: any): ErrorDetail { + return { + code: item["code"], + message: item["message"], + target: item["target"], + details: !item["details"] ? item["details"] : errorDetailArrayDeserializer(item["details"]), + additionalInfo: !item["additionalInfo"] + ? item["additionalInfo"] + : errorAdditionalInfoArrayDeserializer(item["additionalInfo"]), + }; +} + +export function errorDetailArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorDetailDeserializer(item); + }); +} + +export function errorAdditionalInfoArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorAdditionalInfoDeserializer(item); + }); +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** The additional info type. */ + readonly type?: string; + /** The additional info. */ + readonly info?: any; +} + +export function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo { + return { + type: item["type"], + info: item["info"], + }; +} + +/** AccessBridge represents a managed access bridge resource. */ +export interface AccessBridge extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** The IPv4 subnet from which the access bridge allocates an address. This subnet must be part of the internal network specified by networkId. */ + ipv4ConnectedPrefix?: string; + /** The IPv6 subnet from which the access bridge allocates an address. This subnet must be part of the internal network specified by networkId. */ + ipv6ConnectedPrefix?: string; + /** The resource ID of the internal network in a layer 3 isolation domain containing the IP subnets to use. */ + networkId: string; + /** The list of security rules enforced by the access bridge. */ + securityRules?: AccessBridgeSecurityRule[]; + /** The detailed status reported by the access bridge. */ + readonly detailedStatus?: AccessBridgeDetailedStatus; + /** The descriptive message that accompanies the detailed status. */ + readonly detailedStatusMessage?: string; + /** The observed endpoints that clients should use to reach the access bridge. */ + readonly endpoints?: AccessBridgeEndpoint[]; + /** The protocol advertised by the access bridge endpoints. */ + readonly protocol?: TransportProtocol; + /** The provisioning state of the access bridge. */ + readonly provisioningState?: AccessBridgeProvisioningState; +} + +export function accessBridgeSerializer(item: AccessBridge): any { + return { + tags: item["tags"], + location: item["location"], + properties: _accessBridgePropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function accessBridgeDeserializer(item: any): AccessBridge { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._accessBridgePropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** AccessBridgeProperties captures the input and status for an access bridge. */ +export interface AccessBridgeProperties { + /** The IPv4 subnet from which the access bridge allocates an address. This subnet must be part of the internal network specified by networkId. */ + ipv4ConnectedPrefix?: string; + /** The IPv6 subnet from which the access bridge allocates an address. This subnet must be part of the internal network specified by networkId. */ + ipv6ConnectedPrefix?: string; + /** The resource ID of the internal network in a layer 3 isolation domain containing the IP subnets to use. */ + networkId: string; + /** The list of security rules enforced by the access bridge. */ + securityRules?: AccessBridgeSecurityRule[]; + /** The detailed status reported by the access bridge. */ + readonly detailedStatus?: AccessBridgeDetailedStatus; + /** The descriptive message that accompanies the detailed status. */ + readonly detailedStatusMessage?: string; + /** The observed endpoints that clients should use to reach the access bridge. */ + readonly endpoints?: AccessBridgeEndpoint[]; + /** The protocol advertised by the access bridge endpoints. */ + readonly protocol?: TransportProtocol; + /** The provisioning state of the access bridge. */ + readonly provisioningState?: AccessBridgeProvisioningState; +} + +export function accessBridgePropertiesSerializer(item: AccessBridgeProperties): any { + return { + ipv4ConnectedPrefix: item["ipv4ConnectedPrefix"], + ipv6ConnectedPrefix: item["ipv6ConnectedPrefix"], + networkId: item["networkId"], + securityRules: !item["securityRules"] + ? item["securityRules"] + : accessBridgeSecurityRuleArraySerializer(item["securityRules"]), + }; +} + +export function accessBridgePropertiesDeserializer(item: any): AccessBridgeProperties { + return { + ipv4ConnectedPrefix: item["ipv4ConnectedPrefix"], + ipv6ConnectedPrefix: item["ipv6ConnectedPrefix"], + networkId: item["networkId"], + securityRules: !item["securityRules"] + ? item["securityRules"] + : accessBridgeSecurityRuleArrayDeserializer(item["securityRules"]), + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + endpoints: !item["endpoints"] + ? item["endpoints"] + : accessBridgeEndpointArrayDeserializer(item["endpoints"]), + protocol: item["protocol"], + provisioningState: item["provisioningState"], + }; +} + +export function accessBridgeSecurityRuleArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return accessBridgeSecurityRuleSerializer(item); + }); +} + +export function accessBridgeSecurityRuleArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return accessBridgeSecurityRuleDeserializer(item); + }); +} + +/** AccessBridgeSecurityRule captures an individual access rule enforced by the bridge. */ +export interface AccessBridgeSecurityRule { + /** The user provided value describing this rule. */ + description?: string; + /** The direction of allowed network traffic based on the rule. */ + direction: SecurityRuleDirection; + /** The set of IPv4 addresses permitted as the source or destination of the security rule. For as single address, utilize a /32 (CIDR notation). One or both Ipv4Addresses and Ipv6Addresses must be specified. Example formats: 10.10.10.10-10.10.10.20 or 10.10.10.10/24. */ + ipv4Addresses?: string[]; + /** The set of IPv6 addresses permitted as the source or destination of the security rule. For as single address, utilize a /128 (CIDR notation). One or both Ipv4Addresses and Ipv6Addresses must be specified. Example formats: 2001:db8:abcd::1-2001:db8:abcd::ff or 2001:db8:abcd::1/64. */ + ipv6Addresses?: string[]; + /** The source or destination port or port range. Example 24562 or 24562-24570. */ + port: string; +} + +export function accessBridgeSecurityRuleSerializer(item: AccessBridgeSecurityRule): any { + return { + description: item["description"], + direction: item["direction"], + ipv4Addresses: !item["ipv4Addresses"] + ? item["ipv4Addresses"] + : item["ipv4Addresses"].map((p: any) => { + return p; + }), + ipv6Addresses: !item["ipv6Addresses"] + ? item["ipv6Addresses"] + : item["ipv6Addresses"].map((p: any) => { + return p; + }), + port: item["port"], + }; +} + +export function accessBridgeSecurityRuleDeserializer(item: any): AccessBridgeSecurityRule { + return { + description: item["description"], + direction: item["direction"], + ipv4Addresses: !item["ipv4Addresses"] + ? item["ipv4Addresses"] + : item["ipv4Addresses"].map((p: any) => { + return p; + }), + ipv6Addresses: !item["ipv6Addresses"] + ? item["ipv6Addresses"] + : item["ipv6Addresses"].map((p: any) => { + return p; + }), + port: item["port"], + }; +} + +/** The direction of allowed network traffic based on the rule. */ +export enum KnownSecurityRuleDirection { + /** Inbound traffic toward the on-premsises cluster. */ + Inbound = "Inbound", + /** Outbound traffic from the on-premises cluster. */ + Outbound = "Outbound", +} + +/** + * The direction of allowed network traffic based on the rule. \ + * {@link KnownSecurityRuleDirection} can be used interchangeably with SecurityRuleDirection, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Inbound**: Inbound traffic toward the on-premsises cluster. \ + * **Outbound**: Outbound traffic from the on-premises cluster. + */ +export type SecurityRuleDirection = string; + +/** The detailed status reported by the access bridge. */ +export enum KnownAccessBridgeDetailedStatus { + /** The access bridge is healthy and operating normally. */ + Running = "Running", + /** The access bridge is experiencing degraded performance or partial outages. */ + Degraded = "Degraded", + /** The access bridge is not operational. */ + Failed = "Failed", +} + +/** + * The detailed status reported by the access bridge. \ + * {@link KnownAccessBridgeDetailedStatus} can be used interchangeably with AccessBridgeDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Running**: The access bridge is healthy and operating normally. \ + * **Degraded**: The access bridge is experiencing degraded performance or partial outages. \ + * **Failed**: The access bridge is not operational. + */ +export type AccessBridgeDetailedStatus = string; + +export function accessBridgeEndpointArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return accessBridgeEndpointDeserializer(item); + }); +} + +/** AccessBridgeEndpoint describes a single advertised service endpoint. */ +export interface AccessBridgeEndpoint { + /** The fully qualified domain name used to describe the certificate name for the endpoint. */ + readonly fqdn?: string; + /** The IPv4 address associated with the endpoint. */ + readonly ipv4Address?: string; + /** The IPv6 address associated with the endpoint. */ + readonly ipv6Address?: string; + /** The name that identifies the type of endpoint (for example VIP or host). */ + readonly name?: string; +} + +export function accessBridgeEndpointDeserializer(item: any): AccessBridgeEndpoint { + return { + fqdn: item["fqdn"], + ipv4Address: item["ipv4Address"], + ipv6Address: item["ipv6Address"], + name: item["name"], + }; +} + +/** The protocol advertised by the access bridge endpoints. */ +export enum KnownTransportProtocol { + /** The TCP transport protocol. */ + TCP = "TCP", + /** The UDP transport protocol. */ + UDP = "UDP", +} + +/** + * The protocol advertised by the access bridge endpoints. \ + * {@link KnownTransportProtocol} can be used interchangeably with TransportProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TCP**: The TCP transport protocol. \ + * **UDP**: The UDP transport protocol. + */ +export type TransportProtocol = string; + +/** The provisioning state of the access bridge. */ +export enum KnownAccessBridgeProvisioningState { + /** The Accepted status. */ + Accepted = "Accepted", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Failed status. */ + Failed = "Failed", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Succeeded status. */ + Succeeded = "Succeeded", +} + +/** + * The provisioning state of the access bridge. \ + * {@link KnownAccessBridgeProvisioningState} can be used interchangeably with AccessBridgeProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Accepted**: The Accepted status. \ + * **Canceled**: The Canceled status. \ + * **Failed**: The Failed status. \ + * **Provisioning**: The Provisioning status. \ + * **Succeeded**: The Succeeded status. + */ +export type AccessBridgeProvisioningState = string; + +/** The allowed names for the access bridge. */ +export enum KnownAccessBridgeAllowedName { + /** The access bridge for bare metal machine bastion access. */ + Bastion = "Bastion", + /** The access bridge for cluster access to private vault. */ + PrivateVault = "PrivateVault", + /** The access bridge for access to the storage dashboard. */ + StorageDashboard = "StorageDashboard", +} + +/** + * The allowed names for the access bridge. \ + * {@link KnownAccessBridgeAllowedName} can be used interchangeably with AccessBridgeAllowedName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Bastion**: The access bridge for bare metal machine bastion access. \ + * **PrivateVault**: The access bridge for cluster access to private vault. \ + * **StorageDashboard**: The access bridge for access to the storage dashboard. + */ +export type AccessBridgeAllowedName = string; + +/** The complex type of the extended location. */ +export interface ExtendedLocation { + /** The name of the extended location. */ + name: string; + /** The type of the extended location. */ + type: ExtendedLocationType; +} + +export function extendedLocationSerializer(item: ExtendedLocation): any { + return { name: item["name"], type: item["type"] }; +} + +export function extendedLocationDeserializer(item: any): ExtendedLocation { + return { + name: item["name"], + type: item["type"], + }; +} + +/** The supported ExtendedLocation types. */ +export enum KnownExtendedLocationType { + /** Azure Edge Zones location type */ + EdgeZone = "EdgeZone", + /** Azure Custom Locations type */ + CustomLocation = "CustomLocation", +} + +/** + * The supported ExtendedLocation types. \ + * {@link KnownExtendedLocationType} can be used interchangeably with ExtendedLocationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **EdgeZone**: Azure Edge Zones location type \ + * **CustomLocation**: Azure Custom Locations type + */ +export type ExtendedLocationType = string; + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: Record; + /** The geo-location where the resource lives */ + location: string; +} + +export function trackedResourceSerializer(item: TrackedResource): any { + return { tags: item["tags"], location: item["location"] }; +} + +export function trackedResourceDeserializer(item: any): TrackedResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + }; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */ + readonly id?: string; + /** The name of the resource */ + readonly name?: string; + /** The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" */ + readonly type?: string; + /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */ + readonly systemData?: SystemData; +} + +export function resourceSerializer(_item: Resource): any { + return {}; +} + +export function resourceDeserializer(item: any): Resource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +export function systemDataDeserializer(item: any): SystemData { + return { + createdBy: item["createdBy"], + createdByType: item["createdByType"], + createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]), + lastModifiedBy: item["lastModifiedBy"], + lastModifiedByType: item["lastModifiedByType"], + lastModifiedAt: !item["lastModifiedAt"] + ? item["lastModifiedAt"] + : new Date(item["lastModifiedAt"]), + }; +} + +/** The kind of entity that created the resource. */ +export enum KnownCreatedByType { + /** The entity was created by a user. */ + User = "User", + /** The entity was created by an application. */ + Application = "Application", + /** The entity was created by a managed identity. */ + ManagedIdentity = "ManagedIdentity", + /** The entity was created by a key. */ + Key = "Key", +} + +/** + * The kind of entity that created the resource. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User**: The entity was created by a user. \ + * **Application**: The entity was created by an application. \ + * **ManagedIdentity**: The entity was created by a managed identity. \ + * **Key**: The entity was created by a key. + */ +export type CreatedByType = string; + +/** AccessBridgePatchParameters represents the payload for a PATCH request to an access bridge. */ +export interface AccessBridgePatchParameters { + /** The list of the resource properties. */ + properties?: AccessBridgePatchProperties; + /** Resource tags. */ + tags?: Record; +} + +export function accessBridgePatchParametersSerializer(item: AccessBridgePatchParameters): any { + return { + properties: !item["properties"] + ? item["properties"] + : accessBridgePatchPropertiesSerializer(item["properties"]), + tags: item["tags"], + }; +} + +/** AccessBridgePatchProperties identifies the mutable properties for patch operations. */ +export interface AccessBridgePatchProperties { + /** The list of security rules enforced by the access bridge. */ + securityRules?: AccessBridgeSecurityRule[]; +} + +export function accessBridgePatchPropertiesSerializer(item: AccessBridgePatchProperties): any { + return { + securityRules: !item["securityRules"] + ? item["securityRules"] + : accessBridgeSecurityRuleArraySerializer(item["securityRules"]), + }; +} + +/** The current status of an async operation. */ +export interface OperationStatusResult { + /** The end time of the operation. */ + readonly endTime?: Date; + /** If present, details of the operation error. */ + readonly error?: ErrorDetail; + /** Fully qualified ID for the async operation. */ + readonly id?: string; + /** Name of the async operation. */ + readonly name?: string; + /** The operations list. */ + readonly operations?: OperationStatusResult[]; + /** Percent of the operation that is complete. */ + readonly percentComplete?: number; + /** Fully qualified ID of the resource against which the original async operation was started. */ + readonly resourceId?: string; + /** The start time of the operation. */ + readonly startTime?: Date; + /** Operation status. */ + status: string; + /** For actions that run commands or scripts, the exit code of the script execution. */ + readonly exitCode?: string; + /** For actions that run commands or scripts, the leading bytes of the output of the script execution. */ + readonly outputHead?: string; + /** For actions that run commands or scripts, a reference to the location of the result. */ + readonly resultRef?: string; + /** For actions that run commands or scripts, the URL where the full output of the script output can be retrieved. */ + readonly resultUrl?: string; +} + +export function operationStatusResultDeserializer(item: any): OperationStatusResult { + return { + endTime: !item["endTime"] ? item["endTime"] : new Date(item["endTime"]), + error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]), + id: item["id"], + name: item["name"], + operations: !item["operations"] + ? item["operations"] + : operationStatusResultArrayDeserializer(item["operations"]), + percentComplete: item["percentComplete"], + ...(!item["properties"] + ? item["properties"] + : _operationStatusResultPropertiesDeserializer(item["properties"])), + resourceId: item["resourceId"], + startTime: !item["startTime"] ? item["startTime"] : new Date(item["startTime"]), + status: item["status"], + }; +} + +export function operationStatusResultArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return operationStatusResultDeserializer(item); + }); +} + +/** OperationStatusResultProperties represents additional properties of the operation status result. */ +export interface OperationStatusResultProperties { + /** For actions that run commands or scripts, the exit code of the script execution. */ + readonly exitCode?: string; + /** For actions that run commands or scripts, the leading bytes of the output of the script execution. */ + readonly outputHead?: string; + /** For actions that run commands or scripts, a reference to the location of the result. */ + readonly resultRef?: string; + /** For actions that run commands or scripts, the URL where the full output of the script output can be retrieved. */ + readonly resultUrl?: string; +} + +export function operationStatusResultPropertiesDeserializer( + item: any, +): OperationStatusResultProperties { + return { + exitCode: item["exitCode"], + outputHead: item["outputHead"], + resultRef: item["resultRef"], + resultUrl: item["resultUrl"], + }; +} + +/** AccessBridgeList represents a paged list of access bridges. */ +export interface _AccessBridgeList { + /** The AccessBridge items on this page */ + value: AccessBridge[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _accessBridgeListDeserializer(item: any): _AccessBridgeList { + return { + value: accessBridgeArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function accessBridgeArraySerializer(result: Array): any[] { + return result.map((item) => { + return accessBridgeSerializer(item); + }); +} + +export function accessBridgeArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return accessBridgeDeserializer(item); + }); +} + +/** BareMetalMachine represents the physical machine in the rack. */ +export interface BareMetalMachine extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** The connection string for the baseboard management controller including IP address and protocol. */ + bmcConnectionString: string; + /** The credentials of the baseboard management controller on this bare metal machine. */ + bmcCredentials: AdministrativeCredentials; + /** The MAC address of the BMC device. */ + bmcMacAddress: string; + /** The MAC address of a NIC connected to the PXE network. */ + bootMacAddress: string; + /** The custom details provided by the customer. */ + machineDetails: string; + /** The OS-level hostname assigned to this machine. */ + machineName: string; + /** The unique internal identifier of the bare metal machine SKU. */ + machineSkuId: string; + /** The resource ID of the rack where this bare metal machine resides. */ + rackId: string; + /** The rack slot in which this bare metal machine is located, ordered from the bottom up i.e. the lowest slot is 1. */ + rackSlot: number; + /** The serial number of the bare metal machine. */ + serialNumber: string; + /** The current state of any in progress or completed actions. The most recent known instance of each action type is shown. */ + readonly actionStates?: ActionState[]; + /** The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. */ + readonly associatedResourceIds?: string[]; + /** The IPv4 address of the BMC interface for the bare metal machine. */ + readonly bmcIpv4Address?: string; + /** The IPv6 address of the BMC interface for the bare metal machine. */ + readonly bmcIpv6Address?: string; + /** The CA certificate information issued by the platform for connecting to TLS interfaces for the bare metal machine. Callers add this certificate to the trusted CA store on the Kubernetes control plane nodes to allow secure communication with the bare metal machine. */ + readonly caCertificate?: CertificateInfo; + /** The resource ID of the cluster this bare metal machine is associated with. */ + readonly clusterId?: string; + /** The cordon status of the bare metal machine. */ + readonly cordonStatus?: BareMetalMachineCordonStatus; + /** The more detailed status of the bare metal machine. */ + readonly detailedStatus?: BareMetalMachineDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The hardware inventory, including information acquired from the model/sku information and from the ironic inspector. */ + readonly hardwareInventory?: HardwareInventory; + /** The details of the latest hardware validation performed for this bare metal machine. */ + readonly hardwareValidationStatus?: HardwareValidationStatus; + /** 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. */ + readonly hybridAksClustersAssociatedIds?: string[]; + /** The name of this machine represented by the host object in the Cluster's Kubernetes control plane. */ + readonly kubernetesNodeName?: string; + /** The version of Kubernetes running on this machine. */ + readonly kubernetesVersion?: string; + /** The cluster version that has been applied to this machine during deployment or a version update. */ + machineClusterVersion?: string; + /** The list of roles that are assigned to the cluster node running on this machine. */ + readonly machineRoles?: string[]; + /** The monitoring configuration status of the bare metal machine. */ + readonly monitoringConfigurationStatus?: BareMetalMachineMonitoringConfigurationStatus; + /** The IPv4 address that is assigned to the bare metal machine during the cluster deployment. */ + readonly oamIpv4Address?: string; + /** The IPv6 address that is assigned to the bare metal machine during the cluster deployment. */ + readonly oamIpv6Address?: string; + /** The image that is currently provisioned to the OS disk. */ + readonly osImage?: string; + /** The power state derived from the baseboard management controller. */ + readonly powerState?: BareMetalMachinePowerState; + /** The indicator of whether the bare metal machine is ready to receive workloads. */ + readonly readyState?: BareMetalMachineReadyState; + /** The runtime protection status of the bare metal machine. */ + readonly runtimeProtectionStatus?: RuntimeProtectionStatus; + /** The list of statuses that represent secret rotation activity. */ + readonly secretRotationStatus?: SecretRotationStatus[]; + /** The discovered value of the machine's service tag. */ + readonly serviceTag?: string; + /** 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. */ + readonly virtualMachinesAssociatedIds?: string[]; + /** The provisioning state of the bare metal machine. */ + readonly provisioningState?: BareMetalMachineProvisioningState; +} + +export function bareMetalMachineSerializer(item: BareMetalMachine): any { + return { + tags: item["tags"], + location: item["location"], + properties: _bareMetalMachinePropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function bareMetalMachineDeserializer(item: any): BareMetalMachine { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._bareMetalMachinePropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** BareMetalMachineProperties represents the properties of a bare metal machine. */ +export interface BareMetalMachineProperties { + /** The connection string for the baseboard management controller including IP address and protocol. */ + bmcConnectionString: string; + /** The credentials of the baseboard management controller on this bare metal machine. */ + bmcCredentials: AdministrativeCredentials; + /** The MAC address of the BMC device. */ + bmcMacAddress: string; + /** The MAC address of a NIC connected to the PXE network. */ + bootMacAddress: string; + /** The custom details provided by the customer. */ + machineDetails: string; + /** The OS-level hostname assigned to this machine. */ + machineName: string; + /** The unique internal identifier of the bare metal machine SKU. */ + machineSkuId: string; + /** The resource ID of the rack where this bare metal machine resides. */ + rackId: string; + /** The rack slot in which this bare metal machine is located, ordered from the bottom up i.e. the lowest slot is 1. */ + rackSlot: number; + /** The serial number of the bare metal machine. */ + serialNumber: string; + /** The current state of any in progress or completed actions. The most recent known instance of each action type is shown. */ + readonly actionStates?: ActionState[]; + /** The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. */ + readonly associatedResourceIds?: string[]; + /** The IPv4 address of the BMC interface for the bare metal machine. */ + readonly bmcIpv4Address?: string; + /** The IPv6 address of the BMC interface for the bare metal machine. */ + readonly bmcIpv6Address?: string; + /** The CA certificate information issued by the platform for connecting to TLS interfaces for the bare metal machine. Callers add this certificate to the trusted CA store on the Kubernetes control plane nodes to allow secure communication with the bare metal machine. */ + readonly caCertificate?: CertificateInfo; + /** The resource ID of the cluster this bare metal machine is associated with. */ + readonly clusterId?: string; + /** The cordon status of the bare metal machine. */ + readonly cordonStatus?: BareMetalMachineCordonStatus; + /** The more detailed status of the bare metal machine. */ + readonly detailedStatus?: BareMetalMachineDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The hardware inventory, including information acquired from the model/sku information and from the ironic inspector. */ + readonly hardwareInventory?: HardwareInventory; + /** The details of the latest hardware validation performed for this bare metal machine. */ + readonly hardwareValidationStatus?: HardwareValidationStatus; + /** 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. */ + readonly hybridAksClustersAssociatedIds?: string[]; + /** The name of this machine represented by the host object in the Cluster's Kubernetes control plane. */ + readonly kubernetesNodeName?: string; + /** The version of Kubernetes running on this machine. */ + readonly kubernetesVersion?: string; + /** The cluster version that has been applied to this machine during deployment or a version update. */ + machineClusterVersion?: string; + /** The list of roles that are assigned to the cluster node running on this machine. */ + readonly machineRoles?: string[]; + /** The monitoring configuration status of the bare metal machine. */ + readonly monitoringConfigurationStatus?: BareMetalMachineMonitoringConfigurationStatus; + /** The IPv4 address that is assigned to the bare metal machine during the cluster deployment. */ + readonly oamIpv4Address?: string; + /** The IPv6 address that is assigned to the bare metal machine during the cluster deployment. */ + readonly oamIpv6Address?: string; + /** The image that is currently provisioned to the OS disk. */ + readonly osImage?: string; + /** The power state derived from the baseboard management controller. */ + readonly powerState?: BareMetalMachinePowerState; + /** The indicator of whether the bare metal machine is ready to receive workloads. */ + readonly readyState?: BareMetalMachineReadyState; + /** The runtime protection status of the bare metal machine. */ + readonly runtimeProtectionStatus?: RuntimeProtectionStatus; + /** The list of statuses that represent secret rotation activity. */ + readonly secretRotationStatus?: SecretRotationStatus[]; + /** The discovered value of the machine's service tag. */ + readonly serviceTag?: string; + /** 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. */ + readonly virtualMachinesAssociatedIds?: string[]; + /** The provisioning state of the bare metal machine. */ + readonly provisioningState?: BareMetalMachineProvisioningState; +} + +export function bareMetalMachinePropertiesSerializer(item: BareMetalMachineProperties): any { + return { + bmcConnectionString: item["bmcConnectionString"], + bmcCredentials: administrativeCredentialsSerializer(item["bmcCredentials"]), + bmcMacAddress: item["bmcMacAddress"], + bootMacAddress: item["bootMacAddress"], + machineDetails: item["machineDetails"], + machineName: item["machineName"], + machineSkuId: item["machineSkuId"], + rackId: item["rackId"], + rackSlot: item["rackSlot"], + serialNumber: item["serialNumber"], + machineClusterVersion: item["machineClusterVersion"], + }; +} + +export function bareMetalMachinePropertiesDeserializer(item: any): BareMetalMachineProperties { + return { + bmcConnectionString: item["bmcConnectionString"], + bmcCredentials: administrativeCredentialsDeserializer(item["bmcCredentials"]), + bmcMacAddress: item["bmcMacAddress"], + bootMacAddress: item["bootMacAddress"], + machineDetails: item["machineDetails"], + machineName: item["machineName"], + machineSkuId: item["machineSkuId"], + rackId: item["rackId"], + rackSlot: item["rackSlot"], + serialNumber: item["serialNumber"], + actionStates: !item["actionStates"] + ? item["actionStates"] + : actionStateArrayDeserializer(item["actionStates"]), + associatedResourceIds: !item["associatedResourceIds"] + ? item["associatedResourceIds"] + : item["associatedResourceIds"].map((p: any) => { + return p; + }), + bmcIpv4Address: item["bmcIpv4Address"], + bmcIpv6Address: item["bmcIpv6Address"], + caCertificate: !item["caCertificate"] + ? item["caCertificate"] + : certificateInfoDeserializer(item["caCertificate"]), + clusterId: item["clusterId"], + cordonStatus: item["cordonStatus"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + hardwareInventory: !item["hardwareInventory"] + ? item["hardwareInventory"] + : hardwareInventoryDeserializer(item["hardwareInventory"]), + hardwareValidationStatus: !item["hardwareValidationStatus"] + ? item["hardwareValidationStatus"] + : hardwareValidationStatusDeserializer(item["hardwareValidationStatus"]), + hybridAksClustersAssociatedIds: !item["hybridAksClustersAssociatedIds"] + ? item["hybridAksClustersAssociatedIds"] + : item["hybridAksClustersAssociatedIds"].map((p: any) => { + return p; + }), + kubernetesNodeName: item["kubernetesNodeName"], + kubernetesVersion: item["kubernetesVersion"], + machineClusterVersion: item["machineClusterVersion"], + machineRoles: !item["machineRoles"] + ? item["machineRoles"] + : item["machineRoles"].map((p: any) => { + return p; + }), + monitoringConfigurationStatus: !item["monitoringConfigurationStatus"] + ? item["monitoringConfigurationStatus"] + : bareMetalMachineMonitoringConfigurationStatusDeserializer( + item["monitoringConfigurationStatus"], + ), + oamIpv4Address: item["oamIpv4Address"], + oamIpv6Address: item["oamIpv6Address"], + osImage: item["osImage"], + powerState: item["powerState"], + readyState: item["readyState"], + runtimeProtectionStatus: !item["runtimeProtectionStatus"] + ? item["runtimeProtectionStatus"] + : runtimeProtectionStatusDeserializer(item["runtimeProtectionStatus"]), + secretRotationStatus: !item["secretRotationStatus"] + ? item["secretRotationStatus"] + : secretRotationStatusArrayDeserializer(item["secretRotationStatus"]), + serviceTag: item["serviceTag"], + virtualMachinesAssociatedIds: !item["virtualMachinesAssociatedIds"] + ? item["virtualMachinesAssociatedIds"] + : item["virtualMachinesAssociatedIds"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +/** AdministrativeCredentials represents the admin credentials for the device requiring password-based authentication. */ +export interface AdministrativeCredentials { + /** The password of the administrator of the device used during initialization. */ + password: string; + /** The username of the administrator of the device used during initialization. */ + username: string; +} + +export function administrativeCredentialsSerializer(item: AdministrativeCredentials): any { + return { password: item["password"], username: item["username"] }; +} + +export function administrativeCredentialsDeserializer(item: any): AdministrativeCredentials { + return { + password: item["password"], + username: item["username"], + }; +} + +export function actionStateArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return actionStateDeserializer(item); + }); +} + +/** ActionState represents the state of an action taken against a resource. This can be used to represent both explicitly and implicitly defined action types. */ +export interface ActionState { + /** The representation of the action for which this is a status. Matches ARM resource action format when the action is an ARM-based action. */ + readonly actionType?: string; + /** The correlation ID for the original action request. Omitted if there is no related correlation ID. */ + readonly correlationId?: string; + /** The timestamp of when the action reached its final, terminal state. Uses ISO 8601 format. */ + readonly endTime?: string; + /** The description providing additional context for the status value. May be empty or contain guidance in the case of a failure. */ + readonly message?: string; + /** The timestamp of when the action began, in ISO 8601 format. */ + readonly startTime?: string; + /** The status of the action. */ + readonly status?: ActionStateStatus; + /** The ordered list of the individual steps which make up the action. */ + readonly stepStates?: StepState[]; +} + +export function actionStateDeserializer(item: any): ActionState { + return { + actionType: item["actionType"], + correlationId: item["correlationId"], + endTime: item["endTime"], + message: item["message"], + startTime: item["startTime"], + status: item["status"], + stepStates: !item["stepStates"] + ? item["stepStates"] + : stepStateArrayDeserializer(item["stepStates"]), + }; +} + +/** The status of the action. */ +export enum KnownActionStateStatus { + /** The completed status. */ + Completed = "Completed", + /** The in-progress status. */ + InProgress = "InProgress", + /** The failed status. */ + Failed = "Failed", +} + +/** + * The status of the action. \ + * {@link KnownActionStateStatus} can be used interchangeably with ActionStateStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Completed**: The completed status. \ + * **InProgress**: The in-progress status. \ + * **Failed**: The failed status. + */ +export type ActionStateStatus = string; + +export function stepStateArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return stepStateDeserializer(item); + }); +} + +/** StepState represents the state of a step in an action. */ +export interface StepState { + /** The timestamp for when processing of the step reached its terminal state, in ISO 8601 format. */ + readonly endTime?: string; + /** The message providing additional context for the status value. May be empty, or contain diagnostic information in the case of a failure. */ + readonly message?: string; + /** The timestamp for when processing of the step began, in ISO 8601 format. */ + readonly startTime?: string; + /** The status of the step. A value of Completed or Failed indicates a terminal state for the step. */ + readonly status?: StepStateStatus; + /** The name for the step. */ + readonly stepName?: string; +} + +export function stepStateDeserializer(item: any): StepState { + return { + endTime: item["endTime"], + message: item["message"], + startTime: item["startTime"], + status: item["status"], + stepName: item["stepName"], + }; +} + +/** The status of the step. A value of Completed or Failed indicates a terminal state for the step. */ +export enum KnownStepStateStatus { + /** The completed status. */ + Completed = "Completed", + /** The in-progress status. */ + InProgress = "InProgress", + /** The failed status. */ + Failed = "Failed", + /** The not started status. */ + NotStarted = "NotStarted", +} + +/** + * The status of the step. A value of Completed or Failed indicates a terminal state for the step. \ + * {@link KnownStepStateStatus} can be used interchangeably with StepStateStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Completed**: The completed status. \ + * **InProgress**: The in-progress status. \ + * **Failed**: The failed status. \ + * **NotStarted**: The not started status. + */ +export type StepStateStatus = string; + +/** CertificateInfo represents the non-private information of an X.509 Certificate. */ +export interface CertificateInfo { + /** The hash value of the X.509 Certificate. */ + readonly hash?: string; + /** The textual value of the X.509 Certificate. */ + readonly value?: string; +} + +export function certificateInfoDeserializer(item: any): CertificateInfo { + return { + hash: item["hash"], + value: item["value"], + }; +} + +/** The cordon status of the bare metal machine. */ +export enum KnownBareMetalMachineCordonStatus { + /** The bare metal machine is cordoned. */ + Cordoned = "Cordoned", + /** The bare metal machine is uncordoned. */ + Uncordoned = "Uncordoned", +} + +/** + * The cordon status of the bare metal machine. \ + * {@link KnownBareMetalMachineCordonStatus} can be used interchangeably with BareMetalMachineCordonStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Cordoned**: The bare metal machine is cordoned. \ + * **Uncordoned**: The bare metal machine is uncordoned. + */ +export type BareMetalMachineCordonStatus = string; + +/** The more detailed status of the bare metal machine. */ +export enum KnownBareMetalMachineDetailedStatus { + /** The Preparing status. */ + Preparing = "Preparing", + /** The Error status. */ + Error = "Error", + /** The Available status. */ + Available = "Available", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Provisioned status. */ + Provisioned = "Provisioned", + /** The Deprovisioning status. */ + Deprovisioning = "Deprovisioning", +} + +/** + * The more detailed status of the bare metal machine. \ + * {@link KnownBareMetalMachineDetailedStatus} can be used interchangeably with BareMetalMachineDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Preparing**: The Preparing status. \ + * **Error**: The Error status. \ + * **Available**: The Available status. \ + * **Provisioning**: The Provisioning status. \ + * **Provisioned**: The Provisioned status. \ + * **Deprovisioning**: The Deprovisioning status. + */ +export type BareMetalMachineDetailedStatus = string; + +/** HardwareInventory represents the hardware configuration of this machine as exposed to the customer, including information acquired from the model/sku information and from the ironic inspector. */ +export interface HardwareInventory { + /** Freeform data extracted from the environment about this machine. This information varies depending on the specific hardware and configuration. */ + readonly additionalHostInformation?: string; + /** The list of network interfaces and associated details for the bare metal machine. */ + readonly interfaces?: HardwareInventoryNetworkInterface[]; + /** Field Deprecated. Will be removed in an upcoming version. The list of network interface cards and associated details for the bare metal machine. */ + readonly nics?: Nic[]; +} + +export function hardwareInventoryDeserializer(item: any): HardwareInventory { + return { + additionalHostInformation: item["additionalHostInformation"], + interfaces: !item["interfaces"] + ? item["interfaces"] + : hardwareInventoryNetworkInterfaceArrayDeserializer(item["interfaces"]), + nics: !item["nics"] ? item["nics"] : nicArrayDeserializer(item["nics"]), + }; +} + +export function hardwareInventoryNetworkInterfaceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return hardwareInventoryNetworkInterfaceDeserializer(item); + }); +} + +/** HardwareInventoryNetworkInterface represents the network interface details as part of a hardware inventory. */ +export interface HardwareInventoryNetworkInterface { + /** The current status of the link. */ + readonly linkStatus?: string; + /** The MAC address associated with this interface. */ + readonly macAddress?: string; + /** The name of the interface. */ + readonly name?: string; + /** The resource ID of the network interface for the port on the switch that this machine's interface is connected to. */ + readonly networkInterfaceId?: string; +} + +export function hardwareInventoryNetworkInterfaceDeserializer( + item: any, +): HardwareInventoryNetworkInterface { + return { + linkStatus: item["linkStatus"], + macAddress: item["macAddress"], + name: item["name"], + networkInterfaceId: item["networkInterfaceId"], + }; +} + +export function nicArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return nicDeserializer(item); + }); +} + +/** Type Deprecated. Will be removed in an upcoming version. Nic represents the network interface card details. */ +export interface Nic { + /** The information about the device connected to this NIC. */ + readonly lldpNeighbor?: LldpNeighbor; + /** The MAC address associated with this NIC. */ + readonly macAddress?: string; + /** The name of the NIC/interface. */ + readonly name?: string; +} + +export function nicDeserializer(item: any): Nic { + return { + lldpNeighbor: !item["lldpNeighbor"] + ? item["lldpNeighbor"] + : lldpNeighborDeserializer(item["lldpNeighbor"]), + macAddress: item["macAddress"], + name: item["name"], + }; +} + +/** Type Deprecated. Will be removed in an upcoming version. LldpNeighbor represents the details about the device connected to the NIC. */ +export interface LldpNeighbor { + /** The descriptive information about the port on the connected device. */ + readonly portDescription?: string; + /** The system-assigned name of the port on the connected device. */ + readonly portName?: string; + /** The descriptive information about the connected device. */ + readonly systemDescription?: string; + /** The system-assigned name of the connected device. */ + readonly systemName?: string; +} + +export function lldpNeighborDeserializer(item: any): LldpNeighbor { + return { + portDescription: item["portDescription"], + portName: item["portName"], + systemDescription: item["systemDescription"], + systemName: item["systemName"], + }; +} + +/** HardwareValidationStatus represents the latest hardware validation details performed for this bare metal machine. */ +export interface HardwareValidationStatus { + /** The timestamp of the hardware validation execution. */ + readonly lastValidationTime?: Date; + /** The outcome of the hardware validation. */ + readonly result?: BareMetalMachineHardwareValidationResult; +} + +export function hardwareValidationStatusDeserializer(item: any): HardwareValidationStatus { + return { + lastValidationTime: !item["lastValidationTime"] + ? item["lastValidationTime"] + : new Date(item["lastValidationTime"]), + result: item["result"], + }; +} + +/** The outcome of the hardware validation. */ +export enum KnownBareMetalMachineHardwareValidationResult { + /** The hardware validation passed. */ + Pass = "Pass", + /** The hardware validation failed. */ + Fail = "Fail", +} + +/** + * The outcome of the hardware validation. \ + * {@link KnownBareMetalMachineHardwareValidationResult} can be used interchangeably with BareMetalMachineHardwareValidationResult, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pass**: The hardware validation passed. \ + * **Fail**: The hardware validation failed. + */ +export type BareMetalMachineHardwareValidationResult = string; + +/** BareMetalMachineMonitoringConfigurationStatus represents the monitoring configuration status of the bare metal machine. */ +export interface BareMetalMachineMonitoringConfigurationStatus { + /** The log level for the monitoring configuration status of the bare metal machine. */ + logLevel?: BareMetalMachineMetricsConfigurationStatusLogLevel; + /** The metrics level for the monitoring configuration status of the bare metal machine. */ + metricsLevel?: BareMetalMachineMetricsConfigurationStatusMetricsLevel; +} + +export function bareMetalMachineMonitoringConfigurationStatusDeserializer( + item: any, +): BareMetalMachineMonitoringConfigurationStatus { + return { + logLevel: item["logLevel"], + metricsLevel: item["metricsLevel"], + }; +} + +/** The log level for the monitoring configuration status of the bare metal machine. */ +export enum KnownBareMetalMachineMetricsConfigurationStatusLogLevel { + /** Logs are emitted at the default log level. */ + Default = "Default", + /** Logs are emitted at the Nexus log level. */ + Nexus = "Nexus", +} + +/** + * The log level for the monitoring configuration status of the bare metal machine. \ + * {@link KnownBareMetalMachineMetricsConfigurationStatusLogLevel} can be used interchangeably with BareMetalMachineMetricsConfigurationStatusLogLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default**: Logs are emitted at the default log level. \ + * **Nexus**: Logs are emitted at the Nexus log level. + */ +export type BareMetalMachineMetricsConfigurationStatusLogLevel = string; + +/** The metrics level for the monitoring configuration status of the bare metal machine. */ +export enum KnownBareMetalMachineMetricsConfigurationStatusMetricsLevel { + /** Metrics are emitted at the default metrics level. */ + Default = "Default", + /** Metrics are emitted at the Nexus metrics level. */ + Nexus = "Nexus", +} + +/** + * The metrics level for the monitoring configuration status of the bare metal machine. \ + * {@link KnownBareMetalMachineMetricsConfigurationStatusMetricsLevel} can be used interchangeably with BareMetalMachineMetricsConfigurationStatusMetricsLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default**: Metrics are emitted at the default metrics level. \ + * **Nexus**: Metrics are emitted at the Nexus metrics level. + */ +export type BareMetalMachineMetricsConfigurationStatusMetricsLevel = string; + +/** The power state derived from the baseboard management controller. */ +export enum KnownBareMetalMachinePowerState { + /** The bare metal machine was marked as powered on in the latest check of the baseboard management controller. */ + On = "On", + /** The bare metal machine was marked as powered off in the latest check of the baseboard management controller. */ + Off = "Off", +} + +/** + * The power state derived from the baseboard management controller. \ + * {@link KnownBareMetalMachinePowerState} can be used interchangeably with BareMetalMachinePowerState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **On**: The bare metal machine was marked as powered on in the latest check of the baseboard management controller. \ + * **Off**: The bare metal machine was marked as powered off in the latest check of the baseboard management controller. + */ +export type BareMetalMachinePowerState = string; + +/** The indicator of whether the bare metal machine is ready to receive workloads. */ +export enum KnownBareMetalMachineReadyState { + /** The bare metal machine is ready to receive workloads. */ + True = "True", + /** The bare metal machine is not ready to receive workloads. */ + False = "False", +} + +/** + * The indicator of whether the bare metal machine is ready to receive workloads. \ + * {@link KnownBareMetalMachineReadyState} can be used interchangeably with BareMetalMachineReadyState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: The bare metal machine is ready to receive workloads. \ + * **False**: The bare metal machine is not ready to receive workloads. + */ +export type BareMetalMachineReadyState = string; + +/** RuntimeProtectionStatus represents the runtime protection status of the bare metal machine. */ +export interface RuntimeProtectionStatus { + /** The runtime protection agent health status. */ + readonly agentHealthStatus?: RuntimeProtectionAgentHealthStatus; + /** The runtime protection agent health status issues, if present. */ + readonly agentHealthStatusIssues?: string[]; + /** The runtime protection agent license status. */ + readonly agentLicenseStatus?: RuntimeProtectionAgentLicenseStatus; + /** The definition update mode for runtime protection. */ + readonly definitionUpdateMode?: RuntimeProtectionDefinitionUpdateMode; + /** The timestamp when the malware definitions were last updated. */ + readonly definitionsLastUpdated?: Date; + /** The version of the malware definitions. */ + readonly definitionsVersion?: string; + /** The enforcement level set for the runtime protection on the bare metal machine. */ + readonly enforcementLevel?: RuntimeProtectionEnforcementLevel; + /** The timestamp of the most recently completed scan, or empty if there has never been a scan. */ + readonly scanCompletedTime?: Date; + /** The timestamp of the most recently scheduled scan, or empty if no scan has been scheduled. */ + readonly scanScheduledTime?: Date; + /** The timestamp of the most recently started scan, or empty if there has never been a scan. */ + readonly scanStartedTime?: Date; +} + +export function runtimeProtectionStatusDeserializer(item: any): RuntimeProtectionStatus { + return { + agentHealthStatus: item["agentHealthStatus"], + agentHealthStatusIssues: !item["agentHealthStatusIssues"] + ? item["agentHealthStatusIssues"] + : item["agentHealthStatusIssues"].map((p: any) => { + return p; + }), + agentLicenseStatus: item["agentLicenseStatus"], + definitionUpdateMode: item["definitionUpdateMode"], + definitionsLastUpdated: !item["definitionsLastUpdated"] + ? item["definitionsLastUpdated"] + : new Date(item["definitionsLastUpdated"]), + definitionsVersion: item["definitionsVersion"], + enforcementLevel: item["enforcementLevel"], + scanCompletedTime: !item["scanCompletedTime"] + ? item["scanCompletedTime"] + : new Date(item["scanCompletedTime"]), + scanScheduledTime: !item["scanScheduledTime"] + ? item["scanScheduledTime"] + : new Date(item["scanScheduledTime"]), + scanStartedTime: !item["scanStartedTime"] + ? item["scanStartedTime"] + : new Date(item["scanStartedTime"]), + }; +} + +/** The runtime protection agent health status. */ +export enum KnownRuntimeProtectionAgentHealthStatus { + /** The runtime protection agent is healthy. */ + Healthy = "Healthy", + /** The runtime protection agent has health issues. */ + Unhealthy = "Unhealthy", +} + +/** + * The runtime protection agent health status. \ + * {@link KnownRuntimeProtectionAgentHealthStatus} can be used interchangeably with RuntimeProtectionAgentHealthStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Healthy**: The runtime protection agent is healthy. \ + * **Unhealthy**: The runtime protection agent has health issues. + */ +export type RuntimeProtectionAgentHealthStatus = string; + +/** The runtime protection agent license status. */ +export enum KnownRuntimeProtectionAgentLicenseStatus { + /** The runtime protection agent license is valid. */ + Licensed = "Licensed", + /** The runtime protection agent license is not valid. */ + Unlicensed = "Unlicensed", +} + +/** + * The runtime protection agent license status. \ + * {@link KnownRuntimeProtectionAgentLicenseStatus} can be used interchangeably with RuntimeProtectionAgentLicenseStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Licensed**: The runtime protection agent license is valid. \ + * **Unlicensed**: The runtime protection agent license is not valid. + */ +export type RuntimeProtectionAgentLicenseStatus = string; + +/** The definition update mode for runtime protection. */ +export enum KnownRuntimeProtectionDefinitionUpdateMode { + /** Update definitions automatically through the connected runtime protection agent. */ + Automatic = "Automatic", + /** Do not update definitions. */ + None = "None", +} + +/** + * The definition update mode for runtime protection. \ + * {@link KnownRuntimeProtectionDefinitionUpdateMode} can be used interchangeably with RuntimeProtectionDefinitionUpdateMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Automatic**: Update definitions automatically through the connected runtime protection agent. \ + * **None**: Do not update definitions. + */ +export type RuntimeProtectionDefinitionUpdateMode = string; + +/** The mode of operation for runtime protection. */ +export enum KnownRuntimeProtectionEnforcementLevel { + /** Real-time scans detect but do not remediate detected issues. */ + Audit = "Audit", + /** Real-time scans are disabled and can not be triggered. */ + Disabled = "Disabled", + /** Real-time scans are disabled but can be triggered to remediate detected issues. */ + OnDemand = "OnDemand", + /** Real-time scans are disabled but can be triggered to detect issues without remediation. */ + Passive = "Passive", + /** Real-time scans detect and remediate detected issues. */ + RealTime = "RealTime", +} + +/** + * The mode of operation for runtime protection. \ + * {@link KnownRuntimeProtectionEnforcementLevel} can be used interchangeably with RuntimeProtectionEnforcementLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Audit**: Real-time scans detect but do not remediate detected issues. \ + * **Disabled**: Real-time scans are disabled and can not be triggered. \ + * **OnDemand**: Real-time scans are disabled but can be triggered to remediate detected issues. \ + * **Passive**: Real-time scans are disabled but can be triggered to detect issues without remediation. \ + * **RealTime**: Real-time scans detect and remediate detected issues. + */ +export type RuntimeProtectionEnforcementLevel = string; + +export function secretRotationStatusArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return secretRotationStatusDeserializer(item); + }); +} + +/** SecretRotationStatus represents the status of a secret rotation. */ +export interface SecretRotationStatus { + /** The maximum number of days the secret may be used before it must be changed. */ + readonly expirePeriodDays?: number; + /** The date and time when the secret was last changed. */ + readonly lastRotationTime?: Date; + /** The number of days a secret exists before rotations will be attempted. */ + readonly rotationPeriodDays?: number; + /** The reference to the secret in a key vault. */ + readonly secretArchiveReference?: SecretArchiveReference; + /** The type name used to identify the purpose of the secret. */ + readonly secretType?: string; +} + +export function secretRotationStatusDeserializer(item: any): SecretRotationStatus { + return { + expirePeriodDays: item["expirePeriodDays"], + lastRotationTime: !item["lastRotationTime"] + ? item["lastRotationTime"] + : new Date(item["lastRotationTime"]), + rotationPeriodDays: item["rotationPeriodDays"], + secretArchiveReference: !item["secretArchiveReference"] + ? item["secretArchiveReference"] + : secretArchiveReferenceDeserializer(item["secretArchiveReference"]), + secretType: item["secretType"], + }; +} + +/** SecretArchiveReference represents the reference to a secret in a key vault. */ +export interface SecretArchiveReference { + /** The resource ID of the key vault containing the secret. */ + readonly keyVaultId?: string; + /** The URI of the key containing the secret. */ + readonly keyVaultUri?: string; + /** The name of the secret in the key vault. */ + readonly secretName?: string; + /** The version of the secret in the key vault. */ + readonly secretVersion?: string; +} + +export function secretArchiveReferenceDeserializer(item: any): SecretArchiveReference { + return { + keyVaultId: item["keyVaultId"], + keyVaultUri: item["keyVaultUri"], + secretName: item["secretName"], + secretVersion: item["secretVersion"], + }; +} + +/** The provisioning state of the bare metal machine. */ +export enum KnownBareMetalMachineProvisioningState { + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Failed status. */ + Failed = "Failed", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Accepted status. */ + Accepted = "Accepted", +} + +/** + * The provisioning state of the bare metal machine. \ + * {@link KnownBareMetalMachineProvisioningState} can be used interchangeably with BareMetalMachineProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The Succeeded status. \ + * **Failed**: The Failed status. \ + * **Canceled**: The Canceled status. \ + * **Provisioning**: The Provisioning status. \ + * **Accepted**: The Accepted status. + */ +export type BareMetalMachineProvisioningState = string; + +/** BareMetalMachinePatchParameters represents the body of the request to patch bare metal machine properties. */ +export interface BareMetalMachinePatchParameters { + /** Resource tags. */ + tags?: Record; + /** The details provided by the customer during the creation of rack manifests that allows for custom data to be associated with this machine. */ + machineDetails?: string; +} + +export function bareMetalMachinePatchParametersSerializer( + item: BareMetalMachinePatchParameters, +): any { + return { + properties: areAllPropsUndefined(item, ["machineDetails"]) + ? undefined + : _bareMetalMachinePatchParametersPropertiesSerializer(item), + tags: item["tags"], + }; +} + +/** BareMetalMachinePatchProperties represents the properties of the bare metal machine that can be patched. */ +export interface BareMetalMachinePatchProperties { + /** The details provided by the customer during the creation of rack manifests that allows for custom data to be associated with this machine. */ + machineDetails?: string; +} + +export function bareMetalMachinePatchPropertiesSerializer( + item: BareMetalMachinePatchProperties, +): any { + return { machineDetails: item["machineDetails"] }; +} + +/** BareMetalMachineList represents a list of bare metal machines. */ +export interface _BareMetalMachineList { + /** The BareMetalMachine items on this page */ + value: BareMetalMachine[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _bareMetalMachineListDeserializer(item: any): _BareMetalMachineList { + return { + value: bareMetalMachineArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function bareMetalMachineArraySerializer(result: Array): any[] { + return result.map((item) => { + return bareMetalMachineSerializer(item); + }); +} + +export function bareMetalMachineArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return bareMetalMachineDeserializer(item); + }); +} + +/** BareMetalMachineCordonParameters represents the body of the request to evacuate workloads from node on a bare metal machine. */ +export interface BareMetalMachineCordonParameters { + /** The indicator of whether to evacuate the node workload when the bare metal machine is cordoned. */ + evacuate?: BareMetalMachineEvacuate; +} + +export function bareMetalMachineCordonParametersSerializer( + item: BareMetalMachineCordonParameters, +): any { + return { evacuate: item["evacuate"] }; +} + +/** The indicator of whether to evacuate the node workload when the bare metal machine is cordoned. */ +export enum KnownBareMetalMachineEvacuate { + /** Evacuate workloads from the node when the bare metal machine is cordoned. */ + True = "True", + /** Do not evacuate workloads from the node when the bare metal machine is cordoned. */ + False = "False", +} + +/** + * The indicator of whether to evacuate the node workload when the bare metal machine is cordoned. \ + * {@link KnownBareMetalMachineEvacuate} can be used interchangeably with BareMetalMachineEvacuate, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: Evacuate workloads from the node when the bare metal machine is cordoned. \ + * **False**: Do not evacuate workloads from the node when the bare metal machine is cordoned. + */ +export type BareMetalMachineEvacuate = string; + +/** BareMetalMachinePowerOffParameters represents the body of the request to power off bare metal machine. */ +export interface BareMetalMachinePowerOffParameters { + /** The indicator of whether to skip the graceful OS shutdown and power off the bare metal machine immediately. */ + skipShutdown?: BareMetalMachineSkipShutdown; +} + +export function bareMetalMachinePowerOffParametersSerializer( + item: BareMetalMachinePowerOffParameters, +): any { + return { skipShutdown: item["skipShutdown"] }; +} + +/** The indicator of whether to skip the graceful OS shutdown and power off the bare metal machine immediately. */ +export enum KnownBareMetalMachineSkipShutdown { + /** Skip the graceful OS shutdown and power off the bare metal machine immediately. */ + True = "True", + /** Do not skip the graceful OS shutdown and power off the bare metal machine immediately. */ + False = "False", +} + +/** + * The indicator of whether to skip the graceful OS shutdown and power off the bare metal machine immediately. \ + * {@link KnownBareMetalMachineSkipShutdown} can be used interchangeably with BareMetalMachineSkipShutdown, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: Skip the graceful OS shutdown and power off the bare metal machine immediately. \ + * **False**: Do not skip the graceful OS shutdown and power off the bare metal machine immediately. + */ +export type BareMetalMachineSkipShutdown = string; + +/** BareMetalMachineReimageParameters represents the body of the request to reimage a bare metal machine. */ +export interface BareMetalMachineReimageParameters { + /** The safeguard mode to use for the reimage action, where None indicates to bypass safeguards and All indicates to utilize all safeguards. If not specified, the default is All. */ + safeguardMode?: BareMetalMachineReimageSafeguardMode; +} + +export function bareMetalMachineReimageParametersSerializer( + item: BareMetalMachineReimageParameters, +): any { + return { safeguardMode: item["safeguardMode"] }; +} + +/** The safeguard mode to use for the reimage action, where None indicates to bypass safeguards and All indicates to utilize all safeguards. */ +export enum KnownBareMetalMachineReimageSafeguardMode { + /** Run all pre‑operation validation checks before performing the reimage. If any check fails, the request is rejected and no changes are made. */ + All = "All", + /** Skip all safeguards and perform the reimage without running pre‑operation validation checks. */ + None = "None", +} + +/** + * The safeguard mode to use for the reimage action, where None indicates to bypass safeguards and All indicates to utilize all safeguards. \ + * {@link KnownBareMetalMachineReimageSafeguardMode} can be used interchangeably with BareMetalMachineReimageSafeguardMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **All**: Run all pre‑operation validation checks before performing the reimage. If any check fails, the request is rejected and no changes are made. \ + * **None**: Skip all safeguards and perform the reimage without running pre‑operation validation checks. + */ +export type BareMetalMachineReimageSafeguardMode = string; + +/** BareMetalMachineReplaceParameters represents the body of the request to physically swap a bare metal machine for another. */ +export interface BareMetalMachineReplaceParameters { + /** The credentials of the baseboard management controller on this bare metal machine. The password field is expected to be an Azure Key Vault key URL. Until the cluster is converted to utilize managed identity by setting the secret archive settings, the actual password value should be provided instead. */ + bmcCredentials?: AdministrativeCredentials; + /** The MAC address of the BMC device. */ + bmcMacAddress?: string; + /** The MAC address of a NIC connected to the PXE network. */ + bootMacAddress?: string; + /** The OS-level hostname assigned to this machine. */ + machineName?: string; + /** The safeguard mode to use for the replace action, where None indicates to bypass safeguards and All indicates to utilize all safeguards. */ + safeguardMode?: BareMetalMachineReplaceSafeguardMode; + /** The serial number of the bare metal machine. */ + serialNumber?: string; + /** The indicator of whether to bypass clearing storage while replacing a bare metal machine. */ + storagePolicy?: BareMetalMachineReplaceStoragePolicy; +} + +export function bareMetalMachineReplaceParametersSerializer( + item: BareMetalMachineReplaceParameters, +): any { + return { + bmcCredentials: !item["bmcCredentials"] + ? item["bmcCredentials"] + : administrativeCredentialsSerializer(item["bmcCredentials"]), + bmcMacAddress: item["bmcMacAddress"], + bootMacAddress: item["bootMacAddress"], + machineName: item["machineName"], + safeguardMode: item["safeguardMode"], + serialNumber: item["serialNumber"], + storagePolicy: item["storagePolicy"], + }; +} + +/** The safeguard mode to use for the replace action, where None indicates to bypass safeguards and All indicates to utilize all safeguards. */ +export enum KnownBareMetalMachineReplaceSafeguardMode { + /** All safeguards will be utilized during the replace action. */ + All = "All", + /** No safeguards will be utilized during the replace action. */ + None = "None", +} + +/** + * The safeguard mode to use for the replace action, where None indicates to bypass safeguards and All indicates to utilize all safeguards. \ + * {@link KnownBareMetalMachineReplaceSafeguardMode} can be used interchangeably with BareMetalMachineReplaceSafeguardMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **All**: All safeguards will be utilized during the replace action. \ + * **None**: No safeguards will be utilized during the replace action. + */ +export type BareMetalMachineReplaceSafeguardMode = string; + +/** The indicator of whether to bypass clearing storage while replacing a bare metal machine. */ +export enum KnownBareMetalMachineReplaceStoragePolicy { + /** Storage will be preserved and not cleared during the replace action. */ + Preserve = "Preserve", + /** Storage will be cleared during the replace action. */ + DiscardAll = "DiscardAll", +} + +/** + * The indicator of whether to bypass clearing storage while replacing a bare metal machine. \ + * {@link KnownBareMetalMachineReplaceStoragePolicy} can be used interchangeably with BareMetalMachineReplaceStoragePolicy, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Preserve**: Storage will be preserved and not cleared during the replace action. \ + * **DiscardAll**: Storage will be cleared during the replace action. + */ +export type BareMetalMachineReplaceStoragePolicy = string; + +/** BareMetalMachineRunCommandParameters represents the body of the request to execute a script on the bare metal machine. */ +export interface BareMetalMachineRunCommandParameters { + /** The list of string arguments that will be passed to the script in order as separate arguments. */ + arguments?: string[]; + /** The maximum time the script is allowed to run. If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be captured, and the exit code matching a timeout will be returned (252). */ + limitTimeSeconds: number; + /** The base64 encoded script to execute on the bare metal machine. */ + script: string; +} + +export function bareMetalMachineRunCommandParametersSerializer( + item: BareMetalMachineRunCommandParameters, +): any { + return { + arguments: !item["arguments"] + ? item["arguments"] + : item["arguments"].map((p: any) => { + return p; + }), + limitTimeSeconds: item["limitTimeSeconds"], + script: item["script"], + }; +} + +/** BareMetalMachineRunDataExtractsParameters represents the body of request containing list of curated data extraction commands to run on the bare metal machine. */ +export interface BareMetalMachineRunDataExtractsParameters { + /** The list of curated data extraction commands to be executed directly against the target machine. */ + commands: BareMetalMachineCommandSpecification[]; + /** The maximum time the commands are allowed to run. If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be captured, and the exit code matching a timeout will be returned (252). */ + limitTimeSeconds: number; +} + +export function bareMetalMachineRunDataExtractsParametersSerializer( + item: BareMetalMachineRunDataExtractsParameters, +): any { + return { + commands: bareMetalMachineCommandSpecificationArraySerializer(item["commands"]), + limitTimeSeconds: item["limitTimeSeconds"], + }; +} + +export function bareMetalMachineCommandSpecificationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return bareMetalMachineCommandSpecificationSerializer(item); + }); +} + +/** BareMetalMachineCommandSpecification represents the command and optional arguments to exercise against the bare metal machine. */ +export interface BareMetalMachineCommandSpecification { + /** The list of string arguments that will be passed to the script in order as separate arguments. */ + arguments?: string[]; + /** The command to execute against the bare metal machine. */ + command: string; +} + +export function bareMetalMachineCommandSpecificationSerializer( + item: BareMetalMachineCommandSpecification, +): any { + return { + arguments: !item["arguments"] + ? item["arguments"] + : item["arguments"].map((p: any) => { + return p; + }), + command: item["command"], + }; +} + +/** BareMetalMachineRunReadCommandsParameters represents the body of request containing list of read-only commands to run on the bare metal machine. */ +export interface BareMetalMachineRunReadCommandsParameters { + /** The list of read-only commands to be executed directly against the target machine. */ + commands: BareMetalMachineCommandSpecification[]; + /** The maximum time the commands are allowed to run. If the execution time exceeds the maximum, the script will be stopped, any output produced until then will be captured, and the exit code matching a timeout will be returned (252). */ + limitTimeSeconds: number; +} + +export function bareMetalMachineRunReadCommandsParametersSerializer( + item: BareMetalMachineRunReadCommandsParameters, +): any { + return { + commands: bareMetalMachineCommandSpecificationArraySerializer(item["commands"]), + limitTimeSeconds: item["limitTimeSeconds"], + }; +} + +/** Upon creation, the additional services that are provided by the platform will be allocated and represented in the status of this resource. All resources associated with this cloud services network will be part of the same layer 2 (L2) isolation domain. At least one service network must be created but may be reused across many virtual machines and/or Hybrid AKS clusters. */ +export interface CloudServicesNetwork extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** The list of egress endpoints. This allows for connection from a Hybrid AKS cluster to the specified endpoint. */ + additionalEgressEndpoints?: EgressEndpoint[]; + /** The indicator of whether the platform default endpoints are allowed for the egress traffic. */ + enableDefaultEgressEndpoints?: CloudServicesNetworkEnableDefaultEgressEndpoints; + /** The storage options for the cloud services network. */ + storageOptions?: CloudServicesNetworkStorageOptions; + /** The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. */ + readonly associatedResourceIds?: string[]; + /** The resource ID of the Network Cloud cluster this cloud services network is associated with. */ + readonly clusterId?: string; + /** The more detailed status of the cloud services network. */ + readonly detailedStatus?: CloudServicesNetworkDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The full list of additional and default egress endpoints that are currently enabled. */ + readonly enabledEgressEndpoints?: EgressEndpoint[]; + /** Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are associated with this cloud services network. */ + readonly hybridAksClustersAssociatedIds?: string[]; + /** The name of the interface that will be present in the virtual machine to represent this network. */ + readonly interfaceName?: string; + /** The storage status for the cloud services network. */ + readonly storageStatus?: CloudServicesNetworkStorageStatus; + /** Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this cloud services network. */ + readonly virtualMachinesAssociatedIds?: string[]; + /** The provisioning state of the cloud services network. */ + readonly provisioningState?: CloudServicesNetworkProvisioningState; +} + +export function cloudServicesNetworkSerializer(item: CloudServicesNetwork): any { + return { + tags: item["tags"], + location: item["location"], + properties: areAllPropsUndefined(item, [ + "additionalEgressEndpoints", + "enableDefaultEgressEndpoints", + "storageOptions", + ]) + ? undefined + : _cloudServicesNetworkPropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function cloudServicesNetworkDeserializer(item: any): CloudServicesNetwork { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _cloudServicesNetworkPropertiesDeserializer(item["properties"])), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** CloudServicesNetworkProperties represents properties of the cloud services network. */ +export interface CloudServicesNetworkProperties { + /** The list of egress endpoints. This allows for connection from a Hybrid AKS cluster to the specified endpoint. */ + additionalEgressEndpoints?: EgressEndpoint[]; + /** The indicator of whether the platform default endpoints are allowed for the egress traffic. */ + enableDefaultEgressEndpoints?: CloudServicesNetworkEnableDefaultEgressEndpoints; + /** The storage options for the cloud services network. */ + storageOptions?: CloudServicesNetworkStorageOptions; + /** The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. */ + readonly associatedResourceIds?: string[]; + /** The resource ID of the Network Cloud cluster this cloud services network is associated with. */ + readonly clusterId?: string; + /** The more detailed status of the cloud services network. */ + readonly detailedStatus?: CloudServicesNetworkDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The full list of additional and default egress endpoints that are currently enabled. */ + readonly enabledEgressEndpoints?: EgressEndpoint[]; + /** Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are associated with this cloud services network. */ + readonly hybridAksClustersAssociatedIds?: string[]; + /** The name of the interface that will be present in the virtual machine to represent this network. */ + readonly interfaceName?: string; + /** The storage status for the cloud services network. */ + readonly storageStatus?: CloudServicesNetworkStorageStatus; + /** Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this cloud services network. */ + readonly virtualMachinesAssociatedIds?: string[]; + /** The provisioning state of the cloud services network. */ + readonly provisioningState?: CloudServicesNetworkProvisioningState; +} + +export function cloudServicesNetworkPropertiesSerializer( + item: CloudServicesNetworkProperties, +): any { + return { + additionalEgressEndpoints: !item["additionalEgressEndpoints"] + ? item["additionalEgressEndpoints"] + : egressEndpointArraySerializer(item["additionalEgressEndpoints"]), + enableDefaultEgressEndpoints: item["enableDefaultEgressEndpoints"], + storageOptions: !item["storageOptions"] + ? item["storageOptions"] + : cloudServicesNetworkStorageOptionsSerializer(item["storageOptions"]), + }; +} + +export function cloudServicesNetworkPropertiesDeserializer( + item: any, +): CloudServicesNetworkProperties { + return { + additionalEgressEndpoints: !item["additionalEgressEndpoints"] + ? item["additionalEgressEndpoints"] + : egressEndpointArrayDeserializer(item["additionalEgressEndpoints"]), + enableDefaultEgressEndpoints: item["enableDefaultEgressEndpoints"], + storageOptions: !item["storageOptions"] + ? item["storageOptions"] + : cloudServicesNetworkStorageOptionsDeserializer(item["storageOptions"]), + associatedResourceIds: !item["associatedResourceIds"] + ? item["associatedResourceIds"] + : item["associatedResourceIds"].map((p: any) => { + return p; + }), + clusterId: item["clusterId"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + enabledEgressEndpoints: !item["enabledEgressEndpoints"] + ? item["enabledEgressEndpoints"] + : egressEndpointArrayDeserializer(item["enabledEgressEndpoints"]), + hybridAksClustersAssociatedIds: !item["hybridAksClustersAssociatedIds"] + ? item["hybridAksClustersAssociatedIds"] + : item["hybridAksClustersAssociatedIds"].map((p: any) => { + return p; + }), + interfaceName: item["interfaceName"], + storageStatus: !item["storageStatus"] + ? item["storageStatus"] + : cloudServicesNetworkStorageStatusDeserializer(item["storageStatus"]), + virtualMachinesAssociatedIds: !item["virtualMachinesAssociatedIds"] + ? item["virtualMachinesAssociatedIds"] + : item["virtualMachinesAssociatedIds"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function egressEndpointArraySerializer(result: Array): any[] { + return result.map((item) => { + return egressEndpointSerializer(item); + }); +} + +export function egressEndpointArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return egressEndpointDeserializer(item); + }); +} + +/** EgressEndpoint represents the connection from a cloud services network to the specified endpoint for a common purpose. */ +export interface EgressEndpoint { + /** The descriptive category name of endpoints accessible by the AKS agent node. For example, azure-resource-management, API server, etc. The platform egress endpoints provided by default will use the category 'default'. */ + category: string; + /** The list of endpoint dependencies. */ + endpoints: EndpointDependency[]; +} + +export function egressEndpointSerializer(item: EgressEndpoint): any { + return { + category: item["category"], + endpoints: endpointDependencyArraySerializer(item["endpoints"]), + }; +} + +export function egressEndpointDeserializer(item: any): EgressEndpoint { + return { + category: item["category"], + endpoints: endpointDependencyArrayDeserializer(item["endpoints"]), + }; +} + +export function endpointDependencyArraySerializer(result: Array): any[] { + return result.map((item) => { + return endpointDependencySerializer(item); + }); +} + +export function endpointDependencyArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return endpointDependencyDeserializer(item); + }); +} + +/** EndpointDependency represents the definition of an endpoint, including the domain and details. */ +export interface EndpointDependency { + /** The domain name of the dependency. */ + domainName: string; + /** The port of this endpoint. */ + port?: number; +} + +export function endpointDependencySerializer(item: EndpointDependency): any { + return { domainName: item["domainName"], port: item["port"] }; +} + +export function endpointDependencyDeserializer(item: any): EndpointDependency { + return { + domainName: item["domainName"], + port: item["port"], + }; +} + +/** The indicator of whether the platform default endpoints are allowed for the egress traffic. */ +export enum KnownCloudServicesNetworkEnableDefaultEgressEndpoints { + /** Enable default egress endpoints. */ + True = "True", + /** Disable default egress endpoints. */ + False = "False", +} + +/** + * The indicator of whether the platform default endpoints are allowed for the egress traffic. \ + * {@link KnownCloudServicesNetworkEnableDefaultEgressEndpoints} can be used interchangeably with CloudServicesNetworkEnableDefaultEgressEndpoints, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: Enable default egress endpoints. \ + * **False**: Disable default egress endpoints. + */ +export type CloudServicesNetworkEnableDefaultEgressEndpoints = string; + +/** CloudServicesNetworkStorageOptions represents the storage options for the cloud services network. */ +export interface CloudServicesNetworkStorageOptions { + /** The indicator to enable shared storage on the cloud services network. If not specified, the allocation will align with the standard storage enablement. */ + mode?: CloudServicesNetworkStorageMode; + /** The requested storage allocation for the volume in Mebibytes. */ + sizeMiB?: number; + /** The resource ID of the storage appliance that hosts the storage. */ + storageApplianceId?: string; +} + +export function cloudServicesNetworkStorageOptionsSerializer( + item: CloudServicesNetworkStorageOptions, +): any { + return { + mode: item["mode"], + sizeMiB: item["sizeMiB"], + storageApplianceId: item["storageApplianceId"], + }; +} + +export function cloudServicesNetworkStorageOptionsDeserializer( + item: any, +): CloudServicesNetworkStorageOptions { + return { + mode: item["mode"], + sizeMiB: item["sizeMiB"], + storageApplianceId: item["storageApplianceId"], + }; +} + +/** The indicator to enable shared storage on the cloud services network. If not specified, the allocation will align with the standard storage enablement. */ +export enum KnownCloudServicesNetworkStorageMode { + /** No shared storage. */ + None = "None", + /** Standard shared storage. */ + Standard = "Standard", +} + +/** + * The indicator to enable shared storage on the cloud services network. If not specified, the allocation will align with the standard storage enablement. \ + * {@link KnownCloudServicesNetworkStorageMode} can be used interchangeably with CloudServicesNetworkStorageMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: No shared storage. \ + * **Standard**: Standard shared storage. + */ +export type CloudServicesNetworkStorageMode = string; + +/** The more detailed status of the cloud services network. */ +export enum KnownCloudServicesNetworkDetailedStatus { + /** The Error status. */ + Error = "Error", + /** The Available status. */ + Available = "Available", + /** The Provisioning status. */ + Provisioning = "Provisioning", +} + +/** + * The more detailed status of the cloud services network. \ + * {@link KnownCloudServicesNetworkDetailedStatus} can be used interchangeably with CloudServicesNetworkDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Error**: The Error status. \ + * **Available**: The Available status. \ + * **Provisioning**: The Provisioning status. + */ +export type CloudServicesNetworkDetailedStatus = string; + +/** CloudServicesNetworkStorageStatus represents the storage status of the cloud services network. */ +export interface CloudServicesNetworkStorageStatus { + /** The indicator of if shared storage is enabled on the cloud services network. */ + readonly mode?: CloudServicesNetworkStorageMode; + /** The size in Mebibytes of the storage allocation. */ + readonly sizeMiB?: number; + /** The status of the storage allocation for the cloud services network. */ + readonly status?: CloudServicesNetworkStorageStatusStatus; + /** The description for the status of the shared storage. */ + readonly statusMessage?: string; + /** The resource ID of the volume created to host the shared storage. */ + readonly volumeId?: string; +} + +export function cloudServicesNetworkStorageStatusDeserializer( + item: any, +): CloudServicesNetworkStorageStatus { + return { + mode: item["mode"], + sizeMiB: item["sizeMiB"], + status: item["status"], + statusMessage: item["statusMessage"], + volumeId: item["volumeId"], + }; +} + +/** The status of the storage allocation for the cloud services network. */ +export enum KnownCloudServicesNetworkStorageStatusStatus { + /** The storage allocation is available */ + Available = "Available", + /** The storage allocation is expanding the volume. */ + ExpandingVolume = "ExpandingVolume", + /** The expansion of the storage allocation has failed. */ + ExpansionFailed = "ExpansionFailed", + /** The storage allocation is initializing. */ + Initializing = "Initializing", + /** The storage allocation has no status. */ + None = "None", + /** The storage allocation is being repaired. */ + Repairing = "Repairing", +} + +/** + * The status of the storage allocation for the cloud services network. \ + * {@link KnownCloudServicesNetworkStorageStatusStatus} can be used interchangeably with CloudServicesNetworkStorageStatusStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Available**: The storage allocation is available \ + * **ExpandingVolume**: The storage allocation is expanding the volume. \ + * **ExpansionFailed**: The expansion of the storage allocation has failed. \ + * **Initializing**: The storage allocation is initializing. \ + * **None**: The storage allocation has no status. \ + * **Repairing**: The storage allocation is being repaired. + */ +export type CloudServicesNetworkStorageStatusStatus = string; + +/** The provisioning state of the cloud services network. */ +export enum KnownCloudServicesNetworkProvisioningState { + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Failed status. */ + Failed = "Failed", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Accepted status. */ + Accepted = "Accepted", +} + +/** + * The provisioning state of the cloud services network. \ + * {@link KnownCloudServicesNetworkProvisioningState} can be used interchangeably with CloudServicesNetworkProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The Succeeded status. \ + * **Failed**: The Failed status. \ + * **Canceled**: The Canceled status. \ + * **Provisioning**: The Provisioning status. \ + * **Accepted**: The Accepted status. + */ +export type CloudServicesNetworkProvisioningState = string; + +/** CloudServicesNetworkPatchParameters represents the body of the request to patch the cloud services network. */ +export interface CloudServicesNetworkPatchParameters { + /** Resource tags. */ + tags?: Record; + /** The list of egress endpoints. This allows for connection from a Hybrid AKS cluster to the specified endpoint. */ + additionalEgressEndpoints?: EgressEndpoint[]; + /** The indicator of whether the platform default endpoints are allowed for the egress traffic. */ + enableDefaultEgressEndpoints?: CloudServicesNetworkEnableDefaultEgressEndpoints; + /** The storage options for the cloud services network. */ + storageOptions?: CloudServicesNetworkStorageOptionsPatch; +} + +export function cloudServicesNetworkPatchParametersSerializer( + item: CloudServicesNetworkPatchParameters, +): any { + return { + properties: areAllPropsUndefined(item, [ + "additionalEgressEndpoints", + "enableDefaultEgressEndpoints", + "storageOptions", + ]) + ? undefined + : _cloudServicesNetworkPatchParametersPropertiesSerializer(item), + tags: item["tags"], + }; +} + +/** CloudServicesNetworkPatchProperties represents the properties of the cloud services network that can be updated using a patch request. */ +export interface CloudServicesNetworkPatchProperties { + /** The list of egress endpoints. This allows for connection from a Hybrid AKS cluster to the specified endpoint. */ + additionalEgressEndpoints?: EgressEndpoint[]; + /** The indicator of whether the platform default endpoints are allowed for the egress traffic. */ + enableDefaultEgressEndpoints?: CloudServicesNetworkEnableDefaultEgressEndpoints; + /** The storage options for the cloud services network. */ + storageOptions?: CloudServicesNetworkStorageOptionsPatch; +} + +export function cloudServicesNetworkPatchPropertiesSerializer( + item: CloudServicesNetworkPatchProperties, +): any { + return { + additionalEgressEndpoints: !item["additionalEgressEndpoints"] + ? item["additionalEgressEndpoints"] + : egressEndpointArraySerializer(item["additionalEgressEndpoints"]), + enableDefaultEgressEndpoints: item["enableDefaultEgressEndpoints"], + storageOptions: !item["storageOptions"] + ? item["storageOptions"] + : cloudServicesNetworkStorageOptionsPatchSerializer(item["storageOptions"]), + }; +} + +/** CloudServicesNetworkStorageOptionsPatch represents the patchable storage options for the cloud services network. */ +export interface CloudServicesNetworkStorageOptionsPatch { + /** The indicator to enable shared storage on the cloud services network. */ + mode?: CloudServicesNetworkStorageMode; + /** The requested storage allocation for the volume in Mebibytes. */ + sizeMiB?: number; + /** The resource ID of the storage appliance that hosts the storage. */ + storageApplianceId?: string; +} + +export function cloudServicesNetworkStorageOptionsPatchSerializer( + item: CloudServicesNetworkStorageOptionsPatch, +): any { + return { + mode: item["mode"], + sizeMiB: item["sizeMiB"], + storageApplianceId: item["storageApplianceId"], + }; +} + +/** CloudServicesNetworkList represents a list of cloud services networks. */ +export interface _CloudServicesNetworkList { + /** The CloudServicesNetwork items on this page */ + value: CloudServicesNetwork[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _cloudServicesNetworkListDeserializer(item: any): _CloudServicesNetworkList { + return { + value: cloudServicesNetworkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function cloudServicesNetworkArraySerializer(result: Array): any[] { + return result.map((item) => { + return cloudServicesNetworkSerializer(item); + }); +} + +export function cloudServicesNetworkArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return cloudServicesNetworkDeserializer(item); + }); +} + +/** ClusterManager represents a control-plane to manage one or more on-premises clusters. */ +export interface ClusterManager extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; + /** The kind of the cluster manager. */ + kind?: DeploymentType; + /** The resource ID of the Log Analytics workspace that is used for the logs collection. */ + analyticsWorkspaceId?: string; + /** The Azure availability zones within the region that will be used to support the cluster manager resource. */ + availabilityZones?: string[]; + /** The list of the cluster versions the manager supports. It is used as input in clusterVersion property of a cluster resource. */ + readonly clusterVersions?: ClusterAvailableVersion[]; + /** The detailed status that provides additional information about the cluster manager. */ + readonly detailedStatus?: ClusterManagerDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The resource ID of the fabric controller that has one to one mapping with the cluster manager. */ + fabricControllerId: string; + /** The configuration of the managed resource group associated with the resource. */ + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + /** 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. */ + readonly managerExtendedLocation?: ExtendedLocation; + /** The provisioning state of the cluster manager. */ + readonly provisioningState?: ClusterManagerProvisioningState; + /** The relay configuration for the cluster manager. */ + readonly relayConfiguration?: ClusterManagerRelayConfiguration; + /** The size of the Azure virtual machines to use for hosting the cluster manager resource. */ + vmSize?: string; +} + +export function clusterManagerSerializer(item: ClusterManager): any { + return { + tags: item["tags"], + location: item["location"], + properties: _clusterManagerPropertiesSerializer(item), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentitySerializer(item["identity"]), + kind: item["kind"], + }; +} + +export function clusterManagerDeserializer(item: any): ClusterManager { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._clusterManagerPropertiesDeserializer(item["properties"]), + etag: item["etag"], + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentityDeserializer(item["identity"]), + kind: item["kind"], + }; +} + +/** ClusterManagerProperties represents the properties of a cluster manager. */ +export interface ClusterManagerProperties { + /** The resource ID of the Log Analytics workspace that is used for the logs collection. */ + analyticsWorkspaceId?: string; + /** The Azure availability zones within the region that will be used to support the cluster manager resource. */ + availabilityZones?: string[]; + /** The list of the cluster versions the manager supports. It is used as input in clusterVersion property of a cluster resource. */ + readonly clusterVersions?: ClusterAvailableVersion[]; + /** The detailed status that provides additional information about the cluster manager. */ + readonly detailedStatus?: ClusterManagerDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The resource ID of the fabric controller that has one to one mapping with the cluster manager. */ + fabricControllerId: string; + /** The configuration of the managed resource group associated with the resource. */ + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + /** 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. */ + readonly managerExtendedLocation?: ExtendedLocation; + /** The provisioning state of the cluster manager. */ + readonly provisioningState?: ClusterManagerProvisioningState; + /** The relay configuration for the cluster manager. */ + readonly relayConfiguration?: ClusterManagerRelayConfiguration; + /** The size of the Azure virtual machines to use for hosting the cluster manager resource. */ + vmSize?: string; +} + +export function clusterManagerPropertiesSerializer(item: ClusterManagerProperties): any { + return { + analyticsWorkspaceId: item["analyticsWorkspaceId"], + availabilityZones: !item["availabilityZones"] + ? item["availabilityZones"] + : item["availabilityZones"].map((p: any) => { + return p; + }), + fabricControllerId: item["fabricControllerId"], + managedResourceGroupConfiguration: !item["managedResourceGroupConfiguration"] + ? item["managedResourceGroupConfiguration"] + : managedResourceGroupConfigurationSerializer(item["managedResourceGroupConfiguration"]), + vmSize: item["vmSize"], + }; +} + +export function clusterManagerPropertiesDeserializer(item: any): ClusterManagerProperties { + return { + analyticsWorkspaceId: item["analyticsWorkspaceId"], + availabilityZones: !item["availabilityZones"] + ? item["availabilityZones"] + : item["availabilityZones"].map((p: any) => { + return p; + }), + clusterVersions: !item["clusterVersions"] + ? item["clusterVersions"] + : clusterAvailableVersionArrayDeserializer(item["clusterVersions"]), + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + fabricControllerId: item["fabricControllerId"], + managedResourceGroupConfiguration: !item["managedResourceGroupConfiguration"] + ? item["managedResourceGroupConfiguration"] + : managedResourceGroupConfigurationDeserializer(item["managedResourceGroupConfiguration"]), + managerExtendedLocation: !item["managerExtendedLocation"] + ? item["managerExtendedLocation"] + : extendedLocationDeserializer(item["managerExtendedLocation"]), + provisioningState: item["provisioningState"], + relayConfiguration: !item["relayConfiguration"] + ? item["relayConfiguration"] + : clusterManagerRelayConfigurationDeserializer(item["relayConfiguration"]), + vmSize: item["vmSize"], + }; +} + +export function clusterAvailableVersionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return clusterAvailableVersionDeserializer(item); + }); +} + +/** ClusterAvailableVersion represents the cluster version that the cluster manager can be asked to create and manage. */ +export interface ClusterAvailableVersion { + /** The last date the version of the platform is supported. */ + readonly supportExpiryDate?: string; + /** The version of the cluster to be deployed. */ + readonly targetClusterVersion?: string; +} + +export function clusterAvailableVersionDeserializer(item: any): ClusterAvailableVersion { + return { + supportExpiryDate: item["supportExpiryDate"], + targetClusterVersion: item["targetClusterVersion"], + }; +} + +/** The detailed status that provides additional information about the cluster manager. */ +export enum KnownClusterManagerDetailedStatus { + /** The Error status. */ + Error = "Error", + /** The Available status. */ + Available = "Available", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The ProvisioningFailed status. */ + ProvisioningFailed = "ProvisioningFailed", + /** The Updating status. */ + Updating = "Updating", + /** The UpdateFailed status. */ + UpdateFailed = "UpdateFailed", +} + +/** + * The detailed status that provides additional information about the cluster manager. \ + * {@link KnownClusterManagerDetailedStatus} can be used interchangeably with ClusterManagerDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Error**: The Error status. \ + * **Available**: The Available status. \ + * **Provisioning**: The Provisioning status. \ + * **ProvisioningFailed**: The ProvisioningFailed status. \ + * **Updating**: The Updating status. \ + * **UpdateFailed**: The UpdateFailed status. + */ +export type ClusterManagerDetailedStatus = string; + +/** ManagedResourceGroupConfiguration represents the configuration of the resource group managed by Azure. */ +export interface ManagedResourceGroupConfiguration { + /** The location of the managed resource group. If not specified, the location of the parent resource is chosen. */ + location?: string; + /** The name for the managed resource group. If not specified, the unique name is automatically generated. */ + name?: string; +} + +export function managedResourceGroupConfigurationSerializer( + item: ManagedResourceGroupConfiguration, +): any { + return { location: item["location"], name: item["name"] }; +} + +export function managedResourceGroupConfigurationDeserializer( + item: any, +): ManagedResourceGroupConfiguration { + return { + location: item["location"], + name: item["name"], + }; +} + +/** The provisioning state of the cluster manager. */ +export enum KnownClusterManagerProvisioningState { + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Failed status. */ + Failed = "Failed", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Accepted status. */ + Accepted = "Accepted", + /** The Updating status. */ + Updating = "Updating", +} + +/** + * The provisioning state of the cluster manager. \ + * {@link KnownClusterManagerProvisioningState} can be used interchangeably with ClusterManagerProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The Succeeded status. \ + * **Failed**: The Failed status. \ + * **Canceled**: The Canceled status. \ + * **Provisioning**: The Provisioning status. \ + * **Accepted**: The Accepted status. \ + * **Updating**: The Updating status. + */ +export type ClusterManagerProvisioningState = string; + +/** ClusterManagerRelayConfiguration represents the relay configuration for the cluster manager. */ +export interface ClusterManagerRelayConfiguration { + /** The resource ID of the Azure relay namespace managed by the cluster manager. */ + relayNamespaceId?: string; +} + +export function clusterManagerRelayConfigurationDeserializer( + item: any, +): ClusterManagerRelayConfiguration { + return { + relayNamespaceId: item["relayNamespaceId"], + }; +} + +/** Managed service identity (system assigned and/or user assigned identities) */ +export interface ManagedServiceIdentity { + /** The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. */ + readonly principalId?: string; + /** The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. */ + readonly tenantId?: string; + /** The type of managed identity assigned to this resource. */ + type: ManagedServiceIdentityType; + /** The identities assigned to this resource by the user. */ + userAssignedIdentities?: Record; +} + +export function managedServiceIdentitySerializer(item: ManagedServiceIdentity): any { + return { type: item["type"], userAssignedIdentities: item["userAssignedIdentities"] }; +} + +export function managedServiceIdentityDeserializer(item: any): ManagedServiceIdentity { + return { + principalId: item["principalId"], + tenantId: item["tenantId"], + type: item["type"], + userAssignedIdentities: !item["userAssignedIdentities"] + ? item["userAssignedIdentities"] + : Object.fromEntries( + Object.entries(item["userAssignedIdentities"]).map(([k, p]: [string, any]) => [ + k, + !p ? p : userAssignedIdentityDeserializer(p), + ]), + ), + }; +} + +/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ +export enum KnownManagedServiceIdentityType { + /** No managed identity. */ + None = "None", + /** System assigned managed identity. */ + SystemAssigned = "SystemAssigned", + /** User assigned managed identity. */ + UserAssigned = "UserAssigned", + /** System and user assigned managed identity. */ + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", +} + +/** + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). \ + * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: No managed identity. \ + * **SystemAssigned**: System assigned managed identity. \ + * **UserAssigned**: User assigned managed identity. \ + * **SystemAssigned,UserAssigned**: System and user assigned managed identity. + */ +export type ManagedServiceIdentityType = string; + +/** User assigned identity properties */ +export interface UserAssignedIdentity { + /** The principal ID of the assigned identity. */ + readonly principalId?: string; + /** The client ID of the assigned identity. */ + readonly clientId?: string; +} + +export function userAssignedIdentitySerializer(_item: UserAssignedIdentity): any { + return {}; +} + +export function userAssignedIdentityDeserializer(item: any): UserAssignedIdentity { + return { + principalId: item["principalId"], + clientId: item["clientId"], + }; +} + +/** The type (kind) of the cluster. When specified, the value must exactly match the kind configured on the cluster manager that manages the cluster. If omitted, the service will default the value to the kind value of the cluster manager. */ +export enum KnownDeploymentType { + /** Azure Operator Nexus */ + Nexus = "Nexus", + /** Azure Local */ + AzureLocal = "AzureLocal", +} + +/** + * The type (kind) of the cluster. When specified, the value must exactly match the kind configured on the cluster manager that manages the cluster. If omitted, the service will default the value to the kind value of the cluster manager. \ + * {@link KnownDeploymentType} can be used interchangeably with DeploymentType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Nexus**: Azure Operator Nexus \ + * **AzureLocal**: Azure Local + */ +export type DeploymentType = string; + +/** ClusterManagerPatchParameters represents the body of the request to patch the cluster properties. */ +export interface ClusterManagerPatchParameters { + /** The identity for the resource. */ + identity?: ManagedServiceIdentity; + /** Resource tags. */ + tags?: Record; +} + +export function clusterManagerPatchParametersSerializer(item: ClusterManagerPatchParameters): any { + return { + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentitySerializer(item["identity"]), + tags: item["tags"], + }; +} + +/** ClusterManagerList represents a list of cluster manager objects. */ +export interface _ClusterManagerList { + /** The ClusterManager items on this page */ + value: ClusterManager[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _clusterManagerListDeserializer(item: any): _ClusterManagerList { + return { + value: clusterManagerArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function clusterManagerArraySerializer(result: Array): any[] { + return result.map((item) => { + return clusterManagerSerializer(item); + }); +} + +export function clusterManagerArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return clusterManagerDeserializer(item); + }); +} + +/** ClusterManagerUpdateRelayPrivateEndpointConnectionParameters represents the body of the request to approve or reject the relay private endpoint connection for the private relay managed by a cluster manager. */ +export interface ClusterManagerUpdateRelayPrivateEndpointConnectionParameters { + /** The state to set for the private endpoint connection. */ + connectionState: RelayPrivateEndpointConnectionState; + /** The description to associate with the private endpoint connection. */ + description?: string; + /** The resource ID of private endpoint to be permitted or denied connection to the relay namespace. */ + privateEndpointResourceId: string; +} + +export function clusterManagerUpdateRelayPrivateEndpointConnectionParametersSerializer( + item: ClusterManagerUpdateRelayPrivateEndpointConnectionParameters, +): any { + return { + connectionState: item["connectionState"], + description: item["description"], + privateEndpointResourceId: item["privateEndpointResourceId"], + }; +} + +/** The state to set for the private endpoint connection. */ +export enum KnownRelayPrivateEndpointConnectionState { + /** The private endpoint connection is approved. */ + Approved = "Approved", + /** The private endpoint connection is rejected. */ + Rejected = "Rejected", +} + +/** + * The state to set for the private endpoint connection. \ + * {@link KnownRelayPrivateEndpointConnectionState} can be used interchangeably with RelayPrivateEndpointConnectionState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Approved**: The private endpoint connection is approved. \ + * **Rejected**: The private endpoint connection is rejected. + */ +export type RelayPrivateEndpointConnectionState = string; + +/** Cluster represents the on-premises Network Cloud cluster. */ +export interface Cluster extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; + /** The type (kind) of the cluster. When specified, the value must exactly match the kind configured on the cluster manager that manages the cluster. If omitted, the service will default the value to the kind value of the cluster manager. */ + kind?: DeploymentType; + /** 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. */ + aggregatorOrSingleRackDefinition: RackDefinition; + /** The settings for the log analytics workspace used for output of logs from this cluster. */ + analyticsOutputSettings?: AnalyticsOutputSettings; + /** Field Deprecated. The resource ID of the Log Analytics Workspace that will be used for storing relevant logs. */ + analyticsWorkspaceId?: string; + /** The customer-provided location information to identify where the cluster resides. */ + clusterLocation?: string; + /** Field Deprecated: Use managed identity to provide cluster privileges. The service principal to be used by the cluster during Arc Appliance installation. */ + clusterServicePrincipal?: ServicePrincipalInformation; + /** The type of rack configuration for the cluster. */ + clusterType: ClusterType; + /** The current runtime version of the cluster. */ + clusterVersion: string; + /** The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. */ + commandOutputSettings?: CommandOutputSettings; + /** The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. */ + computeDeploymentThreshold?: ValidationThreshold; + /** The list of rack definitions for the compute racks in a multi-rack cluster, or an empty list in a single-rack cluster. */ + computeRackDefinitions?: RackDefinition[]; + /** The configuration of the managed resource group associated with the resource. */ + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + /** The resource ID of the Network Fabric associated with the cluster. */ + networkFabricId: string; + /** The settings for cluster runtime protection. */ + runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; + /** The configuration for use of a key vault to store secrets for later retrieval by the operator. */ + secretArchive?: ClusterSecretArchive; + /** The settings for the secret archive used to hold credentials for the cluster. */ + secretArchiveSettings?: SecretArchiveSettings; + /** The strategy for updating the cluster. */ + updateStrategy?: ClusterUpdateStrategy; + /** The settings for how security vulnerability scanning is applied to the cluster. */ + vulnerabilityScanningSettings?: VulnerabilityScanningSettings; + /** The current state of any in progress or completed actions. The most recent known instance of each action type is shown. */ + readonly actionStates?: ActionState[]; + /** The list of cluster runtime version upgrades available for this cluster. */ + readonly availableUpgradeVersions?: ClusterAvailableUpgradeVersion[]; + /** The capacity supported by this cluster. */ + readonly clusterCapacity?: ClusterCapacity; + /** The latest heartbeat status between the cluster manager and the cluster. */ + readonly clusterConnectionStatus?: ClusterConnectionStatus; + /** 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. */ + readonly clusterExtendedLocation?: ExtendedLocation; + /** The latest connectivity status between cluster manager and the cluster. */ + readonly clusterManagerConnectionStatus?: ClusterManagerConnectionStatus; + /** The resource ID of the cluster manager that manages this cluster. This is set by the Cluster Manager when the cluster is created. */ + readonly clusterManagerId?: string; + /** The current detailed status of the cluster. */ + readonly detailedStatus?: ClusterDetailedStatus; + /** The descriptive message about the detailed status. */ + readonly detailedStatusMessage?: string; + /** 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). */ + readonly hybridAksExtendedLocation?: ExtendedLocation; + /** The date and time of the end of the last successful version update for the cluster. */ + readonly lastSuccessfulVersionUpdateTime?: Date; + /** The list of credentials that are managed for the cluster and can be rotated on-demand. */ + readonly managedCredentials?: string[]; + /** The count of Manual Action Taken (MAT) events that have not been validated. */ + readonly manualActionCount?: number; + /** The support end date of the runtime version of the cluster. */ + readonly supportExpiryDate?: string; + /** The list of workload resource IDs that are hosted within this cluster. */ + readonly workloadResourceIds?: string[]; + /** The provisioning state of the cluster. */ + readonly provisioningState?: ClusterProvisioningState; +} + +export function clusterSerializer(item: Cluster): any { + return { + tags: item["tags"], + location: item["location"], + properties: _clusterPropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentitySerializer(item["identity"]), + kind: item["kind"], + }; +} + +export function clusterDeserializer(item: any): Cluster { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._clusterPropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentityDeserializer(item["identity"]), + kind: item["kind"], + }; +} + +/** ClusterProperties represents the properties of a cluster. */ +export interface ClusterProperties { + /** 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. */ + aggregatorOrSingleRackDefinition: RackDefinition; + /** The settings for the log analytics workspace used for output of logs from this cluster. */ + analyticsOutputSettings?: AnalyticsOutputSettings; + /** Field Deprecated. The resource ID of the Log Analytics Workspace that will be used for storing relevant logs. */ + analyticsWorkspaceId?: string; + /** The customer-provided location information to identify where the cluster resides. */ + clusterLocation?: string; + /** Field Deprecated: Use managed identity to provide cluster privileges. The service principal to be used by the cluster during Arc Appliance installation. */ + clusterServicePrincipal?: ServicePrincipalInformation; + /** The type of rack configuration for the cluster. */ + clusterType: ClusterType; + /** The current runtime version of the cluster. */ + clusterVersion: string; + /** The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. */ + commandOutputSettings?: CommandOutputSettings; + /** The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. */ + computeDeploymentThreshold?: ValidationThreshold; + /** The list of rack definitions for the compute racks in a multi-rack cluster, or an empty list in a single-rack cluster. */ + computeRackDefinitions?: RackDefinition[]; + /** The configuration of the managed resource group associated with the resource. */ + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + /** The resource ID of the Network Fabric associated with the cluster. */ + networkFabricId: string; + /** The settings for cluster runtime protection. */ + runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; + /** The configuration for use of a key vault to store secrets for later retrieval by the operator. */ + secretArchive?: ClusterSecretArchive; + /** The settings for the secret archive used to hold credentials for the cluster. */ + secretArchiveSettings?: SecretArchiveSettings; + /** The strategy for updating the cluster. */ + updateStrategy?: ClusterUpdateStrategy; + /** The settings for how security vulnerability scanning is applied to the cluster. */ + vulnerabilityScanningSettings?: VulnerabilityScanningSettings; + /** The current state of any in progress or completed actions. The most recent known instance of each action type is shown. */ + readonly actionStates?: ActionState[]; + /** The list of cluster runtime version upgrades available for this cluster. */ + readonly availableUpgradeVersions?: ClusterAvailableUpgradeVersion[]; + /** The capacity supported by this cluster. */ + readonly clusterCapacity?: ClusterCapacity; + /** The latest heartbeat status between the cluster manager and the cluster. */ + readonly clusterConnectionStatus?: ClusterConnectionStatus; + /** 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. */ + readonly clusterExtendedLocation?: ExtendedLocation; + /** The latest connectivity status between cluster manager and the cluster. */ + readonly clusterManagerConnectionStatus?: ClusterManagerConnectionStatus; + /** The resource ID of the cluster manager that manages this cluster. This is set by the Cluster Manager when the cluster is created. */ + readonly clusterManagerId?: string; + /** The current detailed status of the cluster. */ + readonly detailedStatus?: ClusterDetailedStatus; + /** The descriptive message about the detailed status. */ + readonly detailedStatusMessage?: string; + /** 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). */ + readonly hybridAksExtendedLocation?: ExtendedLocation; + /** The date and time of the end of the last successful version update for the cluster. */ + readonly lastSuccessfulVersionUpdateTime?: Date; + /** The list of credentials that are managed for the cluster and can be rotated on-demand. */ + readonly managedCredentials?: string[]; + /** The count of Manual Action Taken (MAT) events that have not been validated. */ + readonly manualActionCount?: number; + /** The support end date of the runtime version of the cluster. */ + readonly supportExpiryDate?: string; + /** The list of workload resource IDs that are hosted within this cluster. */ + readonly workloadResourceIds?: string[]; + /** The provisioning state of the cluster. */ + readonly provisioningState?: ClusterProvisioningState; +} + +export function clusterPropertiesSerializer(item: ClusterProperties): any { + return { + aggregatorOrSingleRackDefinition: rackDefinitionSerializer( + item["aggregatorOrSingleRackDefinition"], + ), + analyticsOutputSettings: !item["analyticsOutputSettings"] + ? item["analyticsOutputSettings"] + : analyticsOutputSettingsSerializer(item["analyticsOutputSettings"]), + analyticsWorkspaceId: item["analyticsWorkspaceId"], + clusterLocation: item["clusterLocation"], + clusterServicePrincipal: !item["clusterServicePrincipal"] + ? item["clusterServicePrincipal"] + : servicePrincipalInformationSerializer(item["clusterServicePrincipal"]), + clusterType: item["clusterType"], + clusterVersion: item["clusterVersion"], + commandOutputSettings: !item["commandOutputSettings"] + ? item["commandOutputSettings"] + : commandOutputSettingsSerializer(item["commandOutputSettings"]), + computeDeploymentThreshold: !item["computeDeploymentThreshold"] + ? item["computeDeploymentThreshold"] + : validationThresholdSerializer(item["computeDeploymentThreshold"]), + computeRackDefinitions: !item["computeRackDefinitions"] + ? item["computeRackDefinitions"] + : rackDefinitionArraySerializer(item["computeRackDefinitions"]), + managedResourceGroupConfiguration: !item["managedResourceGroupConfiguration"] + ? item["managedResourceGroupConfiguration"] + : managedResourceGroupConfigurationSerializer(item["managedResourceGroupConfiguration"]), + networkFabricId: item["networkFabricId"], + runtimeProtectionConfiguration: !item["runtimeProtectionConfiguration"] + ? item["runtimeProtectionConfiguration"] + : runtimeProtectionConfigurationSerializer(item["runtimeProtectionConfiguration"]), + secretArchive: !item["secretArchive"] + ? item["secretArchive"] + : clusterSecretArchiveSerializer(item["secretArchive"]), + secretArchiveSettings: !item["secretArchiveSettings"] + ? item["secretArchiveSettings"] + : secretArchiveSettingsSerializer(item["secretArchiveSettings"]), + updateStrategy: !item["updateStrategy"] + ? item["updateStrategy"] + : clusterUpdateStrategySerializer(item["updateStrategy"]), + vulnerabilityScanningSettings: !item["vulnerabilityScanningSettings"] + ? item["vulnerabilityScanningSettings"] + : vulnerabilityScanningSettingsSerializer(item["vulnerabilityScanningSettings"]), + }; +} + +export function clusterPropertiesDeserializer(item: any): ClusterProperties { + return { + aggregatorOrSingleRackDefinition: rackDefinitionDeserializer( + item["aggregatorOrSingleRackDefinition"], + ), + analyticsOutputSettings: !item["analyticsOutputSettings"] + ? item["analyticsOutputSettings"] + : analyticsOutputSettingsDeserializer(item["analyticsOutputSettings"]), + analyticsWorkspaceId: item["analyticsWorkspaceId"], + clusterLocation: item["clusterLocation"], + clusterServicePrincipal: !item["clusterServicePrincipal"] + ? item["clusterServicePrincipal"] + : servicePrincipalInformationDeserializer(item["clusterServicePrincipal"]), + clusterType: item["clusterType"], + clusterVersion: item["clusterVersion"], + commandOutputSettings: !item["commandOutputSettings"] + ? item["commandOutputSettings"] + : commandOutputSettingsDeserializer(item["commandOutputSettings"]), + computeDeploymentThreshold: !item["computeDeploymentThreshold"] + ? item["computeDeploymentThreshold"] + : validationThresholdDeserializer(item["computeDeploymentThreshold"]), + computeRackDefinitions: !item["computeRackDefinitions"] + ? item["computeRackDefinitions"] + : rackDefinitionArrayDeserializer(item["computeRackDefinitions"]), + managedResourceGroupConfiguration: !item["managedResourceGroupConfiguration"] + ? item["managedResourceGroupConfiguration"] + : managedResourceGroupConfigurationDeserializer(item["managedResourceGroupConfiguration"]), + networkFabricId: item["networkFabricId"], + runtimeProtectionConfiguration: !item["runtimeProtectionConfiguration"] + ? item["runtimeProtectionConfiguration"] + : runtimeProtectionConfigurationDeserializer(item["runtimeProtectionConfiguration"]), + secretArchive: !item["secretArchive"] + ? item["secretArchive"] + : clusterSecretArchiveDeserializer(item["secretArchive"]), + secretArchiveSettings: !item["secretArchiveSettings"] + ? item["secretArchiveSettings"] + : secretArchiveSettingsDeserializer(item["secretArchiveSettings"]), + updateStrategy: !item["updateStrategy"] + ? item["updateStrategy"] + : clusterUpdateStrategyDeserializer(item["updateStrategy"]), + vulnerabilityScanningSettings: !item["vulnerabilityScanningSettings"] + ? item["vulnerabilityScanningSettings"] + : vulnerabilityScanningSettingsDeserializer(item["vulnerabilityScanningSettings"]), + actionStates: !item["actionStates"] + ? item["actionStates"] + : actionStateArrayDeserializer(item["actionStates"]), + availableUpgradeVersions: !item["availableUpgradeVersions"] + ? item["availableUpgradeVersions"] + : clusterAvailableUpgradeVersionArrayDeserializer(item["availableUpgradeVersions"]), + clusterCapacity: !item["clusterCapacity"] + ? item["clusterCapacity"] + : clusterCapacityDeserializer(item["clusterCapacity"]), + clusterConnectionStatus: item["clusterConnectionStatus"], + clusterExtendedLocation: !item["clusterExtendedLocation"] + ? item["clusterExtendedLocation"] + : extendedLocationDeserializer(item["clusterExtendedLocation"]), + clusterManagerConnectionStatus: item["clusterManagerConnectionStatus"], + clusterManagerId: item["clusterManagerId"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + hybridAksExtendedLocation: !item["hybridAksExtendedLocation"] + ? item["hybridAksExtendedLocation"] + : extendedLocationDeserializer(item["hybridAksExtendedLocation"]), + lastSuccessfulVersionUpdateTime: !item["lastSuccessfulVersionUpdateTime"] + ? item["lastSuccessfulVersionUpdateTime"] + : new Date(item["lastSuccessfulVersionUpdateTime"]), + managedCredentials: !item["managedCredentials"] + ? item["managedCredentials"] + : item["managedCredentials"].map((p: any) => { + return p; + }), + manualActionCount: item["manualActionCount"], + supportExpiryDate: item["supportExpiryDate"], + workloadResourceIds: !item["workloadResourceIds"] + ? item["workloadResourceIds"] + : item["workloadResourceIds"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +/** RackDefinition represents details regarding the rack. */ +export interface RackDefinition { + /** The zone name used for this rack when created. Availability zones are used for workload placement. */ + availabilityZone?: string; + /** The unordered list of bare metal machine configuration. */ + bareMetalMachineConfigurationData?: BareMetalMachineConfigurationData[]; + /** The resource ID of the network rack that matches this rack definition. */ + networkRackId: string; + /** The free-form description of the rack's location. */ + rackLocation?: string; + /** The unique identifier for the rack within Network Cloud cluster. An alternate unique alphanumeric value other than a serial number may be provided if desired. */ + rackSerialNumber: string; + /** The resource ID of the sku for the rack being added. */ + rackSkuId: string; + /** The list of storage appliance configuration data for this rack. */ + storageApplianceConfigurationData?: StorageApplianceConfigurationData[]; +} + +export function rackDefinitionSerializer(item: RackDefinition): any { + return { + availabilityZone: item["availabilityZone"], + bareMetalMachineConfigurationData: !item["bareMetalMachineConfigurationData"] + ? item["bareMetalMachineConfigurationData"] + : bareMetalMachineConfigurationDataArraySerializer(item["bareMetalMachineConfigurationData"]), + networkRackId: item["networkRackId"], + rackLocation: item["rackLocation"], + rackSerialNumber: item["rackSerialNumber"], + rackSkuId: item["rackSkuId"], + storageApplianceConfigurationData: !item["storageApplianceConfigurationData"] + ? item["storageApplianceConfigurationData"] + : storageApplianceConfigurationDataArraySerializer(item["storageApplianceConfigurationData"]), + }; +} + +export function rackDefinitionDeserializer(item: any): RackDefinition { + return { + availabilityZone: item["availabilityZone"], + bareMetalMachineConfigurationData: !item["bareMetalMachineConfigurationData"] + ? item["bareMetalMachineConfigurationData"] + : bareMetalMachineConfigurationDataArrayDeserializer( + item["bareMetalMachineConfigurationData"], + ), + networkRackId: item["networkRackId"], + rackLocation: item["rackLocation"], + rackSerialNumber: item["rackSerialNumber"], + rackSkuId: item["rackSkuId"], + storageApplianceConfigurationData: !item["storageApplianceConfigurationData"] + ? item["storageApplianceConfigurationData"] + : storageApplianceConfigurationDataArrayDeserializer( + item["storageApplianceConfigurationData"], + ), + }; +} + +export function bareMetalMachineConfigurationDataArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return bareMetalMachineConfigurationDataSerializer(item); + }); +} + +export function bareMetalMachineConfigurationDataArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return bareMetalMachineConfigurationDataDeserializer(item); + }); +} + +/** BareMetalMachineConfigurationData represents configuration for the bare metal machine. */ +export interface BareMetalMachineConfigurationData { + /** The connection string for the baseboard management controller including IP address and protocol. */ + readonly bmcConnectionString?: string; + /** The credentials of the baseboard management controller on this bare metal machine. The password field is expected to be an Azure Key Vault key URL. Until the cluster is converted to utilize managed identity by setting the secret archive settings, the actual password value should be provided instead. */ + bmcCredentials: AdministrativeCredentials; + /** The MAC address of the BMC for this machine. */ + bmcMacAddress: string; + /** The MAC address associated with the PXE NIC card. */ + bootMacAddress: string; + /** The free-form additional information about the machine, e.g. an asset tag. */ + machineDetails?: string; + /** The user-provided name for the bare metal machine created from this specification. If not provided, the machine name will be generated programmatically. */ + machineName?: string; + /** The slot the physical machine is in the rack based on the BOM configuration. */ + rackSlot: number; + /** The serial number of the machine. Hardware suppliers may use an alternate value. For example, service tag. */ + serialNumber: string; +} + +export function bareMetalMachineConfigurationDataSerializer( + item: BareMetalMachineConfigurationData, +): any { + return { + bmcCredentials: administrativeCredentialsSerializer(item["bmcCredentials"]), + bmcMacAddress: item["bmcMacAddress"], + bootMacAddress: item["bootMacAddress"], + machineDetails: item["machineDetails"], + machineName: item["machineName"], + rackSlot: item["rackSlot"], + serialNumber: item["serialNumber"], + }; +} + +export function bareMetalMachineConfigurationDataDeserializer( + item: any, +): BareMetalMachineConfigurationData { + return { + bmcConnectionString: item["bmcConnectionString"], + bmcCredentials: administrativeCredentialsDeserializer(item["bmcCredentials"]), + bmcMacAddress: item["bmcMacAddress"], + bootMacAddress: item["bootMacAddress"], + machineDetails: item["machineDetails"], + machineName: item["machineName"], + rackSlot: item["rackSlot"], + serialNumber: item["serialNumber"], + }; +} + +export function storageApplianceConfigurationDataArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return storageApplianceConfigurationDataSerializer(item); + }); +} + +export function storageApplianceConfigurationDataArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return storageApplianceConfigurationDataDeserializer(item); + }); +} + +/** StorageApplianceConfigurationData represents configuration for the storage application. */ +export interface StorageApplianceConfigurationData { + /** The credentials of the administrative interface on this storage appliance. The password field is expected to be an Azure Key Vault key URL. Until the cluster is converted to utilize managed identity by setting the secret archive settings, the actual password value should be provided instead. */ + adminCredentials: AdministrativeCredentials; + /** The slot that storage appliance is in the rack based on the BOM configuration. */ + rackSlot: number; + /** The serial number of the appliance. */ + serialNumber: string; + /** The user-provided name for the storage appliance that will be created from this specification. */ + storageApplianceName?: string; +} + +export function storageApplianceConfigurationDataSerializer( + item: StorageApplianceConfigurationData, +): any { + return { + adminCredentials: administrativeCredentialsSerializer(item["adminCredentials"]), + rackSlot: item["rackSlot"], + serialNumber: item["serialNumber"], + storageApplianceName: item["storageApplianceName"], + }; +} + +export function storageApplianceConfigurationDataDeserializer( + item: any, +): StorageApplianceConfigurationData { + return { + adminCredentials: administrativeCredentialsDeserializer(item["adminCredentials"]), + rackSlot: item["rackSlot"], + serialNumber: item["serialNumber"], + storageApplianceName: item["storageApplianceName"], + }; +} + +/** AnalyticsOutputSettings represents the settings for the log analytics workspace used for output of logs from this cluster. */ +export interface AnalyticsOutputSettings { + /** The resource ID of the analytics workspace that is to be used by the specified identity. */ + analyticsWorkspaceId?: string; + /** The selection of the managed identity to use with this analytics workspace. The identity type must be either system assigned or user assigned. */ + associatedIdentity?: IdentitySelector; +} + +export function analyticsOutputSettingsSerializer(item: AnalyticsOutputSettings): any { + return { + analyticsWorkspaceId: item["analyticsWorkspaceId"], + associatedIdentity: !item["associatedIdentity"] + ? item["associatedIdentity"] + : identitySelectorSerializer(item["associatedIdentity"]), + }; +} + +export function analyticsOutputSettingsDeserializer(item: any): AnalyticsOutputSettings { + return { + analyticsWorkspaceId: item["analyticsWorkspaceId"], + associatedIdentity: !item["associatedIdentity"] + ? item["associatedIdentity"] + : identitySelectorDeserializer(item["associatedIdentity"]), + }; +} + +/** IdentitySelector represents the selection of a managed identity for use. */ +export interface IdentitySelector { + /** The type of managed identity that is being selected. */ + identityType?: ManagedServiceIdentitySelectorType; + /** The user assigned managed identity resource ID to use. Mutually exclusive with a system assigned identity type. */ + userAssignedIdentityResourceId?: string; +} + +export function identitySelectorSerializer(item: IdentitySelector): any { + return { + identityType: item["identityType"], + userAssignedIdentityResourceId: item["userAssignedIdentityResourceId"], + }; +} + +export function identitySelectorDeserializer(item: any): IdentitySelector { + return { + identityType: item["identityType"], + userAssignedIdentityResourceId: item["userAssignedIdentityResourceId"], + }; +} + +/** The type of managed identity that is being selected. */ +export enum KnownManagedServiceIdentitySelectorType { + /** System assigned identity selection. */ + SystemAssignedIdentity = "SystemAssignedIdentity", + /** User assigned identity selection. */ + UserAssignedIdentity = "UserAssignedIdentity", +} + +/** + * The type of managed identity that is being selected. \ + * {@link KnownManagedServiceIdentitySelectorType} can be used interchangeably with ManagedServiceIdentitySelectorType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SystemAssignedIdentity**: System assigned identity selection. \ + * **UserAssignedIdentity**: User assigned identity selection. + */ +export type ManagedServiceIdentitySelectorType = string; + +/** ServicePrincipalInformation represents the details of the service principal to be used by the cluster during Arc Appliance installation. */ +export interface ServicePrincipalInformation { + /** The application ID, also known as client ID, of the service principal. */ + applicationId: string; + /** The password of the service principal. */ + password: string; + /** The principal ID, also known as the object ID, of the service principal. */ + principalId: string; + /** The tenant ID, also known as the directory ID, of the tenant in which the service principal is created. */ + tenantId: string; +} + +export function servicePrincipalInformationSerializer(item: ServicePrincipalInformation): any { + return { + applicationId: item["applicationId"], + password: item["password"], + principalId: item["principalId"], + tenantId: item["tenantId"], + }; +} + +export function servicePrincipalInformationDeserializer(item: any): ServicePrincipalInformation { + return { + applicationId: item["applicationId"], + password: item["password"], + principalId: item["principalId"], + tenantId: item["tenantId"], + }; +} + +/** The type of rack configuration for the cluster. */ +export enum KnownClusterType { + /** Single rack configuration. */ + SingleRack = "SingleRack", + /** Multi-rack configuration. */ + MultiRack = "MultiRack", +} + +/** + * The type of rack configuration for the cluster. \ + * {@link KnownClusterType} can be used interchangeably with ClusterType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SingleRack**: Single rack configuration. \ + * **MultiRack**: Multi-rack configuration. + */ +export type ClusterType = string; + +/** CommandOutputSettings represents the settings for commands run within the cluster such as bare metal machine run read-only commands. */ +export interface CommandOutputSettings { + /** The selection of the managed identity to use with this storage account container. The identity type must be either system assigned or user assigned. */ + associatedIdentity?: IdentitySelector; + /** The URL of the storage account container that is to be used by the specified identities. */ + containerUrl?: string; + /** The list of optional overrides allowing for association of storage containers and identities to specific types of command output. If a type is not overridden, the default identity and storage container will be utilized. */ + overrides?: CommandOutputOverride[]; +} + +export function commandOutputSettingsSerializer(item: CommandOutputSettings): any { + return { + associatedIdentity: !item["associatedIdentity"] + ? item["associatedIdentity"] + : identitySelectorSerializer(item["associatedIdentity"]), + containerUrl: item["containerUrl"], + overrides: !item["overrides"] + ? item["overrides"] + : commandOutputOverrideArraySerializer(item["overrides"]), + }; +} + +export function commandOutputSettingsDeserializer(item: any): CommandOutputSettings { + return { + associatedIdentity: !item["associatedIdentity"] + ? item["associatedIdentity"] + : identitySelectorDeserializer(item["associatedIdentity"]), + containerUrl: item["containerUrl"], + overrides: !item["overrides"] + ? item["overrides"] + : commandOutputOverrideArrayDeserializer(item["overrides"]), + }; +} + +export function commandOutputOverrideArraySerializer(result: Array): any[] { + return result.map((item) => { + return commandOutputOverrideSerializer(item); + }); +} + +export function commandOutputOverrideArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return commandOutputOverrideDeserializer(item); + }); +} + +/** CommandOutputOverride represents an overridden value for the command output settings. */ +export interface CommandOutputOverride { + /** The selection of the managed identity to use with this storage account container. The identity type must be either system assigned or user assigned. */ + associatedIdentity?: IdentitySelector; + /** The type of command output for the override. */ + commandOutputType?: CommandOutputType; + /** The URL of the storage account container that is to be used by the specified identities. */ + containerUrl?: string; +} + +export function commandOutputOverrideSerializer(item: CommandOutputOverride): any { + return { + associatedIdentity: !item["associatedIdentity"] + ? item["associatedIdentity"] + : identitySelectorSerializer(item["associatedIdentity"]), + commandOutputType: item["commandOutputType"], + containerUrl: item["containerUrl"], + }; +} + +export function commandOutputOverrideDeserializer(item: any): CommandOutputOverride { + return { + associatedIdentity: !item["associatedIdentity"] + ? item["associatedIdentity"] + : identitySelectorDeserializer(item["associatedIdentity"]), + commandOutputType: item["commandOutputType"], + containerUrl: item["containerUrl"], + }; +} + +/** The type of command output for the override. */ +export enum KnownCommandOutputType { + /** BareMetalMachineRunCommand output type */ + BareMetalMachineRunCommand = "BareMetalMachineRunCommand", + /** BareMetalMachineRunDataExtracts output type */ + BareMetalMachineRunDataExtracts = "BareMetalMachineRunDataExtracts", + /** BareMetalMachineRunReadCommands output type */ + BareMetalMachineRunReadCommands = "BareMetalMachineRunReadCommands", + /** ClusterSupportAdministrativeActions output type supporting administrative actions that can be run on a cluster for support purposes. */ + ClusterSupportAdministrativeActions = "ClusterSupportAdministrativeActions", + /** StorageRunReadCommands output type */ + StorageRunReadCommands = "StorageRunReadCommands", + /** BareMetalMachineRunDataExtractsRestricted output type */ + BareMetalMachineRunDataExtractsRestricted = "BareMetalMachineRunDataExtractsRestricted", +} + +/** + * The type of command output for the override. \ + * {@link KnownCommandOutputType} can be used interchangeably with CommandOutputType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **BareMetalMachineRunCommand**: BareMetalMachineRunCommand output type \ + * **BareMetalMachineRunDataExtracts**: BareMetalMachineRunDataExtracts output type \ + * **BareMetalMachineRunReadCommands**: BareMetalMachineRunReadCommands output type \ + * **ClusterSupportAdministrativeActions**: ClusterSupportAdministrativeActions output type supporting administrative actions that can be run on a cluster for support purposes. \ + * **StorageRunReadCommands**: StorageRunReadCommands output type \ + * **BareMetalMachineRunDataExtractsRestricted**: BareMetalMachineRunDataExtractsRestricted output type + */ +export type CommandOutputType = string; + +/** ValidationThreshold indicates allowed machine and node hardware and deployment failures. */ +export interface ValidationThreshold { + /** Selection of how the type evaluation is applied to the cluster calculation. */ + grouping: ValidationThresholdGrouping; + /** Selection of how the threshold should be evaluated. */ + type: ValidationThresholdType; + /** The numeric threshold value. */ + value: number; +} + +export function validationThresholdSerializer(item: ValidationThreshold): any { + return { grouping: item["grouping"], type: item["type"], value: item["value"] }; +} + +export function validationThresholdDeserializer(item: any): ValidationThreshold { + return { + grouping: item["grouping"], + type: item["type"], + value: item["value"], + }; +} + +/** Selection of how the type evaluation is applied to the cluster calculation. */ +export enum KnownValidationThresholdGrouping { + /** The threshold is calculated for the whole cluster. */ + PerCluster = "PerCluster", + /** The threshold is calculated for each rack in the cluster. */ + PerRack = "PerRack", +} + +/** + * Selection of how the type evaluation is applied to the cluster calculation. \ + * {@link KnownValidationThresholdGrouping} can be used interchangeably with ValidationThresholdGrouping, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PerCluster**: The threshold is calculated for the whole cluster. \ + * **PerRack**: The threshold is calculated for each rack in the cluster. + */ +export type ValidationThresholdGrouping = string; + +/** Selection of how the threshold should be evaluated. */ +export enum KnownValidationThresholdType { + /** The threshold is evaluated based on the count of successful operations. */ + CountSuccess = "CountSuccess", + /** The threshold is evaluated based on the percentage of successful operations. */ + PercentSuccess = "PercentSuccess", +} + +/** + * Selection of how the threshold should be evaluated. \ + * {@link KnownValidationThresholdType} can be used interchangeably with ValidationThresholdType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CountSuccess**: The threshold is evaluated based on the count of successful operations. \ + * **PercentSuccess**: The threshold is evaluated based on the percentage of successful operations. + */ +export type ValidationThresholdType = string; + +export function rackDefinitionArraySerializer(result: Array): any[] { + return result.map((item) => { + return rackDefinitionSerializer(item); + }); +} + +export function rackDefinitionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return rackDefinitionDeserializer(item); + }); +} + +/** RuntimeProtectionConfiguration represents the runtime protection configuration for the cluster. */ +export interface RuntimeProtectionConfiguration { + /** The definition update mode for runtime protection. */ + definitionUpdateMode?: RuntimeProtectionDefinitionUpdateMode; + /** The mode of operation for runtime protection. */ + enforcementLevel?: RuntimeProtectionEnforcementLevel; +} + +export function runtimeProtectionConfigurationSerializer( + item: RuntimeProtectionConfiguration, +): any { + return { + definitionUpdateMode: item["definitionUpdateMode"], + enforcementLevel: item["enforcementLevel"], + }; +} + +export function runtimeProtectionConfigurationDeserializer( + item: any, +): RuntimeProtectionConfiguration { + return { + definitionUpdateMode: item["definitionUpdateMode"], + enforcementLevel: item["enforcementLevel"], + }; +} + +/** ClusterSecretArchive configures the key vault to archive the secrets of the cluster for later retrieval. */ +export interface ClusterSecretArchive { + /** The resource ID of the key vault to archive the secrets of the cluster. */ + keyVaultId: string; + /** The indicator if the specified key vault should be used to archive the secrets of the cluster. */ + useKeyVault?: ClusterSecretArchiveEnabled; +} + +export function clusterSecretArchiveSerializer(item: ClusterSecretArchive): any { + return { keyVaultId: item["keyVaultId"], useKeyVault: item["useKeyVault"] }; +} + +export function clusterSecretArchiveDeserializer(item: any): ClusterSecretArchive { + return { + keyVaultId: item["keyVaultId"], + useKeyVault: item["useKeyVault"], + }; +} + +/** The indicator if the specified key vault should be used to archive the secrets of the cluster. */ +export enum KnownClusterSecretArchiveEnabled { + /** Enable the cluster secret archive with the specified key vault. */ + True = "True", + /** Disable use of the cluster secret archive even if a key vault is specified. */ + False = "False", +} + +/** + * The indicator if the specified key vault should be used to archive the secrets of the cluster. \ + * {@link KnownClusterSecretArchiveEnabled} can be used interchangeably with ClusterSecretArchiveEnabled, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: Enable the cluster secret archive with the specified key vault. \ + * **False**: Disable use of the cluster secret archive even if a key vault is specified. + */ +export type ClusterSecretArchiveEnabled = string; + +/** SecretArchiveSettings represents the settings for the secret archive used to hold credentials for the cluster. */ +export interface SecretArchiveSettings { + /** The selection of the managed identity to use with this vault URI. The identity type must be either system assigned or user assigned. */ + associatedIdentity?: IdentitySelector; + /** The URI for the key vault used as the secret archive. */ + vaultUri?: string; +} + +export function secretArchiveSettingsSerializer(item: SecretArchiveSettings): any { + return { + associatedIdentity: !item["associatedIdentity"] + ? item["associatedIdentity"] + : identitySelectorSerializer(item["associatedIdentity"]), + vaultUri: item["vaultUri"], + }; +} + +export function secretArchiveSettingsDeserializer(item: any): SecretArchiveSettings { + return { + associatedIdentity: !item["associatedIdentity"] + ? item["associatedIdentity"] + : identitySelectorDeserializer(item["associatedIdentity"]), + vaultUri: item["vaultUri"], + }; +} + +/** ClusterUpdateStrategy represents the strategy for updating the cluster. */ +export interface 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. */ + maxUnavailable?: number; + /** The mode of operation for runtime protection. */ + strategyType: ClusterUpdateStrategyType; + /** Selection of how the threshold should be evaluated. */ + thresholdType: ValidationThresholdType; + /** The numeric threshold value. */ + thresholdValue: number; + /** The time to wait between the increments of update defined by the strategy. */ + waitTimeMinutes?: number; +} + +export function clusterUpdateStrategySerializer(item: ClusterUpdateStrategy): any { + return { + maxUnavailable: item["maxUnavailable"], + strategyType: item["strategyType"], + thresholdType: item["thresholdType"], + thresholdValue: item["thresholdValue"], + waitTimeMinutes: item["waitTimeMinutes"], + }; +} + +export function clusterUpdateStrategyDeserializer(item: any): ClusterUpdateStrategy { + return { + maxUnavailable: item["maxUnavailable"], + strategyType: item["strategyType"], + thresholdType: item["thresholdType"], + thresholdValue: item["thresholdValue"], + waitTimeMinutes: item["waitTimeMinutes"], + }; +} + +/** The mode of operation for runtime protection. */ +export enum KnownClusterUpdateStrategyType { + /** Update the cluster in rack-by-rack increments. */ + Rack = "Rack", + /** Pause after each rack is updated. */ + PauseAfterRack = "PauseAfterRack", +} + +/** + * The mode of operation for runtime protection. \ + * {@link KnownClusterUpdateStrategyType} can be used interchangeably with ClusterUpdateStrategyType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Rack**: Update the cluster in rack-by-rack increments. \ + * **PauseAfterRack**: Pause after each rack is updated. + */ +export type ClusterUpdateStrategyType = string; + +/** VulnerabilityScanningSettings represents the settings for how security vulnerability scanning is applied to the cluster. */ +export interface VulnerabilityScanningSettings { + /** The mode selection for container vulnerability scanning. */ + containerScan?: VulnerabilityScanningSettingsContainerScan; +} + +export function vulnerabilityScanningSettingsSerializer(item: VulnerabilityScanningSettings): any { + return { containerScan: item["containerScan"] }; +} + +export function vulnerabilityScanningSettingsDeserializer( + item: any, +): VulnerabilityScanningSettings { + return { + containerScan: item["containerScan"], + }; +} + +/** The mode selection for container vulnerability scanning. */ +export enum KnownVulnerabilityScanningSettingsContainerScan { + /** Disable container vulnerability scanning for the cluster. */ + Disabled = "Disabled", + /** Enable container vulnerability scanning for the cluster. */ + Enabled = "Enabled", +} + +/** + * The mode selection for container vulnerability scanning. \ + * {@link KnownVulnerabilityScanningSettingsContainerScan} can be used interchangeably with VulnerabilityScanningSettingsContainerScan, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled**: Disable container vulnerability scanning for the cluster. \ + * **Enabled**: Enable container vulnerability scanning for the cluster. + */ +export type VulnerabilityScanningSettingsContainerScan = string; + +export function clusterAvailableUpgradeVersionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return clusterAvailableUpgradeVersionDeserializer(item); + }); +} + +/** ClusterAvailableUpgradeVersion represents the various cluster upgrade parameters. */ +export interface ClusterAvailableUpgradeVersion { + /** The indicator of whether the control plane will be impacted during the upgrade. */ + readonly controlImpact?: ControlImpact; + /** The expected duration needed for this upgrade. */ + readonly expectedDuration?: string; + /** The impact description including the specific details and release notes. */ + readonly impactDescription?: string; + /** The last date the version of the platform is supported. */ + readonly supportExpiryDate?: string; + /** The target version this cluster will be upgraded to. */ + readonly targetClusterVersion?: string; + /** The indicator of whether the workload will be impacted during the upgrade. */ + readonly workloadImpact?: WorkloadImpact; +} + +export function clusterAvailableUpgradeVersionDeserializer( + item: any, +): ClusterAvailableUpgradeVersion { + return { + controlImpact: item["controlImpact"], + expectedDuration: item["expectedDuration"], + impactDescription: item["impactDescription"], + supportExpiryDate: item["supportExpiryDate"], + targetClusterVersion: item["targetClusterVersion"], + workloadImpact: item["workloadImpact"], + }; +} + +/** The indicator of whether the control plane will be impacted during the upgrade. */ +export enum KnownControlImpact { + /** The control plane will be impacted during the upgrade. */ + True = "True", + /** The control plane will not be impacted during the upgrade. */ + False = "False", +} + +/** + * The indicator of whether the control plane will be impacted during the upgrade. \ + * {@link KnownControlImpact} can be used interchangeably with ControlImpact, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: The control plane will be impacted during the upgrade. \ + * **False**: The control plane will not be impacted during the upgrade. + */ +export type ControlImpact = string; + +/** The indicator of whether the workload will be impacted during the upgrade. */ +export enum KnownWorkloadImpact { + /** The workload will be impacted during the upgrade. */ + True = "True", + /** The workload will not be impacted during the upgrade. */ + False = "False", +} + +/** + * The indicator of whether the workload will be impacted during the upgrade. \ + * {@link KnownWorkloadImpact} can be used interchangeably with WorkloadImpact, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: The workload will be impacted during the upgrade. \ + * **False**: The workload will not be impacted during the upgrade. + */ +export type WorkloadImpact = string; + +/** ClusterCapacity represents various details regarding compute capacity. */ +export interface ClusterCapacity { + /** The remaining appliance-based storage in GB available for workload use. Measured in gibibytes. */ + availableApplianceStorageGB?: number; + /** The remaining number of cores that are available in this cluster for workload use. */ + availableCoreCount?: number; + /** The remaining machine or host-based storage in GB available for workload use. Measured in gibibytes. */ + availableHostStorageGB?: number; + /** The remaining memory in GB that are available in this cluster for workload use. Measured in gibibytes. */ + availableMemoryGB?: number; + /** The total appliance-based storage in GB supported by this cluster for workload use. Measured in gibibytes. */ + totalApplianceStorageGB?: number; + /** The total number of cores that are supported by this cluster for workload use. */ + totalCoreCount?: number; + /** The total machine or host-based storage in GB supported by this cluster for workload use. Measured in gibibytes. */ + totalHostStorageGB?: number; + /** The total memory supported by this cluster for workload use. Measured in gibibytes. */ + totalMemoryGB?: number; +} + +export function clusterCapacityDeserializer(item: any): ClusterCapacity { + return { + availableApplianceStorageGB: item["availableApplianceStorageGB"], + availableCoreCount: item["availableCoreCount"], + availableHostStorageGB: item["availableHostStorageGB"], + availableMemoryGB: item["availableMemoryGB"], + totalApplianceStorageGB: item["totalApplianceStorageGB"], + totalCoreCount: item["totalCoreCount"], + totalHostStorageGB: item["totalHostStorageGB"], + totalMemoryGB: item["totalMemoryGB"], + }; +} + +/** The latest heartbeat status between the cluster manager and the cluster. */ +export enum KnownClusterConnectionStatus { + /** The latest heartbeat status is healthy. */ + Connected = "Connected", + /** The latest heartbeat status is unhealthy. */ + Disconnected = "Disconnected", + /** Too many of the latest heartbeats were missed. */ + Timeout = "Timeout", + /** Could not determine the latest heartbeat status. */ + Undefined = "Undefined", +} + +/** + * The latest heartbeat status between the cluster manager and the cluster. \ + * {@link KnownClusterConnectionStatus} can be used interchangeably with ClusterConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Connected**: The latest heartbeat status is healthy. \ + * **Disconnected**: The latest heartbeat status is unhealthy. \ + * **Timeout**: Too many of the latest heartbeats were missed. \ + * **Undefined**: Could not determine the latest heartbeat status. + */ +export type ClusterConnectionStatus = string; + +/** The latest connectivity status between cluster manager and the cluster. */ +export enum KnownClusterManagerConnectionStatus { + /** The latest connectivity status is healthy. */ + Connected = "Connected", + /** Connectivity could not be established. */ + Unreachable = "Unreachable", +} + +/** + * The latest connectivity status between cluster manager and the cluster. \ + * {@link KnownClusterManagerConnectionStatus} can be used interchangeably with ClusterManagerConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Connected**: The latest connectivity status is healthy. \ + * **Unreachable**: Connectivity could not be established. + */ +export type ClusterManagerConnectionStatus = string; + +/** The current detailed status of the cluster. */ +export enum KnownClusterDetailedStatus { + /** The PendingDeployment status. */ + PendingDeployment = "PendingDeployment", + /** The Deploying status. */ + Deploying = "Deploying", + /** The Running status. */ + Running = "Running", + /** The Updating status. */ + Updating = "Updating", + /** The UpdatePaused status. */ + UpdatePaused = "UpdatePaused", + /** The Degraded status. */ + Degraded = "Degraded", + /** The Deleting status. */ + Deleting = "Deleting", + /** The Disconnected status. */ + Disconnected = "Disconnected", + /** The Failed status. */ + Failed = "Failed", +} + +/** + * The current detailed status of the cluster. \ + * {@link KnownClusterDetailedStatus} can be used interchangeably with ClusterDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PendingDeployment**: The PendingDeployment status. \ + * **Deploying**: The Deploying status. \ + * **Running**: The Running status. \ + * **Updating**: The Updating status. \ + * **UpdatePaused**: The UpdatePaused status. \ + * **Degraded**: The Degraded status. \ + * **Deleting**: The Deleting status. \ + * **Disconnected**: The Disconnected status. \ + * **Failed**: The Failed status. + */ +export type ClusterDetailedStatus = string; + +/** The provisioning state of the cluster. */ +export enum KnownClusterProvisioningState { + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Failed status. */ + Failed = "Failed", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Accepted status. */ + Accepted = "Accepted", + /** The Validating status. */ + Validating = "Validating", + /** The Updating status. */ + Updating = "Updating", +} + +/** + * The provisioning state of the cluster. \ + * {@link KnownClusterProvisioningState} can be used interchangeably with ClusterProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The Succeeded status. \ + * **Failed**: The Failed status. \ + * **Canceled**: The Canceled status. \ + * **Accepted**: The Accepted status. \ + * **Validating**: The Validating status. \ + * **Updating**: The Updating status. + */ +export type ClusterProvisioningState = string; + +/** ClusterPatchParameters represents the body of the request to patch the cluster properties. */ +export interface ClusterPatchParameters { + /** The identity for the resource. */ + identity?: ManagedServiceIdentity; + /** Resource tags. */ + tags?: Record; + /** 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. */ + aggregatorOrSingleRackDefinition?: RackDefinition; + /** The settings for the log analytics workspace used for output of logs from this cluster. */ + analyticsOutputSettings?: AnalyticsOutputSettings; + /** The customer-provided location information to identify where the cluster resides. */ + clusterLocation?: string; + /** Field Deprecated: Use managed identity to provide cluster privileges. The service principal to be used by the cluster during Arc Appliance installation. */ + clusterServicePrincipal?: ServicePrincipalInformation; + /** The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. */ + commandOutputSettings?: CommandOutputSettings; + /** The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. */ + computeDeploymentThreshold?: ValidationThreshold; + /** The list of rack definitions for the compute racks in a multi-rack cluster, or an empty list in a single-rack cluster. */ + computeRackDefinitions?: RackDefinition[]; + /** The settings for cluster runtime protection. */ + runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; + /** The configuration for use of a key vault to store secrets for later retrieval by the operator. */ + secretArchive?: ClusterSecretArchive; + /** The settings for the secret archive used to hold credentials for the cluster. */ + secretArchiveSettings?: SecretArchiveSettings; + /** The strategy for updating the cluster. */ + updateStrategy?: ClusterUpdateStrategy; + /** The settings for how security vulnerability scanning is applied to the cluster. */ + vulnerabilityScanningSettings?: VulnerabilityScanningSettingsPatch; +} + +export function clusterPatchParametersSerializer(item: ClusterPatchParameters): any { + return { + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentitySerializer(item["identity"]), + properties: areAllPropsUndefined(item, [ + "aggregatorOrSingleRackDefinition", + "analyticsOutputSettings", + "clusterLocation", + "clusterServicePrincipal", + "commandOutputSettings", + "computeDeploymentThreshold", + "computeRackDefinitions", + "runtimeProtectionConfiguration", + "secretArchive", + "secretArchiveSettings", + "updateStrategy", + "vulnerabilityScanningSettings", + ]) + ? undefined + : _clusterPatchParametersPropertiesSerializer(item), + tags: item["tags"], + }; +} + +/** ClusterPatchProperties represents the properties of the cluster for patching. */ +export interface ClusterPatchProperties { + /** 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. */ + aggregatorOrSingleRackDefinition?: RackDefinition; + /** The settings for the log analytics workspace used for output of logs from this cluster. */ + analyticsOutputSettings?: AnalyticsOutputSettings; + /** The customer-provided location information to identify where the cluster resides. */ + clusterLocation?: string; + /** Field Deprecated: Use managed identity to provide cluster privileges. The service principal to be used by the cluster during Arc Appliance installation. */ + clusterServicePrincipal?: ServicePrincipalInformation; + /** The settings for commands run in this cluster, such as bare metal machine run read only commands and data extracts. */ + commandOutputSettings?: CommandOutputSettings; + /** The validation threshold indicating the allowable failures of compute machines during environment validation and deployment. */ + computeDeploymentThreshold?: ValidationThreshold; + /** The list of rack definitions for the compute racks in a multi-rack cluster, or an empty list in a single-rack cluster. */ + computeRackDefinitions?: RackDefinition[]; + /** The settings for cluster runtime protection. */ + runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; + /** The configuration for use of a key vault to store secrets for later retrieval by the operator. */ + secretArchive?: ClusterSecretArchive; + /** The settings for the secret archive used to hold credentials for the cluster. */ + secretArchiveSettings?: SecretArchiveSettings; + /** The strategy for updating the cluster. */ + updateStrategy?: ClusterUpdateStrategy; + /** The settings for how security vulnerability scanning is applied to the cluster. */ + vulnerabilityScanningSettings?: VulnerabilityScanningSettingsPatch; +} + +export function clusterPatchPropertiesSerializer(item: ClusterPatchProperties): any { + return { + aggregatorOrSingleRackDefinition: !item["aggregatorOrSingleRackDefinition"] + ? item["aggregatorOrSingleRackDefinition"] + : rackDefinitionSerializer(item["aggregatorOrSingleRackDefinition"]), + analyticsOutputSettings: !item["analyticsOutputSettings"] + ? item["analyticsOutputSettings"] + : analyticsOutputSettingsSerializer(item["analyticsOutputSettings"]), + clusterLocation: item["clusterLocation"], + clusterServicePrincipal: !item["clusterServicePrincipal"] + ? item["clusterServicePrincipal"] + : servicePrincipalInformationSerializer(item["clusterServicePrincipal"]), + commandOutputSettings: !item["commandOutputSettings"] + ? item["commandOutputSettings"] + : commandOutputSettingsSerializer(item["commandOutputSettings"]), + computeDeploymentThreshold: !item["computeDeploymentThreshold"] + ? item["computeDeploymentThreshold"] + : validationThresholdSerializer(item["computeDeploymentThreshold"]), + computeRackDefinitions: !item["computeRackDefinitions"] + ? item["computeRackDefinitions"] + : rackDefinitionArraySerializer(item["computeRackDefinitions"]), + runtimeProtectionConfiguration: !item["runtimeProtectionConfiguration"] + ? item["runtimeProtectionConfiguration"] + : runtimeProtectionConfigurationSerializer(item["runtimeProtectionConfiguration"]), + secretArchive: !item["secretArchive"] + ? item["secretArchive"] + : clusterSecretArchiveSerializer(item["secretArchive"]), + secretArchiveSettings: !item["secretArchiveSettings"] + ? item["secretArchiveSettings"] + : secretArchiveSettingsSerializer(item["secretArchiveSettings"]), + updateStrategy: !item["updateStrategy"] + ? item["updateStrategy"] + : clusterUpdateStrategySerializer(item["updateStrategy"]), + vulnerabilityScanningSettings: !item["vulnerabilityScanningSettings"] + ? item["vulnerabilityScanningSettings"] + : vulnerabilityScanningSettingsPatchSerializer(item["vulnerabilityScanningSettings"]), + }; +} + +/** VulnerabilityScanningSettingsPatch represents the settings for how security vulnerability scanning is applied to the cluster. */ +export interface VulnerabilityScanningSettingsPatch { + /** The mode selection for container vulnerability scanning. */ + containerScan?: VulnerabilityScanningSettingsContainerScan; +} + +export function vulnerabilityScanningSettingsPatchSerializer( + item: VulnerabilityScanningSettingsPatch, +): any { + return { containerScan: item["containerScan"] }; +} + +/** ClusterList represents a list of clusters. */ +export interface _ClusterList { + /** The Cluster items on this page */ + value: Cluster[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _clusterListDeserializer(item: any): _ClusterList { + return { + value: clusterArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function clusterArraySerializer(result: Array): any[] { + return result.map((item) => { + return clusterSerializer(item); + }); +} + +export function clusterArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return clusterDeserializer(item); + }); +} + +/** ClusterContinueUpdateVersionParameters represents the body of the request to continue the update of a cluster version. */ +export interface ClusterContinueUpdateVersionParameters { + /** The mode by which the cluster will target the next grouping of servers to continue the update. */ + machineGroupTargetingMode?: ClusterContinueUpdateVersionMachineGroupTargetingMode; + /** Specifies how safeguards are applied during the continue update version operation. Use All to run all pre‑operation validation checks. Use None to bypass safeguards. If not specified, the default is All. */ + safeguardMode?: ClusterContinueUpdateVersionSafeguardMode; +} + +export function clusterContinueUpdateVersionParametersSerializer( + item: ClusterContinueUpdateVersionParameters, +): any { + return { + machineGroupTargetingMode: item["machineGroupTargetingMode"], + safeguardMode: item["safeguardMode"], + }; +} + +/** The mode by which the cluster will target the next grouping of servers to continue the update. */ +export enum KnownClusterContinueUpdateVersionMachineGroupTargetingMode { + /** Racks will be targeted for update in alphabetical order based on the rack name. */ + AlphaByRack = "AlphaByRack", +} + +/** + * The mode by which the cluster will target the next grouping of servers to continue the update. \ + * {@link KnownClusterContinueUpdateVersionMachineGroupTargetingMode} can be used interchangeably with ClusterContinueUpdateVersionMachineGroupTargetingMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AlphaByRack**: Racks will be targeted for update in alphabetical order based on the rack name. + */ +export type ClusterContinueUpdateVersionMachineGroupTargetingMode = string; + +/** ClusterContinueUpdateVersionSafeguardMode represents the mode of the cluster continue update safeguards. */ +export enum KnownClusterContinueUpdateVersionSafeguardMode { + /** Run all pre‑operation validation checks before continuing the version update. If any check fails, the request is rejected and no changes are made. */ + All = "All", + /** Skip all safeguards and continue the version update without running pre‑operation validation checks. */ + None = "None", +} + +/** + * ClusterContinueUpdateVersionSafeguardMode represents the mode of the cluster continue update safeguards. \ + * {@link KnownClusterContinueUpdateVersionSafeguardMode} can be used interchangeably with ClusterContinueUpdateVersionSafeguardMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **All**: Run all pre‑operation validation checks before continuing the version update. If any check fails, the request is rejected and no changes are made. \ + * **None**: Skip all safeguards and continue the version update without running pre‑operation validation checks. + */ +export type ClusterContinueUpdateVersionSafeguardMode = string; + +/** ClusterDeployParameters represents the body of the request to deploy cluster. */ +export interface ClusterDeployParameters { + /** The names of bare metal machines in the cluster that should be skipped during environment validation. */ + skipValidationsForMachines?: string[]; +} + +export function clusterDeployParametersSerializer(item: ClusterDeployParameters): any { + return { + skipValidationsForMachines: !item["skipValidationsForMachines"] + ? item["skipValidationsForMachines"] + : item["skipValidationsForMachines"].map((p: any) => { + return p; + }), + }; +} + +/** ClusterInspectParameters represents the body of the request to inspect the cluster. */ +export interface ClusterInspectParameters { + /** Additional actions supplement the default non-disruptive cluster inspection. Additional actions may be disallowed if the cluster is in a deployed and running state. */ + additionalActions?: ClusterInspectAdditionalAction[]; + /** Indicates which devices are included in the inspection. By default, all devices that can be targeted will be included in the inspection. */ + filterDevices?: FilterDevices; +} + +export function clusterInspectParametersSerializer(item: ClusterInspectParameters): any { + return { + additionalActions: !item["additionalActions"] + ? item["additionalActions"] + : item["additionalActions"].map((p: any) => { + return p; + }), + filterDevices: !item["filterDevices"] + ? item["filterDevices"] + : filterDevicesSerializer(item["filterDevices"]), + }; +} + +/** Additional actions supplement the default non-disruptive cluster inspection. Additional actions may be disallowed if the cluster is in a deployed and running state. */ +export enum KnownClusterInspectAdditionalAction { + /** Indicates that hardware reset should be performed during inspection. */ + ResetHardware = "ResetHardware", +} + +/** + * Additional actions supplement the default non-disruptive cluster inspection. Additional actions may be disallowed if the cluster is in a deployed and running state. \ + * {@link KnownClusterInspectAdditionalAction} can be used interchangeably with ClusterInspectAdditionalAction, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ResetHardware**: Indicates that hardware reset should be performed during inspection. + */ +export type ClusterInspectAdditionalAction = string; + +/** FilterDevices defines the filtered target of the inspection. */ +export interface FilterDevices { + /** The list of bare metal machine names to include in the inspection. */ + bareMetalMachineNames?: string[]; + /** The list of rack names to include in the inspection. */ + rackNames?: string[]; +} + +export function filterDevicesSerializer(item: FilterDevices): any { + return { + bareMetalMachineNames: !item["bareMetalMachineNames"] + ? item["bareMetalMachineNames"] + : item["bareMetalMachineNames"].map((p: any) => { + return p; + }), + rackNames: !item["rackNames"] + ? item["rackNames"] + : item["rackNames"].map((p: any) => { + return p; + }), + }; +} + +/** ClusterRotateCredentialParameters represents the body of the request to rotate cluster credentials. */ +export interface ClusterRotateCredentialParameters { + /** The list of credential names for the credentials to rotate. */ + credentials: string[]; +} + +export function clusterRotateCredentialParametersSerializer( + item: ClusterRotateCredentialParameters, +): any { + return { + credentials: item["credentials"].map((p: any) => { + return p; + }), + }; +} + +/** ClusterScanRuntimeParameters defines the parameters for the cluster scan runtime operation. */ +export interface ClusterScanRuntimeParameters { + /** The choice of if the scan operation should run the scan. */ + scanActivity?: ClusterScanRuntimeParametersScanActivity; +} + +export function clusterScanRuntimeParametersSerializer(item: ClusterScanRuntimeParameters): any { + return { scanActivity: item["scanActivity"] }; +} + +/** The choice of if the scan operation should run the scan. */ +export enum KnownClusterScanRuntimeParametersScanActivity { + /** Scan the cluster. */ + Scan = "Scan", + /** Do not scan the cluster. */ + Skip = "Skip", +} + +/** + * The choice of if the scan operation should run the scan. \ + * {@link KnownClusterScanRuntimeParametersScanActivity} can be used interchangeably with ClusterScanRuntimeParametersScanActivity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Scan**: Scan the cluster. \ + * **Skip**: Do not scan the cluster. + */ +export type ClusterScanRuntimeParametersScanActivity = string; + +/** ClusterUpdateVersionParameters represents the body of the request to update cluster version. */ +export interface ClusterUpdateVersionParameters { + /** Specifies how safeguards are applied during the update version operation. Use All to run all pre‑operation validation checks. Use None to bypass safeguards. If not specified, the default is All. */ + safeguardMode?: ClusterUpdateVersionSafeguardMode; + /** The version to be applied to the cluster during update. */ + targetClusterVersion: string; +} + +export function clusterUpdateVersionParametersSerializer( + item: ClusterUpdateVersionParameters, +): any { + return { + safeguardMode: item["safeguardMode"], + targetClusterVersion: item["targetClusterVersion"], + }; +} + +/** ClusterUpdateVersionSafeguardMode represents the mode of the cluster update safeguards. */ +export enum KnownClusterUpdateVersionSafeguardMode { + /** Run all pre‑operation validation checks before performing the version update. If any check fails, the request is rejected and no changes are made. */ + All = "All", + /** Skip all safeguards and perform the version update without running pre‑operation validation checks. */ + None = "None", +} + +/** + * ClusterUpdateVersionSafeguardMode represents the mode of the cluster update safeguards. \ + * {@link KnownClusterUpdateVersionSafeguardMode} can be used interchangeably with ClusterUpdateVersionSafeguardMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **All**: Run all pre‑operation validation checks before performing the version update. If any check fails, the request is rejected and no changes are made. \ + * **None**: Skip all safeguards and perform the version update without running pre‑operation validation checks. + */ +export type ClusterUpdateVersionSafeguardMode = string; + +/** KubernetesCluster represents the Kubernetes cluster hosted on Network Cloud. */ +export interface KubernetesCluster extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** The Azure Active Directory Integration properties. */ + aadConfiguration?: AadConfiguration; + /** The administrative credentials that will be applied to the control plane and agent pool nodes that do not specify their own values. */ + administratorConfiguration?: AdministratorConfiguration; + /** The defining characteristics of the control plane for this Kubernetes Cluster. */ + controlPlaneNodeConfiguration: ControlPlaneNodeConfiguration; + /** 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. */ + initialAgentPoolConfigurations: InitialAgentPoolConfiguration[]; + /** The Kubernetes version for this cluster. */ + kubernetesVersion: string; + /** The configuration of the managed resource group associated with the resource. */ + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + /** The configuration of the Kubernetes cluster networking, including the attachment of networks that span the cluster. */ + networkConfiguration: NetworkConfiguration; + /** The full list of network resource IDs that are attached to this cluster, including those attached only to specific agent pools. */ + readonly attachedNetworkIds?: string[]; + /** The list of versions that this Kubernetes cluster can be upgraded to. */ + readonly availableUpgrades?: AvailableUpgrade[]; + /** The resource ID of the Network Cloud cluster. */ + readonly clusterId?: string; + /** The resource ID of the connected cluster set up when this Kubernetes cluster is created. */ + readonly connectedClusterId?: string; + /** The current running version of Kubernetes on the control plane. */ + readonly controlPlaneKubernetesVersion?: string; + /** The current status of the Kubernetes cluster. */ + readonly detailedStatus?: KubernetesClusterDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The current feature settings. */ + readonly featureStatuses?: FeatureStatus[]; + /** The details of the nodes in this cluster. */ + readonly nodes?: KubernetesClusterNode[]; + /** The provisioning state of the Kubernetes cluster resource. */ + readonly provisioningState?: KubernetesClusterProvisioningState; +} + +export function kubernetesClusterSerializer(item: KubernetesCluster): any { + return { + tags: item["tags"], + location: item["location"], + properties: _kubernetesClusterPropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function kubernetesClusterDeserializer(item: any): KubernetesCluster { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._kubernetesClusterPropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** KubernetesClusterProperties represents the properties of Kubernetes cluster resource. */ +export interface KubernetesClusterProperties { + /** The Azure Active Directory Integration properties. */ + aadConfiguration?: AadConfiguration; + /** The administrative credentials that will be applied to the control plane and agent pool nodes that do not specify their own values. */ + administratorConfiguration?: AdministratorConfiguration; + /** The defining characteristics of the control plane for this Kubernetes Cluster. */ + controlPlaneNodeConfiguration: ControlPlaneNodeConfiguration; + /** 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. */ + initialAgentPoolConfigurations: InitialAgentPoolConfiguration[]; + /** The Kubernetes version for this cluster. */ + kubernetesVersion: string; + /** The configuration of the managed resource group associated with the resource. */ + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + /** The configuration of the Kubernetes cluster networking, including the attachment of networks that span the cluster. */ + networkConfiguration: NetworkConfiguration; + /** The full list of network resource IDs that are attached to this cluster, including those attached only to specific agent pools. */ + readonly attachedNetworkIds?: string[]; + /** The list of versions that this Kubernetes cluster can be upgraded to. */ + readonly availableUpgrades?: AvailableUpgrade[]; + /** The resource ID of the Network Cloud cluster. */ + readonly clusterId?: string; + /** The resource ID of the connected cluster set up when this Kubernetes cluster is created. */ + readonly connectedClusterId?: string; + /** The current running version of Kubernetes on the control plane. */ + readonly controlPlaneKubernetesVersion?: string; + /** The current status of the Kubernetes cluster. */ + readonly detailedStatus?: KubernetesClusterDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The current feature settings. */ + readonly featureStatuses?: FeatureStatus[]; + /** The details of the nodes in this cluster. */ + readonly nodes?: KubernetesClusterNode[]; + /** The provisioning state of the Kubernetes cluster resource. */ + readonly provisioningState?: KubernetesClusterProvisioningState; +} + +export function kubernetesClusterPropertiesSerializer(item: KubernetesClusterProperties): any { + return { + aadConfiguration: !item["aadConfiguration"] + ? item["aadConfiguration"] + : aadConfigurationSerializer(item["aadConfiguration"]), + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationSerializer(item["administratorConfiguration"]), + controlPlaneNodeConfiguration: controlPlaneNodeConfigurationSerializer( + item["controlPlaneNodeConfiguration"], + ), + initialAgentPoolConfigurations: initialAgentPoolConfigurationArraySerializer( + item["initialAgentPoolConfigurations"], + ), + kubernetesVersion: item["kubernetesVersion"], + managedResourceGroupConfiguration: !item["managedResourceGroupConfiguration"] + ? item["managedResourceGroupConfiguration"] + : managedResourceGroupConfigurationSerializer(item["managedResourceGroupConfiguration"]), + networkConfiguration: networkConfigurationSerializer(item["networkConfiguration"]), + }; +} + +export function kubernetesClusterPropertiesDeserializer(item: any): KubernetesClusterProperties { + return { + aadConfiguration: !item["aadConfiguration"] + ? item["aadConfiguration"] + : aadConfigurationDeserializer(item["aadConfiguration"]), + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationDeserializer(item["administratorConfiguration"]), + controlPlaneNodeConfiguration: controlPlaneNodeConfigurationDeserializer( + item["controlPlaneNodeConfiguration"], + ), + initialAgentPoolConfigurations: initialAgentPoolConfigurationArrayDeserializer( + item["initialAgentPoolConfigurations"], + ), + kubernetesVersion: item["kubernetesVersion"], + managedResourceGroupConfiguration: !item["managedResourceGroupConfiguration"] + ? item["managedResourceGroupConfiguration"] + : managedResourceGroupConfigurationDeserializer(item["managedResourceGroupConfiguration"]), + networkConfiguration: networkConfigurationDeserializer(item["networkConfiguration"]), + attachedNetworkIds: !item["attachedNetworkIds"] + ? item["attachedNetworkIds"] + : item["attachedNetworkIds"].map((p: any) => { + return p; + }), + availableUpgrades: !item["availableUpgrades"] + ? item["availableUpgrades"] + : availableUpgradeArrayDeserializer(item["availableUpgrades"]), + clusterId: item["clusterId"], + connectedClusterId: item["connectedClusterId"], + controlPlaneKubernetesVersion: item["controlPlaneKubernetesVersion"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + featureStatuses: !item["featureStatuses"] + ? item["featureStatuses"] + : featureStatusArrayDeserializer(item["featureStatuses"]), + nodes: !item["nodes"] ? item["nodes"] : kubernetesClusterNodeArrayDeserializer(item["nodes"]), + provisioningState: item["provisioningState"], + }; +} + +/** AadConfiguration represents the Azure Active Directory Integration properties. */ +export interface AadConfiguration { + /** The list of Azure Active Directory group object IDs that will have an administrative role on the Kubernetes cluster. */ + adminGroupObjectIds: string[]; +} + +export function aadConfigurationSerializer(item: AadConfiguration): any { + return { + adminGroupObjectIds: item["adminGroupObjectIds"].map((p: any) => { + return p; + }), + }; +} + +export function aadConfigurationDeserializer(item: any): AadConfiguration { + return { + adminGroupObjectIds: item["adminGroupObjectIds"].map((p: any) => { + return p; + }), + }; +} + +/** AdministratorConfiguration represents the administrative credentials that will be applied to the control plane and agent pool nodes in Kubernetes clusters. */ +export interface AdministratorConfiguration { + /** The user name for the administrator that will be applied to the operating systems that run Kubernetes nodes. If not supplied, a user name will be chosen by the service. */ + adminUsername?: string; + /** The SSH configuration for the operating systems that run the nodes in the Kubernetes cluster. In some cases, specification of public keys may be required to produce a working environment. */ + sshPublicKeys?: SshPublicKey[]; +} + +export function administratorConfigurationSerializer(item: AdministratorConfiguration): any { + return { + adminUsername: item["adminUsername"], + sshPublicKeys: !item["sshPublicKeys"] + ? item["sshPublicKeys"] + : sshPublicKeyArraySerializer(item["sshPublicKeys"]), + }; +} + +export function administratorConfigurationDeserializer(item: any): AdministratorConfiguration { + return { + adminUsername: item["adminUsername"], + sshPublicKeys: !item["sshPublicKeys"] + ? item["sshPublicKeys"] + : sshPublicKeyArrayDeserializer(item["sshPublicKeys"]), + }; +} + +export function sshPublicKeyArraySerializer(result: Array): any[] { + return result.map((item) => { + return sshPublicKeySerializer(item); + }); +} + +export function sshPublicKeyArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return sshPublicKeyDeserializer(item); + }); +} + +/** SshPublicKey represents the public key used to authenticate with a resource through SSH. */ +export interface SshPublicKey { + /** The SSH public key data. */ + keyData: string; +} + +export function sshPublicKeySerializer(item: SshPublicKey): any { + return { keyData: item["keyData"] }; +} + +export function sshPublicKeyDeserializer(item: any): SshPublicKey { + return { + keyData: item["keyData"], + }; +} + +/** ControlPlaneNodeConfiguration represents the selection of virtual machines and size of the control plane for a Kubernetes cluster. */ +export interface ControlPlaneNodeConfiguration { + /** The administrator credentials to be used for the nodes in the control plane. */ + administratorConfiguration?: AdministratorConfiguration; + /** The list of availability zones of the Network Cloud cluster to be used for the provisioning of nodes in the control plane. If not specified, all availability zones will be used. */ + availabilityZones?: string[]; + /** The number of virtual machines that use this configuration. */ + count: number; + /** The name of the VM SKU supplied during creation. */ + vmSkuName: string; +} + +export function controlPlaneNodeConfigurationSerializer(item: ControlPlaneNodeConfiguration): any { + return { + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationSerializer(item["administratorConfiguration"]), + availabilityZones: !item["availabilityZones"] + ? item["availabilityZones"] + : item["availabilityZones"].map((p: any) => { + return p; + }), + count: item["count"], + vmSkuName: item["vmSkuName"], + }; +} + +export function controlPlaneNodeConfigurationDeserializer( + item: any, +): ControlPlaneNodeConfiguration { + return { + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationDeserializer(item["administratorConfiguration"]), + availabilityZones: !item["availabilityZones"] + ? item["availabilityZones"] + : item["availabilityZones"].map((p: any) => { + return p; + }), + count: item["count"], + vmSkuName: item["vmSkuName"], + }; +} + +export function initialAgentPoolConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return initialAgentPoolConfigurationSerializer(item); + }); +} + +export function initialAgentPoolConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return initialAgentPoolConfigurationDeserializer(item); + }); +} + +/** InitialAgentPoolConfiguration specifies the configuration of a pool of virtual machines that are initially defined with a Kubernetes cluster. */ +export interface InitialAgentPoolConfiguration { + /** The administrator credentials to be used for the nodes in this agent pool. */ + administratorConfiguration?: AdministratorConfiguration; + /** The configurations that will be applied to each agent in this agent pool. */ + agentOptions?: AgentOptions; + /** The configuration of networks being attached to the agent pool for use by the workloads that run on this Kubernetes cluster. */ + attachedNetworkConfiguration?: AttachedNetworkConfiguration; + /** 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. */ + availabilityZones?: string[]; + /** The number of virtual machines that use this configuration. */ + count: number; + /** The labels applied to the nodes in this agent pool. */ + labels?: KubernetesLabel[]; + /** 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. */ + mode: AgentPoolMode; + /** The taints applied to the nodes in this agent pool. */ + taints?: KubernetesLabel[]; + /** The configuration of the agent pool. */ + upgradeSettings?: AgentPoolUpgradeSettings; + /** The name of the VM SKU that determines the size of resources allocated for node VMs. */ + vmSkuName: string; + /** The name that will be used for the agent pool resource representing this agent pool. */ + name: string; +} + +export function initialAgentPoolConfigurationSerializer(item: InitialAgentPoolConfiguration): any { + return { + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationSerializer(item["administratorConfiguration"]), + agentOptions: !item["agentOptions"] + ? item["agentOptions"] + : agentOptionsSerializer(item["agentOptions"]), + attachedNetworkConfiguration: !item["attachedNetworkConfiguration"] + ? item["attachedNetworkConfiguration"] + : attachedNetworkConfigurationSerializer(item["attachedNetworkConfiguration"]), + availabilityZones: !item["availabilityZones"] + ? item["availabilityZones"] + : item["availabilityZones"].map((p: any) => { + return p; + }), + count: item["count"], + labels: !item["labels"] ? item["labels"] : kubernetesLabelArraySerializer(item["labels"]), + mode: item["mode"], + taints: !item["taints"] ? item["taints"] : kubernetesLabelArraySerializer(item["taints"]), + upgradeSettings: !item["upgradeSettings"] + ? item["upgradeSettings"] + : agentPoolUpgradeSettingsSerializer(item["upgradeSettings"]), + vmSkuName: item["vmSkuName"], + name: item["name"], + }; +} + +export function initialAgentPoolConfigurationDeserializer( + item: any, +): InitialAgentPoolConfiguration { + return { + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationDeserializer(item["administratorConfiguration"]), + agentOptions: !item["agentOptions"] + ? item["agentOptions"] + : agentOptionsDeserializer(item["agentOptions"]), + attachedNetworkConfiguration: !item["attachedNetworkConfiguration"] + ? item["attachedNetworkConfiguration"] + : attachedNetworkConfigurationDeserializer(item["attachedNetworkConfiguration"]), + availabilityZones: !item["availabilityZones"] + ? item["availabilityZones"] + : item["availabilityZones"].map((p: any) => { + return p; + }), + count: item["count"], + labels: !item["labels"] ? item["labels"] : kubernetesLabelArrayDeserializer(item["labels"]), + mode: item["mode"], + taints: !item["taints"] ? item["taints"] : kubernetesLabelArrayDeserializer(item["taints"]), + upgradeSettings: !item["upgradeSettings"] + ? item["upgradeSettings"] + : agentPoolUpgradeSettingsDeserializer(item["upgradeSettings"]), + vmSkuName: item["vmSkuName"], + name: item["name"], + }; +} + +/** AgentOptions are configurations that will be applied to each agent in an agent pool. */ +export interface AgentOptions { + /** The number of hugepages to allocate. */ + hugepagesCount: number; + /** The size of the hugepages to allocate. */ + hugepagesSize?: HugepagesSize; +} + +export function agentOptionsSerializer(item: AgentOptions): any { + return { hugepagesCount: item["hugepagesCount"], hugepagesSize: item["hugepagesSize"] }; +} + +export function agentOptionsDeserializer(item: any): AgentOptions { + return { + hugepagesCount: item["hugepagesCount"], + hugepagesSize: item["hugepagesSize"], + }; +} + +/** The size of the hugepages to allocate. */ +export enum KnownHugepagesSize { + /** 2M hugepages */ + TwoM = "2M", + /** 1G hugepages */ + OneG = "1G", +} + +/** + * The size of the hugepages to allocate. \ + * {@link KnownHugepagesSize} can be used interchangeably with HugepagesSize, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **2M**: 2M hugepages \ + * **1G**: 1G hugepages + */ +export type HugepagesSize = string; + +/** AttachedNetworkConfiguration represents the set of workload networks to attach to a resource. */ +export interface AttachedNetworkConfiguration { + /** The list of Layer 2 Networks and related configuration for attachment. */ + l2Networks?: L2NetworkAttachmentConfiguration[]; + /** The list of Layer 3 Networks and related configuration for attachment. */ + l3Networks?: L3NetworkAttachmentConfiguration[]; + /** The list of Trunked Networks and related configuration for attachment. */ + trunkedNetworks?: TrunkedNetworkAttachmentConfiguration[]; +} + +export function attachedNetworkConfigurationSerializer(item: AttachedNetworkConfiguration): any { + return { + l2Networks: !item["l2Networks"] + ? item["l2Networks"] + : l2NetworkAttachmentConfigurationArraySerializer(item["l2Networks"]), + l3Networks: !item["l3Networks"] + ? item["l3Networks"] + : l3NetworkAttachmentConfigurationArraySerializer(item["l3Networks"]), + trunkedNetworks: !item["trunkedNetworks"] + ? item["trunkedNetworks"] + : trunkedNetworkAttachmentConfigurationArraySerializer(item["trunkedNetworks"]), + }; +} + +export function attachedNetworkConfigurationDeserializer(item: any): AttachedNetworkConfiguration { + return { + l2Networks: !item["l2Networks"] + ? item["l2Networks"] + : l2NetworkAttachmentConfigurationArrayDeserializer(item["l2Networks"]), + l3Networks: !item["l3Networks"] + ? item["l3Networks"] + : l3NetworkAttachmentConfigurationArrayDeserializer(item["l3Networks"]), + trunkedNetworks: !item["trunkedNetworks"] + ? item["trunkedNetworks"] + : trunkedNetworkAttachmentConfigurationArrayDeserializer(item["trunkedNetworks"]), + }; +} + +export function l2NetworkAttachmentConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return l2NetworkAttachmentConfigurationSerializer(item); + }); +} + +export function l2NetworkAttachmentConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return l2NetworkAttachmentConfigurationDeserializer(item); + }); +} + +/** L2NetworkAttachmentConfiguration represents the configuration of the attachment of a Layer 2 network. */ +export interface L2NetworkAttachmentConfiguration { + /** The resource ID of the network that is being configured for attachment. */ + networkId: string; + /** The indicator of how this network will be utilized by the Kubernetes cluster. */ + pluginType?: KubernetesPluginType; +} + +export function l2NetworkAttachmentConfigurationSerializer( + item: L2NetworkAttachmentConfiguration, +): any { + return { networkId: item["networkId"], pluginType: item["pluginType"] }; +} + +export function l2NetworkAttachmentConfigurationDeserializer( + item: any, +): L2NetworkAttachmentConfiguration { + return { + networkId: item["networkId"], + pluginType: item["pluginType"], + }; +} + +/** The indicator of how this network will be utilized by the Kubernetes cluster. */ +export enum KnownKubernetesPluginType { + /** DPDK plugin type */ + Dpdk = "DPDK", + /** SRIOV plugin type */ + Sriov = "SRIOV", + /** OSDevice plugin type */ + OSDevice = "OSDevice", + /** MACVLAN plugin type */ + Macvlan = "MACVLAN", + /** IPVLAN plugin type */ + Ipvlan = "IPVLAN", +} + +/** + * The indicator of how this network will be utilized by the Kubernetes cluster. \ + * {@link KnownKubernetesPluginType} can be used interchangeably with KubernetesPluginType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DPDK**: DPDK plugin type \ + * **SRIOV**: SRIOV plugin type \ + * **OSDevice**: OSDevice plugin type \ + * **MACVLAN**: MACVLAN plugin type \ + * **IPVLAN**: IPVLAN plugin type + */ +export type KubernetesPluginType = string; + +export function l3NetworkAttachmentConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return l3NetworkAttachmentConfigurationSerializer(item); + }); +} + +export function l3NetworkAttachmentConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return l3NetworkAttachmentConfigurationDeserializer(item); + }); +} + +/** L3NetworkAttachmentConfiguration represents the configuration of the attachment of a Layer 3 network. */ +export interface L3NetworkAttachmentConfiguration { + /** The indication of whether this network will or will not perform IP address management and allocate IP addresses when attached. */ + ipamEnabled?: L3NetworkConfigurationIpamEnabled; + /** The resource ID of the network that is being configured for attachment. */ + networkId: string; + /** The indicator of how this network will be utilized by the Kubernetes cluster. */ + pluginType?: KubernetesPluginType; +} + +export function l3NetworkAttachmentConfigurationSerializer( + item: L3NetworkAttachmentConfiguration, +): any { + return { + ipamEnabled: item["ipamEnabled"], + networkId: item["networkId"], + pluginType: item["pluginType"], + }; +} + +export function l3NetworkAttachmentConfigurationDeserializer( + item: any, +): L3NetworkAttachmentConfiguration { + return { + ipamEnabled: item["ipamEnabled"], + networkId: item["networkId"], + pluginType: item["pluginType"], + }; +} + +/** The indication of whether this network will or will not perform IP address management and allocate IP addresses when attached. */ +export enum KnownL3NetworkConfigurationIpamEnabled { + /** IP address management enabled. */ + True = "True", + /** IP address management disabled. */ + False = "False", +} + +/** + * The indication of whether this network will or will not perform IP address management and allocate IP addresses when attached. \ + * {@link KnownL3NetworkConfigurationIpamEnabled} can be used interchangeably with L3NetworkConfigurationIpamEnabled, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: IP address management enabled. \ + * **False**: IP address management disabled. + */ +export type L3NetworkConfigurationIpamEnabled = string; + +export function trunkedNetworkAttachmentConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return trunkedNetworkAttachmentConfigurationSerializer(item); + }); +} + +export function trunkedNetworkAttachmentConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return trunkedNetworkAttachmentConfigurationDeserializer(item); + }); +} + +/** TrunkedNetworkAttachmentConfiguration represents the configuration of the attachment of a trunked network. */ +export interface TrunkedNetworkAttachmentConfiguration { + /** The resource ID of the network that is being configured for attachment. */ + networkId: string; + /** The indicator of how this network will be utilized by the Kubernetes cluster. */ + pluginType?: KubernetesPluginType; +} + +export function trunkedNetworkAttachmentConfigurationSerializer( + item: TrunkedNetworkAttachmentConfiguration, +): any { + return { networkId: item["networkId"], pluginType: item["pluginType"] }; +} + +export function trunkedNetworkAttachmentConfigurationDeserializer( + item: any, +): TrunkedNetworkAttachmentConfiguration { + return { + networkId: item["networkId"], + pluginType: item["pluginType"], + }; +} + +export function kubernetesLabelArraySerializer(result: Array): any[] { + return result.map((item) => { + return kubernetesLabelSerializer(item); + }); +} + +export function kubernetesLabelArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return kubernetesLabelDeserializer(item); + }); +} + +/** KubernetesLabel represents a single entry for a Kubernetes label or taint such as those used on a node or pod. */ +export interface KubernetesLabel { + /** The name of the label or taint. */ + key: string; + /** The value of the label or taint. */ + value: string; +} + +export function kubernetesLabelSerializer(item: KubernetesLabel): any { + return { key: item["key"], value: item["value"] }; +} + +export function kubernetesLabelDeserializer(item: any): KubernetesLabel { + return { + key: item["key"], + value: item["value"], + }; +} + +/** 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. */ +export enum KnownAgentPoolMode { + /** System agent pool */ + System = "System", + /** User agent pool */ + User = "User", + /** Not applicable */ + NotApplicable = "NotApplicable", +} + +/** + * 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. \ + * {@link KnownAgentPoolMode} can be used interchangeably with AgentPoolMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **System**: System agent pool \ + * **User**: User agent pool \ + * **NotApplicable**: Not applicable + */ +export type AgentPoolMode = string; + +/** AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool. */ +export interface AgentPoolUpgradeSettings { + /** 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. */ + drainTimeout?: number; + /** 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. */ + maxSurge?: string; + /** 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. */ + maxUnavailable?: string; +} + +export function agentPoolUpgradeSettingsSerializer(item: AgentPoolUpgradeSettings): any { + return { + drainTimeout: item["drainTimeout"], + maxSurge: item["maxSurge"], + maxUnavailable: item["maxUnavailable"], + }; +} + +export function agentPoolUpgradeSettingsDeserializer(item: any): AgentPoolUpgradeSettings { + return { + drainTimeout: item["drainTimeout"], + maxSurge: item["maxSurge"], + maxUnavailable: item["maxUnavailable"], + }; +} + +/** NetworkConfiguration specifies the Kubernetes cluster network related configuration. */ +export interface NetworkConfiguration { + /** The configuration of networks being attached to the cluster for use by the workloads that run on this Kubernetes cluster. */ + attachedNetworkConfiguration?: AttachedNetworkConfiguration; + /** 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. */ + bgpServiceLoadBalancerConfiguration?: BgpServiceLoadBalancerConfiguration; + /** The resource ID of the associated Cloud Services network. */ + cloudServicesNetworkId: string; + /** The resource ID of the Layer 3 network that is used for creation of the Container Networking Interface network. */ + cniNetworkId: string; + /** The IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in service CIDR. */ + dnsServiceIp?: string; + /** 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. */ + l2ServiceLoadBalancerConfiguration?: L2ServiceLoadBalancerConfiguration; + /** 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. */ + podCidrs?: string[]; + /** 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. */ + serviceCidrs?: string[]; +} + +export function networkConfigurationSerializer(item: NetworkConfiguration): any { + return { + attachedNetworkConfiguration: !item["attachedNetworkConfiguration"] + ? item["attachedNetworkConfiguration"] + : attachedNetworkConfigurationSerializer(item["attachedNetworkConfiguration"]), + bgpServiceLoadBalancerConfiguration: !item["bgpServiceLoadBalancerConfiguration"] + ? item["bgpServiceLoadBalancerConfiguration"] + : bgpServiceLoadBalancerConfigurationSerializer(item["bgpServiceLoadBalancerConfiguration"]), + cloudServicesNetworkId: item["cloudServicesNetworkId"], + cniNetworkId: item["cniNetworkId"], + dnsServiceIp: item["dnsServiceIp"], + l2ServiceLoadBalancerConfiguration: !item["l2ServiceLoadBalancerConfiguration"] + ? item["l2ServiceLoadBalancerConfiguration"] + : l2ServiceLoadBalancerConfigurationSerializer(item["l2ServiceLoadBalancerConfiguration"]), + podCidrs: !item["podCidrs"] + ? item["podCidrs"] + : item["podCidrs"].map((p: any) => { + return p; + }), + serviceCidrs: !item["serviceCidrs"] + ? item["serviceCidrs"] + : item["serviceCidrs"].map((p: any) => { + return p; + }), + }; +} + +export function networkConfigurationDeserializer(item: any): NetworkConfiguration { + return { + attachedNetworkConfiguration: !item["attachedNetworkConfiguration"] + ? item["attachedNetworkConfiguration"] + : attachedNetworkConfigurationDeserializer(item["attachedNetworkConfiguration"]), + bgpServiceLoadBalancerConfiguration: !item["bgpServiceLoadBalancerConfiguration"] + ? item["bgpServiceLoadBalancerConfiguration"] + : bgpServiceLoadBalancerConfigurationDeserializer( + item["bgpServiceLoadBalancerConfiguration"], + ), + cloudServicesNetworkId: item["cloudServicesNetworkId"], + cniNetworkId: item["cniNetworkId"], + dnsServiceIp: item["dnsServiceIp"], + l2ServiceLoadBalancerConfiguration: !item["l2ServiceLoadBalancerConfiguration"] + ? item["l2ServiceLoadBalancerConfiguration"] + : l2ServiceLoadBalancerConfigurationDeserializer(item["l2ServiceLoadBalancerConfiguration"]), + podCidrs: !item["podCidrs"] + ? item["podCidrs"] + : item["podCidrs"].map((p: any) => { + return p; + }), + serviceCidrs: !item["serviceCidrs"] + ? item["serviceCidrs"] + : item["serviceCidrs"].map((p: any) => { + return p; + }), + }; +} + +/** BgpServiceLoadBalancerConfiguration represents the configuration of a BGP service load balancer. */ +export interface BgpServiceLoadBalancerConfiguration { + /** The association of IP address pools to the communities and peers, allowing for announcement of IPs. */ + bgpAdvertisements?: BgpAdvertisement[]; + /** The list of additional BgpPeer entities that the Kubernetes cluster will peer with. All peering must be explicitly defined. */ + bgpPeers?: ServiceLoadBalancerBgpPeer[]; + /** The indicator to specify if the load balancer peers with the network fabric. */ + fabricPeeringEnabled?: FabricPeeringEnabled; + /** The list of pools of IP addresses that can be allocated to load balancer services. */ + ipAddressPools?: IpAddressPool[]; +} + +export function bgpServiceLoadBalancerConfigurationSerializer( + item: BgpServiceLoadBalancerConfiguration, +): any { + return { + bgpAdvertisements: !item["bgpAdvertisements"] + ? item["bgpAdvertisements"] + : bgpAdvertisementArraySerializer(item["bgpAdvertisements"]), + bgpPeers: !item["bgpPeers"] + ? item["bgpPeers"] + : serviceLoadBalancerBgpPeerArraySerializer(item["bgpPeers"]), + fabricPeeringEnabled: item["fabricPeeringEnabled"], + ipAddressPools: !item["ipAddressPools"] + ? item["ipAddressPools"] + : ipAddressPoolArraySerializer(item["ipAddressPools"]), + }; +} + +export function bgpServiceLoadBalancerConfigurationDeserializer( + item: any, +): BgpServiceLoadBalancerConfiguration { + return { + bgpAdvertisements: !item["bgpAdvertisements"] + ? item["bgpAdvertisements"] + : bgpAdvertisementArrayDeserializer(item["bgpAdvertisements"]), + bgpPeers: !item["bgpPeers"] + ? item["bgpPeers"] + : serviceLoadBalancerBgpPeerArrayDeserializer(item["bgpPeers"]), + fabricPeeringEnabled: item["fabricPeeringEnabled"], + ipAddressPools: !item["ipAddressPools"] + ? item["ipAddressPools"] + : ipAddressPoolArrayDeserializer(item["ipAddressPools"]), + }; +} + +export function bgpAdvertisementArraySerializer(result: Array): any[] { + return result.map((item) => { + return bgpAdvertisementSerializer(item); + }); +} + +export function bgpAdvertisementArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return bgpAdvertisementDeserializer(item); + }); +} + +/** BgpAdvertisement represents the association of IP address pools to the communities and peers. */ +export interface BgpAdvertisement { + /** The indicator of if this advertisement is also made to the network fabric associated with the Network Cloud Cluster. This field is ignored if fabricPeeringEnabled is set to False. */ + advertiseToFabric?: AdvertiseToFabric; + /** The names of the BGP communities to be associated with the announcement, utilizing a BGP community string in 1234:1234 format. */ + communities?: string[]; + /** The names of the IP address pools associated with this announcement. */ + ipAddressPools: string[]; + /** The names of the BGP peers to limit this advertisement to. If no values are specified, all BGP peers will receive this advertisement. */ + peers?: string[]; +} + +export function bgpAdvertisementSerializer(item: BgpAdvertisement): any { + return { + advertiseToFabric: item["advertiseToFabric"], + communities: !item["communities"] + ? item["communities"] + : item["communities"].map((p: any) => { + return p; + }), + ipAddressPools: item["ipAddressPools"].map((p: any) => { + return p; + }), + peers: !item["peers"] + ? item["peers"] + : item["peers"].map((p: any) => { + return p; + }), + }; +} + +export function bgpAdvertisementDeserializer(item: any): BgpAdvertisement { + return { + advertiseToFabric: item["advertiseToFabric"], + communities: !item["communities"] + ? item["communities"] + : item["communities"].map((p: any) => { + return p; + }), + ipAddressPools: item["ipAddressPools"].map((p: any) => { + return p; + }), + peers: !item["peers"] + ? item["peers"] + : item["peers"].map((p: any) => { + return p; + }), + }; +} + +/** The indicator of if this advertisement is also made to the network fabric associated with the Network Cloud Cluster. This field is ignored if fabricPeeringEnabled is set to False. */ +export enum KnownAdvertiseToFabric { + /** Advertise to fabric */ + True = "True", + /** Do not advertise to fabric */ + False = "False", +} + +/** + * The indicator of if this advertisement is also made to the network fabric associated with the Network Cloud Cluster. This field is ignored if fabricPeeringEnabled is set to False. \ + * {@link KnownAdvertiseToFabric} can be used interchangeably with AdvertiseToFabric, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: Advertise to fabric \ + * **False**: Do not advertise to fabric + */ +export type AdvertiseToFabric = string; + +export function serviceLoadBalancerBgpPeerArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return serviceLoadBalancerBgpPeerSerializer(item); + }); +} + +export function serviceLoadBalancerBgpPeerArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return serviceLoadBalancerBgpPeerDeserializer(item); + }); +} + +/** ServiceLoadBalancerBgpPeer represents the configuration of the BGP service load balancer for the Kubernetes cluster. */ +export interface ServiceLoadBalancerBgpPeer { + /** The indicator of BFD enablement for this BgpPeer. */ + bfdEnabled?: BfdEnabled; + /** The indicator to enable multi-hop peering support. */ + bgpMultiHop?: BgpMultiHop; + /** 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. */ + holdTime?: string; + /** 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. */ + keepAliveTime?: string; + /** The autonomous system number used for the local end of the BGP session. */ + myAsn?: number; + /** The name used to identify this BGP peer for association with a BGP advertisement. */ + name: string; + /** The authentication password for routers enforcing TCP MD5 authenticated sessions. */ + password?: string; + /** The IPv4 or IPv6 address used to connect this BGP session. */ + peerAddress: string; + /** The autonomous system number expected from the remote end of the BGP session. */ + peerAsn: number; + /** The port used to connect this BGP session. */ + peerPort?: number; +} + +export function serviceLoadBalancerBgpPeerSerializer(item: ServiceLoadBalancerBgpPeer): any { + return { + bfdEnabled: item["bfdEnabled"], + bgpMultiHop: item["bgpMultiHop"], + holdTime: item["holdTime"], + keepAliveTime: item["keepAliveTime"], + myAsn: item["myAsn"], + name: item["name"], + password: item["password"], + peerAddress: item["peerAddress"], + peerAsn: item["peerAsn"], + peerPort: item["peerPort"], + }; +} + +export function serviceLoadBalancerBgpPeerDeserializer(item: any): ServiceLoadBalancerBgpPeer { + return { + bfdEnabled: item["bfdEnabled"], + bgpMultiHop: item["bgpMultiHop"], + holdTime: item["holdTime"], + keepAliveTime: item["keepAliveTime"], + myAsn: item["myAsn"], + name: item["name"], + password: item["password"], + peerAddress: item["peerAddress"], + peerAsn: item["peerAsn"], + peerPort: item["peerPort"], + }; +} + +/** The indicator to determine if automatic allocation from the pool should occur. */ +export enum KnownBfdEnabled { + /** BFD is enabled for this BGP peer. */ + True = "True", + /** BFD is disabled for this BGP peer. */ + False = "False", +} + +/** + * The indicator to determine if automatic allocation from the pool should occur. \ + * {@link KnownBfdEnabled} can be used interchangeably with BfdEnabled, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: BFD is enabled for this BGP peer. \ + * **False**: BFD is disabled for this BGP peer. + */ +export type BfdEnabled = string; + +/** The indicator to enable multi-hop peering support. */ +export enum KnownBgpMultiHop { + /** Enable multi-hop peering support. */ + True = "True", + /** Disable multi-hop peering support. */ + False = "False", +} + +/** + * The indicator to enable multi-hop peering support. \ + * {@link KnownBgpMultiHop} can be used interchangeably with BgpMultiHop, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: Enable multi-hop peering support. \ + * **False**: Disable multi-hop peering support. + */ +export type BgpMultiHop = string; + +/** The indicator to specify if the load balancer peers with the network fabric. */ +export enum KnownFabricPeeringEnabled { + /** Enable fabric peering. */ + True = "True", + /** Disable fabric peering. */ + False = "False", +} + +/** + * The indicator to specify if the load balancer peers with the network fabric. \ + * {@link KnownFabricPeeringEnabled} can be used interchangeably with FabricPeeringEnabled, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: Enable fabric peering. \ + * **False**: Disable fabric peering. + */ +export type FabricPeeringEnabled = string; + +export function ipAddressPoolArraySerializer(result: Array): any[] { + return result.map((item) => { + return ipAddressPoolSerializer(item); + }); +} + +export function ipAddressPoolArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return ipAddressPoolDeserializer(item); + }); +} + +/** IpAddressPool represents a pool of IP addresses that can be allocated to a service. */ +export interface 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. For a BGP service load balancer configuration, only CIDR format is supported and excludes /32 (IPv4) and /128 (IPv6) prefixes. */ + addresses: string[]; + /** The indicator to determine if automatic allocation from the pool should occur. */ + autoAssign?: BfdEnabled; + /** The name used to identify this IP address pool for association with a BGP advertisement. */ + name: string; + /** 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. */ + onlyUseHostIps?: BfdEnabled; +} + +export function ipAddressPoolSerializer(item: IpAddressPool): any { + return { + addresses: item["addresses"].map((p: any) => { + return p; + }), + autoAssign: item["autoAssign"], + name: item["name"], + onlyUseHostIps: item["onlyUseHostIps"], + }; +} + +export function ipAddressPoolDeserializer(item: any): IpAddressPool { + return { + addresses: item["addresses"].map((p: any) => { + return p; + }), + autoAssign: item["autoAssign"], + name: item["name"], + onlyUseHostIps: item["onlyUseHostIps"], + }; +} + +/** L2ServiceLoadBalancerConfiguration represents the configuration of a layer 2 service load balancer. */ +export interface L2ServiceLoadBalancerConfiguration { + /** The list of pools of IP addresses that can be allocated to load balancer services. */ + ipAddressPools?: IpAddressPool[]; +} + +export function l2ServiceLoadBalancerConfigurationSerializer( + item: L2ServiceLoadBalancerConfiguration, +): any { + return { + ipAddressPools: !item["ipAddressPools"] + ? item["ipAddressPools"] + : ipAddressPoolArraySerializer(item["ipAddressPools"]), + }; +} + +export function l2ServiceLoadBalancerConfigurationDeserializer( + item: any, +): L2ServiceLoadBalancerConfiguration { + return { + ipAddressPools: !item["ipAddressPools"] + ? item["ipAddressPools"] + : ipAddressPoolArrayDeserializer(item["ipAddressPools"]), + }; +} + +export function availableUpgradeArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return availableUpgradeDeserializer(item); + }); +} + +/** AvailableUpgrade represents an upgrade available for a Kubernetes cluster. */ +export interface AvailableUpgrade { + /** The version lifecycle indicator. */ + readonly availabilityLifecycle?: AvailabilityLifecycle; + /** The version available for upgrading. */ + readonly version?: string; +} + +export function availableUpgradeDeserializer(item: any): AvailableUpgrade { + return { + availabilityLifecycle: item["availabilityLifecycle"], + version: item["version"], + }; +} + +/** The version lifecycle indicator. */ +export enum KnownAvailabilityLifecycle { + /** Preview availability */ + Preview = "Preview", + /** Generally available */ + GenerallyAvailable = "GenerallyAvailable", +} + +/** + * The version lifecycle indicator. \ + * {@link KnownAvailabilityLifecycle} can be used interchangeably with AvailabilityLifecycle, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Preview**: Preview availability \ + * **GenerallyAvailable**: Generally available + */ +export type AvailabilityLifecycle = string; + +/** The current status of the Kubernetes cluster. */ +export enum KnownKubernetesClusterDetailedStatus { + /** The Available status. */ + Available = "Available", + /** The Error status. */ + Error = "Error", + /** The Provisioning status. */ + Provisioning = "Provisioning", +} + +/** + * The current status of the Kubernetes cluster. \ + * {@link KnownKubernetesClusterDetailedStatus} can be used interchangeably with KubernetesClusterDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Available**: The Available status. \ + * **Error**: The Error status. \ + * **Provisioning**: The Provisioning status. + */ +export type KubernetesClusterDetailedStatus = string; + +export function featureStatusArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return featureStatusDeserializer(item); + }); +} + +/** FeatureStatus contains information regarding a Kubernetes cluster feature. */ +export interface FeatureStatus { + /** The status representing the state of this feature. */ + readonly detailedStatus?: FeatureDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The name of the feature. */ + readonly name?: string; + /** The version of the feature. */ + readonly version?: string; +} + +export function featureStatusDeserializer(item: any): FeatureStatus { + return { + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + name: item["name"], + version: item["version"], + }; +} + +/** The status representing the state of this feature. */ +export enum KnownFeatureDetailedStatus { + /** The Running status. */ + Running = "Running", + /** The Failed status. */ + Failed = "Failed", + /** The Unknown status. */ + Unknown = "Unknown", +} + +/** + * The status representing the state of this feature. \ + * {@link KnownFeatureDetailedStatus} can be used interchangeably with FeatureDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Running**: The Running status. \ + * **Failed**: The Failed status. \ + * **Unknown**: The Unknown status. + */ +export type FeatureDetailedStatus = string; + +export function kubernetesClusterNodeArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return kubernetesClusterNodeDeserializer(item); + }); +} + +/** KubernetesClusterNode represents the details of a node in a Kubernetes cluster. */ +export interface KubernetesClusterNode { + /** The resource ID of the agent pool that this node belongs to. This value is not represented on control plane nodes. */ + readonly agentPoolId?: string; + /** The availability zone this node is running within. */ + readonly availabilityZone?: string; + /** The resource ID of the bare metal machine that hosts this node. */ + readonly bareMetalMachineId?: string; + /** The number of CPU cores configured for this node, derived from the VM SKU specified. */ + readonly cpuCores?: number; + /** The detailed state of this node. */ + readonly detailedStatus?: KubernetesClusterNodeDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The size of the disk configured for this node. Allocations are measured in gibibytes. */ + readonly diskSizeGB?: number; + /** The machine image used to deploy this node. */ + readonly image?: string; + /** The currently running version of Kubernetes and bundled features running on this node. */ + readonly kubernetesVersion?: string; + /** The list of labels on this node that have been assigned to the agent pool containing this node. */ + readonly labels?: KubernetesLabel[]; + /** The amount of memory configured for this node, derived from the vm SKU specified. Allocations are measured in gibibytes. */ + readonly memorySizeGB?: number; + /** The mode of the agent pool containing this node. Not applicable for control plane nodes. */ + readonly mode?: AgentPoolMode; + /** The name of this node, as realized in the Kubernetes cluster. */ + readonly name?: string; + /** The NetworkAttachments made to this node. */ + readonly networkAttachments?: NetworkAttachment[]; + /** The power state of this node. */ + readonly powerState?: KubernetesNodePowerState; + /** The role of this node in the cluster. */ + readonly role?: KubernetesNodeRole; + /** The list of taints that have been assigned to the agent pool containing this node. */ + readonly taints?: KubernetesLabel[]; + /** The VM SKU name that was used to create this cluster node. */ + readonly vmSkuName?: string; +} + +export function kubernetesClusterNodeDeserializer(item: any): KubernetesClusterNode { + return { + agentPoolId: item["agentPoolId"], + availabilityZone: item["availabilityZone"], + bareMetalMachineId: item["bareMetalMachineId"], + cpuCores: item["cpuCores"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + diskSizeGB: item["diskSizeGB"], + image: item["image"], + kubernetesVersion: item["kubernetesVersion"], + labels: !item["labels"] ? item["labels"] : kubernetesLabelArrayDeserializer(item["labels"]), + memorySizeGB: item["memorySizeGB"], + mode: item["mode"], + name: item["name"], + networkAttachments: !item["networkAttachments"] + ? item["networkAttachments"] + : networkAttachmentArrayDeserializer(item["networkAttachments"]), + powerState: item["powerState"], + role: item["role"], + taints: !item["taints"] ? item["taints"] : kubernetesLabelArrayDeserializer(item["taints"]), + vmSkuName: item["vmSkuName"], + }; +} + +/** The detailed state of this node. */ +export enum KnownKubernetesClusterNodeDetailedStatus { + /** The Available status. */ + Available = "Available", + /** The Error status. */ + Error = "Error", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Running status. */ + Running = "Running", + /** The Scheduling status. */ + Scheduling = "Scheduling", + /** The Stopped status. */ + Stopped = "Stopped", + /** The Terminating status. */ + Terminating = "Terminating", + /** The Unknown status. */ + Unknown = "Unknown", +} + +/** + * The detailed state of this node. \ + * {@link KnownKubernetesClusterNodeDetailedStatus} can be used interchangeably with KubernetesClusterNodeDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Available**: The Available status. \ + * **Error**: The Error status. \ + * **Provisioning**: The Provisioning status. \ + * **Running**: The Running status. \ + * **Scheduling**: The Scheduling status. \ + * **Stopped**: The Stopped status. \ + * **Terminating**: The Terminating status. \ + * **Unknown**: The Unknown status. + */ +export type KubernetesClusterNodeDetailedStatus = string; + +export function networkAttachmentArraySerializer(result: Array): any[] { + return result.map((item) => { + return networkAttachmentSerializer(item); + }); +} + +export function networkAttachmentArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return networkAttachmentDeserializer(item); + }); +} + +/** NetworkAttachment represents the single network attachment. */ +export interface NetworkAttachment { + /** The resource ID of the associated network attached to the virtual machine. It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources. */ + attachedNetworkId: string; + /** 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. */ + defaultGateway?: DefaultGateway; + /** 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. */ + ipAllocationMethod: VirtualMachineIPAllocationMethod; + /** 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. */ + ipv4Address?: string; + /** 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. */ + ipv6Address?: string; + /** The MAC address of the interface for the virtual machine that corresponds to this network attachment. */ + readonly macAddress?: string; + /** 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. */ + networkAttachmentName?: string; +} + +export function networkAttachmentSerializer(item: NetworkAttachment): any { + return { + attachedNetworkId: item["attachedNetworkId"], + defaultGateway: item["defaultGateway"], + ipAllocationMethod: item["ipAllocationMethod"], + ipv4Address: item["ipv4Address"], + ipv6Address: item["ipv6Address"], + networkAttachmentName: item["networkAttachmentName"], + }; +} + +export function networkAttachmentDeserializer(item: any): NetworkAttachment { + return { + attachedNetworkId: item["attachedNetworkId"], + defaultGateway: item["defaultGateway"], + ipAllocationMethod: item["ipAllocationMethod"], + ipv4Address: item["ipv4Address"], + ipv6Address: item["ipv6Address"], + macAddress: item["macAddress"], + networkAttachmentName: item["networkAttachmentName"], + }; +} + +/** 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. */ +export enum KnownDefaultGateway { + /** This is the default gateway. */ + True = "True", + /** This is not the default gateway. */ + False = "False", +} + +/** + * 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. \ + * {@link KnownDefaultGateway} can be used interchangeably with DefaultGateway, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: This is the default gateway. \ + * **False**: This is not the default gateway. + */ +export type DefaultGateway = string; + +/** 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. */ +export enum KnownVirtualMachineIPAllocationMethod { + /** Dynamic VM IP allocation. */ + Dynamic = "Dynamic", + /** Static VM IP allocation. */ + Static = "Static", + /** No VM IP allocation. */ + Disabled = "Disabled", +} + +/** + * 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. \ + * {@link KnownVirtualMachineIPAllocationMethod} can be used interchangeably with VirtualMachineIPAllocationMethod, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Dynamic**: Dynamic VM IP allocation. \ + * **Static**: Static VM IP allocation. \ + * **Disabled**: No VM IP allocation. + */ +export type VirtualMachineIPAllocationMethod = string; + +/** The power state of this node. */ +export enum KnownKubernetesNodePowerState { + /** The node is powered on. */ + On = "On", + /** The node is powered off. */ + Off = "Off", + /** The node is in an unknown power state. */ + Unknown = "Unknown", +} + +/** + * The power state of this node. \ + * {@link KnownKubernetesNodePowerState} can be used interchangeably with KubernetesNodePowerState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **On**: The node is powered on. \ + * **Off**: The node is powered off. \ + * **Unknown**: The node is in an unknown power state. + */ +export type KubernetesNodePowerState = string; + +/** The role of this node in the cluster. */ +export enum KnownKubernetesNodeRole { + /** Control plane role */ + ControlPlane = "ControlPlane", + /** Worker role */ + Worker = "Worker", +} + +/** + * The role of this node in the cluster. \ + * {@link KnownKubernetesNodeRole} can be used interchangeably with KubernetesNodeRole, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ControlPlane**: Control plane role \ + * **Worker**: Worker role + */ +export type KubernetesNodeRole = string; + +/** The provisioning state of the Kubernetes cluster resource. */ +export enum KnownKubernetesClusterProvisioningState { + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Failed status. */ + Failed = "Failed", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Accepted status. */ + Accepted = "Accepted", + /** The InProgress status. */ + InProgress = "InProgress", + /** The Created status. */ + Created = "Created", + /** The Updating status. */ + Updating = "Updating", + /** The Deleting status. */ + Deleting = "Deleting", +} + +/** + * The provisioning state of the Kubernetes cluster resource. \ + * {@link KnownKubernetesClusterProvisioningState} can be used interchangeably with KubernetesClusterProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The Succeeded status. \ + * **Failed**: The Failed status. \ + * **Canceled**: The Canceled status. \ + * **Accepted**: The Accepted status. \ + * **InProgress**: The InProgress status. \ + * **Created**: The Created status. \ + * **Updating**: The Updating status. \ + * **Deleting**: The Deleting status. + */ +export type KubernetesClusterProvisioningState = string; + +/** KubernetesClusterPatchParameters represents the body of the request to patch the Hybrid AKS cluster. */ +export interface KubernetesClusterPatchParameters { + /** Resource tags. */ + tags?: Record; + /** The configuration of the default administrator credentials. */ + administratorConfiguration?: AdministratorConfigurationPatch; + /** The defining characteristics of the control plane that can be patched for this Kubernetes cluster. */ + controlPlaneNodeConfiguration?: ControlPlaneNodePatchConfiguration; + /** The Kubernetes version for this cluster. */ + kubernetesVersion?: string; +} + +export function kubernetesClusterPatchParametersSerializer( + item: KubernetesClusterPatchParameters, +): any { + return { + properties: areAllPropsUndefined(item, [ + "administratorConfiguration", + "controlPlaneNodeConfiguration", + "kubernetesVersion", + ]) + ? undefined + : _kubernetesClusterPatchParametersPropertiesSerializer(item), + tags: item["tags"], + }; +} + +/** KubernetesClusterPatchProperties represents the properties of the Kubernetes cluster that can be patched. */ +export interface KubernetesClusterPatchProperties { + /** The configuration of the default administrator credentials. */ + administratorConfiguration?: AdministratorConfigurationPatch; + /** The defining characteristics of the control plane that can be patched for this Kubernetes cluster. */ + controlPlaneNodeConfiguration?: ControlPlaneNodePatchConfiguration; + /** The Kubernetes version for this cluster. */ + kubernetesVersion?: string; +} + +export function kubernetesClusterPatchPropertiesSerializer( + item: KubernetesClusterPatchProperties, +): any { + return { + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationPatchSerializer(item["administratorConfiguration"]), + controlPlaneNodeConfiguration: !item["controlPlaneNodeConfiguration"] + ? item["controlPlaneNodeConfiguration"] + : controlPlaneNodePatchConfigurationSerializer(item["controlPlaneNodeConfiguration"]), + kubernetesVersion: item["kubernetesVersion"], + }; +} + +/** AdministratorConfigurationPatch represents the patching capabilities for the administrator configuration. */ +export interface AdministratorConfigurationPatch { + /** SshPublicKey represents the public key used to authenticate with a resource through SSH. */ + sshPublicKeys?: SshPublicKey[]; +} + +export function administratorConfigurationPatchSerializer( + item: AdministratorConfigurationPatch, +): any { + return { + sshPublicKeys: !item["sshPublicKeys"] + ? item["sshPublicKeys"] + : sshPublicKeyArraySerializer(item["sshPublicKeys"]), + }; +} + +/** ControlPlaneNodePatchConfiguration represents the properties of the control plane that can be patched for this Kubernetes cluster. */ +export interface ControlPlaneNodePatchConfiguration { + /** The configuration of administrator credentials for the control plane nodes. */ + administratorConfiguration?: AdministratorConfigurationPatch; + /** The number of virtual machines that use this configuration. */ + count?: number; +} + +export function controlPlaneNodePatchConfigurationSerializer( + item: ControlPlaneNodePatchConfiguration, +): any { + return { + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationPatchSerializer(item["administratorConfiguration"]), + count: item["count"], + }; +} + +/** KubernetesClusterList represents a list of Kubernetes clusters. */ +export interface _KubernetesClusterList { + /** The KubernetesCluster items on this page */ + value: KubernetesCluster[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _kubernetesClusterListDeserializer(item: any): _KubernetesClusterList { + return { + value: kubernetesClusterArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function kubernetesClusterArraySerializer(result: Array): any[] { + return result.map((item) => { + return kubernetesClusterSerializer(item); + }); +} + +export function kubernetesClusterArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return kubernetesClusterDeserializer(item); + }); +} + +/** KubernetesClusterRestartNodeParameters represents the body of the request to restart the node of a Kubernetes cluster. */ +export interface KubernetesClusterRestartNodeParameters { + /** The name of the node to restart. */ + nodeName: string; +} + +export function kubernetesClusterRestartNodeParametersSerializer( + item: KubernetesClusterRestartNodeParameters, +): any { + return { nodeName: item["nodeName"] }; +} + +/** KubernetesVersion represents the available Kubernetes versions for a cluster. */ +export interface KubernetesVersion extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** The list of available Kubernetes versions. */ + readonly values?: KubernetesVersionValue[]; + /** The provisioning state of the Kubernetes version resource. */ + readonly provisioningState?: KubernetesVersionProvisioningState; +} + +export function kubernetesVersionSerializer(item: KubernetesVersion): any { + return { + tags: item["tags"], + location: item["location"], + properties: _kubernetesVersionPropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function kubernetesVersionDeserializer(item: any): KubernetesVersion { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._kubernetesVersionPropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** KubernetesVersionProperties contains the read-only properties describing available versions. */ +export interface KubernetesVersionProperties { + /** The list of available Kubernetes versions. */ + readonly values?: KubernetesVersionValue[]; + /** The provisioning state of the Kubernetes version resource. */ + readonly provisioningState?: KubernetesVersionProvisioningState; +} + +export function kubernetesVersionPropertiesSerializer(_item: KubernetesVersionProperties): any { + return {}; +} + +export function kubernetesVersionPropertiesDeserializer(item: any): KubernetesVersionProperties { + return { + values: !item["values"] + ? item["values"] + : kubernetesVersionValueArrayDeserializer(item["values"]), + provisioningState: item["provisioningState"], + }; +} + +export function kubernetesVersionValueArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return kubernetesVersionValueDeserializer(item); + }); +} + +/** KubernetesVersionValue describes a specific Kubernetes version that can be deployed. */ +export interface KubernetesVersionValue { + /** Additional description for the Kubernetes version. */ + readonly description?: string; + /** The Kubernetes version identifier. */ + readonly version?: string; +} + +export function kubernetesVersionValueDeserializer(item: any): KubernetesVersionValue { + return { + description: item["description"], + version: item["version"], + }; +} + +/** The provisioning state of the Kubernetes version resource. */ +export enum KnownKubernetesVersionProvisioningState { + /** The Accepted status. */ + Accepted = "Accepted", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Failed status. */ + Failed = "Failed", + /** The Succeeded status. */ + Succeeded = "Succeeded", +} + +/** + * The provisioning state of the Kubernetes version resource. \ + * {@link KnownKubernetesVersionProvisioningState} can be used interchangeably with KubernetesVersionProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Accepted**: The Accepted status. \ + * **Canceled**: The Canceled status. \ + * **Failed**: The Failed status. \ + * **Succeeded**: The Succeeded status. + */ +export type KubernetesVersionProvisioningState = string; + +/** KubernetesVersionPatchParameters represents the body of the request to patch Kubernetes version tags. */ +export interface KubernetesVersionPatchParameters { + /** Resource tags. */ + tags?: Record; +} + +export function kubernetesVersionPatchParametersSerializer( + item: KubernetesVersionPatchParameters, +): any { + return { tags: item["tags"] }; +} + +/** KubernetesVersionList represents a list of Kubernetes version resources. */ +export interface _KubernetesVersionList { + /** The KubernetesVersion items on this page */ + value: KubernetesVersion[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _kubernetesVersionListDeserializer(item: any): _KubernetesVersionList { + return { + value: kubernetesVersionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function kubernetesVersionArraySerializer(result: Array): any[] { + return result.map((item) => { + return kubernetesVersionSerializer(item); + }); +} + +export function kubernetesVersionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return kubernetesVersionDeserializer(item); + }); +} + +/** L2Network represents a network that utilizes a single isolation domain set up for layer-2 resources. */ +export interface L2Network extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS. */ + hybridAksPluginType?: HybridAksPluginType; + /** The default interface name for this L2 network in the virtual machine. This name can be overridden by the name supplied in the network attachment configuration of that virtual machine. */ + interfaceName?: string; + /** The resource ID of the Network Fabric l2IsolationDomain. */ + l2IsolationDomainId: string; + /** The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. */ + readonly associatedResourceIds?: string[]; + /** The resource ID of the Network Cloud cluster this L2 network is associated with. */ + readonly clusterId?: string; + /** The more detailed status of the L2 network. */ + readonly detailedStatus?: L2NetworkDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource ID(s) that are associated with this L2 network. */ + readonly hybridAksClustersAssociatedIds?: string[]; + /** Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource ID(s), excluding any Hybrid AKS virtual machines, that are currently using this L2 network. */ + readonly virtualMachinesAssociatedIds?: string[]; + /** The provisioning state of the L2 network. */ + readonly provisioningState?: L2NetworkProvisioningState; +} + +export function l2NetworkSerializer(item: L2Network): any { + return { + tags: item["tags"], + location: item["location"], + properties: _l2NetworkPropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function l2NetworkDeserializer(item: any): L2Network { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._l2NetworkPropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** L2NetworkProperties represents properties of the L2 network. */ +export interface L2NetworkProperties { + /** Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS. */ + hybridAksPluginType?: HybridAksPluginType; + /** The default interface name for this L2 network in the virtual machine. This name can be overridden by the name supplied in the network attachment configuration of that virtual machine. */ + interfaceName?: string; + /** The resource ID of the Network Fabric l2IsolationDomain. */ + l2IsolationDomainId: string; + /** The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. */ + readonly associatedResourceIds?: string[]; + /** The resource ID of the Network Cloud cluster this L2 network is associated with. */ + readonly clusterId?: string; + /** The more detailed status of the L2 network. */ + readonly detailedStatus?: L2NetworkDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource ID(s) that are associated with this L2 network. */ + readonly hybridAksClustersAssociatedIds?: string[]; + /** Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource ID(s), excluding any Hybrid AKS virtual machines, that are currently using this L2 network. */ + readonly virtualMachinesAssociatedIds?: string[]; + /** The provisioning state of the L2 network. */ + readonly provisioningState?: L2NetworkProvisioningState; +} + +export function l2NetworkPropertiesSerializer(item: L2NetworkProperties): any { + return { + hybridAksPluginType: item["hybridAksPluginType"], + interfaceName: item["interfaceName"], + l2IsolationDomainId: item["l2IsolationDomainId"], + }; +} + +export function l2NetworkPropertiesDeserializer(item: any): L2NetworkProperties { + return { + hybridAksPluginType: item["hybridAksPluginType"], + interfaceName: item["interfaceName"], + l2IsolationDomainId: item["l2IsolationDomainId"], + associatedResourceIds: !item["associatedResourceIds"] + ? item["associatedResourceIds"] + : item["associatedResourceIds"].map((p: any) => { + return p; + }), + clusterId: item["clusterId"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + hybridAksClustersAssociatedIds: !item["hybridAksClustersAssociatedIds"] + ? item["hybridAksClustersAssociatedIds"] + : item["hybridAksClustersAssociatedIds"].map((p: any) => { + return p; + }), + virtualMachinesAssociatedIds: !item["virtualMachinesAssociatedIds"] + ? item["virtualMachinesAssociatedIds"] + : item["virtualMachinesAssociatedIds"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +/** Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS. */ +export enum KnownHybridAksPluginType { + /** The DPDK plugin type. */ + Dpdk = "DPDK", + /** The SRIOV plugin type. */ + Sriov = "SRIOV", + /** The OSDevice plugin type. */ + OSDevice = "OSDevice", +} + +/** + * Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS. \ + * {@link KnownHybridAksPluginType} can be used interchangeably with HybridAksPluginType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DPDK**: The DPDK plugin type. \ + * **SRIOV**: The SRIOV plugin type. \ + * **OSDevice**: The OSDevice plugin type. + */ +export type HybridAksPluginType = string; + +/** The more detailed status of the L2 network. */ +export enum KnownL2NetworkDetailedStatus { + /** The Error status. */ + Error = "Error", + /** The Available status. */ + Available = "Available", + /** The Provisioning status. */ + Provisioning = "Provisioning", +} + +/** + * The more detailed status of the L2 network. \ + * {@link KnownL2NetworkDetailedStatus} can be used interchangeably with L2NetworkDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Error**: The Error status. \ + * **Available**: The Available status. \ + * **Provisioning**: The Provisioning status. + */ +export type L2NetworkDetailedStatus = string; + +/** The provisioning state of the L2 network. */ +export enum KnownL2NetworkProvisioningState { + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Failed status. */ + Failed = "Failed", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Accepted status. */ + Accepted = "Accepted", +} + +/** + * The provisioning state of the L2 network. \ + * {@link KnownL2NetworkProvisioningState} can be used interchangeably with L2NetworkProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The Succeeded status. \ + * **Failed**: The Failed status. \ + * **Canceled**: The Canceled status. \ + * **Provisioning**: The Provisioning status. \ + * **Accepted**: The Accepted status. + */ +export type L2NetworkProvisioningState = string; + +/** L2NetworkPatchParameters represents the body of the request to patch the L2 network. */ +export interface L2NetworkPatchParameters { + /** Resource tags. */ + tags?: Record; +} + +export function l2NetworkPatchParametersSerializer(item: L2NetworkPatchParameters): any { + return { tags: item["tags"] }; +} + +/** L2NetworkList represents a list of L2 networks. */ +export interface _L2NetworkList { + /** The L2Network items on this page */ + value: L2Network[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _l2NetworkListDeserializer(item: any): _L2NetworkList { + return { + value: l2NetworkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function l2NetworkArraySerializer(result: Array): any[] { + return result.map((item) => { + return l2NetworkSerializer(item); + }); +} + +export function l2NetworkArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return l2NetworkDeserializer(item); + }); +} + +/** L3Network represents a network that utilizes a single isolation domain set up for layer-3 resources. */ +export interface L3Network extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The indicator of whether or not to disable IPAM allocation on the network attachment definition injected into the Hybrid AKS Cluster. */ + hybridAksIpamEnabled?: HybridAksIpamEnabled; + /** Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS. */ + hybridAksPluginType?: HybridAksPluginType; + /** The default interface name for this L3 network in the virtual machine. This name can be overridden by the name supplied in the network attachment configuration of that virtual machine. */ + interfaceName?: string; + /** The type of the IP address allocation, defaulted to "DualStack". */ + ipAllocationType?: IpAllocationType; + /** The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV4 or DualStack. */ + ipv4ConnectedPrefix?: string; + /** The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV6 or DualStack. */ + ipv6ConnectedPrefix?: string; + /** The resource ID of the Network Fabric l3IsolationDomain. */ + l3IsolationDomainId: string; + /** The VLAN from the l3IsolationDomain that is used for this network. */ + vlan: number; + /** The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. */ + readonly associatedResourceIds?: string[]; + /** The resource ID of the Network Cloud cluster this L3 network is associated with. */ + readonly clusterId?: string; + /** The more detailed status of the L3 network. */ + readonly detailedStatus?: L3NetworkDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are associated with this L3 network. */ + readonly hybridAksClustersAssociatedIds?: string[]; + /** Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this L3 network. */ + readonly virtualMachinesAssociatedIds?: string[]; + /** The provisioning state of the L3 network. */ + readonly provisioningState?: L3NetworkProvisioningState; +} + +export function l3NetworkSerializer(item: L3Network): any { + return { + tags: item["tags"], + location: item["location"], + properties: _l3NetworkPropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function l3NetworkDeserializer(item: any): L3Network { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._l3NetworkPropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** L3NetworkProperties represents properties of the L3 network. */ +export interface L3NetworkProperties { + /** Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The indicator of whether or not to disable IPAM allocation on the network attachment definition injected into the Hybrid AKS Cluster. */ + hybridAksIpamEnabled?: HybridAksIpamEnabled; + /** Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS. */ + hybridAksPluginType?: HybridAksPluginType; + /** The default interface name for this L3 network in the virtual machine. This name can be overridden by the name supplied in the network attachment configuration of that virtual machine. */ + interfaceName?: string; + /** The type of the IP address allocation, defaulted to "DualStack". */ + ipAllocationType?: IpAllocationType; + /** The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV4 or DualStack. */ + ipv4ConnectedPrefix?: string; + /** The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV6 or DualStack. */ + ipv6ConnectedPrefix?: string; + /** The resource ID of the Network Fabric l3IsolationDomain. */ + l3IsolationDomainId: string; + /** The VLAN from the l3IsolationDomain that is used for this network. */ + vlan: number; + /** The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. */ + readonly associatedResourceIds?: string[]; + /** The resource ID of the Network Cloud cluster this L3 network is associated with. */ + readonly clusterId?: string; + /** The more detailed status of the L3 network. */ + readonly detailedStatus?: L3NetworkDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are associated with this L3 network. */ + readonly hybridAksClustersAssociatedIds?: string[]; + /** Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this L3 network. */ + readonly virtualMachinesAssociatedIds?: string[]; + /** The provisioning state of the L3 network. */ + readonly provisioningState?: L3NetworkProvisioningState; +} + +export function l3NetworkPropertiesSerializer(item: L3NetworkProperties): any { + return { + hybridAksIpamEnabled: item["hybridAksIpamEnabled"], + hybridAksPluginType: item["hybridAksPluginType"], + interfaceName: item["interfaceName"], + ipAllocationType: item["ipAllocationType"], + ipv4ConnectedPrefix: item["ipv4ConnectedPrefix"], + ipv6ConnectedPrefix: item["ipv6ConnectedPrefix"], + l3IsolationDomainId: item["l3IsolationDomainId"], + vlan: item["vlan"], + }; +} + +export function l3NetworkPropertiesDeserializer(item: any): L3NetworkProperties { + return { + hybridAksIpamEnabled: item["hybridAksIpamEnabled"], + hybridAksPluginType: item["hybridAksPluginType"], + interfaceName: item["interfaceName"], + ipAllocationType: item["ipAllocationType"], + ipv4ConnectedPrefix: item["ipv4ConnectedPrefix"], + ipv6ConnectedPrefix: item["ipv6ConnectedPrefix"], + l3IsolationDomainId: item["l3IsolationDomainId"], + vlan: item["vlan"], + associatedResourceIds: !item["associatedResourceIds"] + ? item["associatedResourceIds"] + : item["associatedResourceIds"].map((p: any) => { + return p; + }), + clusterId: item["clusterId"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + hybridAksClustersAssociatedIds: !item["hybridAksClustersAssociatedIds"] + ? item["hybridAksClustersAssociatedIds"] + : item["hybridAksClustersAssociatedIds"].map((p: any) => { + return p; + }), + virtualMachinesAssociatedIds: !item["virtualMachinesAssociatedIds"] + ? item["virtualMachinesAssociatedIds"] + : item["virtualMachinesAssociatedIds"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +/** Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The indicator of whether or not to disable IPAM allocation on the network attachment definition injected into the Hybrid AKS Cluster. */ +export enum KnownHybridAksIpamEnabled { + /** Hybrid AKS IPAM allocation is enabled. */ + True = "True", + /** Hybrid AKS IPAM allocation is disabled. */ + False = "False", +} + +/** + * Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The indicator of whether or not to disable IPAM allocation on the network attachment definition injected into the Hybrid AKS Cluster. \ + * {@link KnownHybridAksIpamEnabled} can be used interchangeably with HybridAksIpamEnabled, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: Hybrid AKS IPAM allocation is enabled. \ + * **False**: Hybrid AKS IPAM allocation is disabled. + */ +export type HybridAksIpamEnabled = string; + +/** The type of the IP address allocation, defaulted to "DualStack". */ +export enum KnownIpAllocationType { + /** The IPV4 address allocation type. */ + IPV4 = "IPV4", + /** The IPV6 address allocation type. */ + IPV6 = "IPV6", + /** The DualStack address allocation type. */ + DualStack = "DualStack", +} + +/** + * The type of the IP address allocation, defaulted to "DualStack". \ + * {@link KnownIpAllocationType} can be used interchangeably with IpAllocationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPV4**: The IPV4 address allocation type. \ + * **IPV6**: The IPV6 address allocation type. \ + * **DualStack**: The DualStack address allocation type. + */ +export type IpAllocationType = string; + +/** The more detailed status of the L3 network. */ +export enum KnownL3NetworkDetailedStatus { + /** The Error status. */ + Error = "Error", + /** The Available status. */ + Available = "Available", + /** The Provisioning status. */ + Provisioning = "Provisioning", +} + +/** + * The more detailed status of the L3 network. \ + * {@link KnownL3NetworkDetailedStatus} can be used interchangeably with L3NetworkDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Error**: The Error status. \ + * **Available**: The Available status. \ + * **Provisioning**: The Provisioning status. + */ +export type L3NetworkDetailedStatus = string; + +/** The provisioning state of the L3 network. */ +export enum KnownL3NetworkProvisioningState { + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Failed status. */ + Failed = "Failed", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Accepted status. */ + Accepted = "Accepted", +} + +/** + * The provisioning state of the L3 network. \ + * {@link KnownL3NetworkProvisioningState} can be used interchangeably with L3NetworkProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The Succeeded status. \ + * **Failed**: The Failed status. \ + * **Canceled**: The Canceled status. \ + * **Provisioning**: The Provisioning status. \ + * **Accepted**: The Accepted status. + */ +export type L3NetworkProvisioningState = string; + +/** L3NetworkPatchParameters represents the body of the request to patch the cloud services network. */ +export interface L3NetworkPatchParameters { + /** Resource tags. */ + tags?: Record; +} + +export function l3NetworkPatchParametersSerializer(item: L3NetworkPatchParameters): any { + return { tags: item["tags"] }; +} + +/** L3NetworkList represents a list of L3 networks. */ +export interface _L3NetworkList { + /** The L3Network items on this page */ + value: L3Network[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _l3NetworkListDeserializer(item: any): _L3NetworkList { + return { + value: l3NetworkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function l3NetworkArraySerializer(result: Array): any[] { + return result.map((item) => { + return l3NetworkSerializer(item); + }); +} + +export function l3NetworkArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return l3NetworkDeserializer(item); + }); +} + +/** RackSku represents the SKU information of the rack. */ +export interface RackSku extends ProxyResource { + /** The list of machine SKUs and associated rack slot for the compute-dedicated machines in this rack model. */ + readonly computeMachines?: MachineSkuSlot[]; + /** The list of machine SKUs and associated rack slot for the control-plane dedicated machines in this rack model. */ + readonly controllerMachines?: MachineSkuSlot[]; + /** The deployment type supported by the rack SKU. */ + readonly deploymentType?: DeploymentType; + /** The free-form text describing the rack. */ + readonly description?: string; + /** The maximum number of compute racks supported by an aggregator rack. 0 if this is a compute rack or a rack for a single rack cluster(rackType="Single"). */ + readonly maxClusterSlots?: number; + /** The provisioning state of the rack SKU resource. */ + readonly provisioningState?: RackSkuProvisioningState; + /** The type of the rack. */ + readonly rackType?: RackSkuType; + /** The list of appliance SKUs and associated rack slot for the storage appliance(s) in this rack model. */ + readonly storageAppliances?: StorageApplianceSkuSlot[]; + /** The list of supported SKUs if the rack is an aggregator. */ + readonly supportedRackSkuIds?: string[]; +} + +export function rackSkuDeserializer(item: any): RackSku { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._rackSkuPropertiesDeserializer(item["properties"]), + }; +} + +/** RackSkuProperties represents the properties of compute-related hardware for a rack. This supports both aggregator and compute racks. */ +export interface RackSkuProperties { + /** The list of machine SKUs and associated rack slot for the compute-dedicated machines in this rack model. */ + readonly computeMachines?: MachineSkuSlot[]; + /** The list of machine SKUs and associated rack slot for the control-plane dedicated machines in this rack model. */ + readonly controllerMachines?: MachineSkuSlot[]; + /** The deployment type supported by the rack SKU. */ + readonly deploymentType?: DeploymentType; + /** The free-form text describing the rack. */ + readonly description?: string; + /** The maximum number of compute racks supported by an aggregator rack. 0 if this is a compute rack or a rack for a single rack cluster(rackType="Single"). */ + readonly maxClusterSlots?: number; + /** The provisioning state of the rack SKU resource. */ + readonly provisioningState?: RackSkuProvisioningState; + /** The type of the rack. */ + readonly rackType?: RackSkuType; + /** The list of appliance SKUs and associated rack slot for the storage appliance(s) in this rack model. */ + readonly storageAppliances?: StorageApplianceSkuSlot[]; + /** The list of supported SKUs if the rack is an aggregator. */ + readonly supportedRackSkuIds?: string[]; +} + +export function rackSkuPropertiesDeserializer(item: any): RackSkuProperties { + return { + computeMachines: !item["computeMachines"] + ? item["computeMachines"] + : machineSkuSlotArrayDeserializer(item["computeMachines"]), + controllerMachines: !item["controllerMachines"] + ? item["controllerMachines"] + : machineSkuSlotArrayDeserializer(item["controllerMachines"]), + deploymentType: item["deploymentType"], + description: item["description"], + maxClusterSlots: item["maxClusterSlots"], + provisioningState: item["provisioningState"], + rackType: item["rackType"], + storageAppliances: !item["storageAppliances"] + ? item["storageAppliances"] + : storageApplianceSkuSlotArrayDeserializer(item["storageAppliances"]), + supportedRackSkuIds: !item["supportedRackSkuIds"] + ? item["supportedRackSkuIds"] + : item["supportedRackSkuIds"].map((p: any) => { + return p; + }), + }; +} + +export function machineSkuSlotArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return machineSkuSlotDeserializer(item); + }); +} + +/** MachineSkuSlot represents a single SKU and rack slot associated with the machine. */ +export interface MachineSkuSlot { + /** The position in the rack for the machine. */ + readonly rackSlot?: number; + /** The type of bootstrap protocol used. */ + readonly bootstrapProtocol?: BootstrapProtocol; + /** The count of CPU cores for this machine. */ + readonly cpuCores?: number; + /** The count of CPU sockets for this machine. */ + readonly cpuSockets?: number; + /** The list of disks. */ + readonly disks?: MachineDisk[]; + /** The generation of the architecture. */ + readonly generation?: string; + /** The hardware version of the machine. */ + readonly hardwareVersion?: string; + /** The maximum amount of memory. Measured in gibibytes. */ + readonly memoryCapacityGB?: number; + /** The model of the machine. */ + readonly model?: string; + /** The list of network interfaces. */ + readonly networkInterfaces?: NetworkInterface[]; + /** The count of SMT and physical core threads for this machine. */ + readonly totalThreads?: number; + /** The make of the machine. */ + readonly vendor?: string; +} + +export function machineSkuSlotDeserializer(item: any): MachineSkuSlot { + return { + ...(!item["properties"] + ? item["properties"] + : _machineSkuSlotPropertiesDeserializer(item["properties"])), + rackSlot: item["rackSlot"], + }; +} + +/** MachineSkuProperties represents the properties of the machine SKU. */ +export interface MachineSkuProperties { + /** The type of bootstrap protocol used. */ + readonly bootstrapProtocol?: BootstrapProtocol; + /** The count of CPU cores for this machine. */ + readonly cpuCores?: number; + /** The count of CPU sockets for this machine. */ + readonly cpuSockets?: number; + /** The list of disks. */ + readonly disks?: MachineDisk[]; + /** The generation of the architecture. */ + readonly generation?: string; + /** The hardware version of the machine. */ + readonly hardwareVersion?: string; + /** The maximum amount of memory. Measured in gibibytes. */ + readonly memoryCapacityGB?: number; + /** The model of the machine. */ + readonly model?: string; + /** The list of network interfaces. */ + readonly networkInterfaces?: NetworkInterface[]; + /** The count of SMT and physical core threads for this machine. */ + readonly totalThreads?: number; + /** The make of the machine. */ + readonly vendor?: string; +} + +export function machineSkuPropertiesDeserializer(item: any): MachineSkuProperties { + return { + bootstrapProtocol: item["bootstrapProtocol"], + cpuCores: item["cpuCores"], + cpuSockets: item["cpuSockets"], + disks: !item["disks"] ? item["disks"] : machineDiskArrayDeserializer(item["disks"]), + generation: item["generation"], + hardwareVersion: item["hardwareVersion"], + memoryCapacityGB: item["memoryCapacityGB"], + model: item["model"], + networkInterfaces: !item["networkInterfaces"] + ? item["networkInterfaces"] + : networkInterfaceArrayDeserializer(item["networkInterfaces"]), + totalThreads: item["totalThreads"], + vendor: item["vendor"], + }; +} + +/** The type of bootstrap protocol used. */ +export enum KnownBootstrapProtocol { + /** PXE bootstrap protocol */ + PXE = "PXE", +} + +/** + * The type of bootstrap protocol used. \ + * {@link KnownBootstrapProtocol} can be used interchangeably with BootstrapProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PXE**: PXE bootstrap protocol + */ +export type BootstrapProtocol = string; + +export function machineDiskArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return machineDiskDeserializer(item); + }); +} + +/** MachineDisk represents the properties of the disk. */ +export interface MachineDisk { + /** The maximum amount of storage. Measured in gibibytes. */ + readonly capacityGB?: number; + /** The connection type of the rack SKU resource. */ + readonly connection?: MachineSkuDiskConnectionType; + /** The disk type of rack SKU resource. */ + readonly type?: DiskType; +} + +export function machineDiskDeserializer(item: any): MachineDisk { + return { + capacityGB: item["capacityGB"], + connection: item["connection"], + type: item["type"], + }; +} + +/** The connection type of the rack SKU resource. */ +export enum KnownMachineSkuDiskConnectionType { + /** PCIE connection type */ + Pcie = "PCIE", + /** SATA connection type */ + Sata = "SATA", + /** RAID connection type */ + Raid = "RAID", + /** SAS connection type */ + SAS = "SAS", +} + +/** + * The connection type of the rack SKU resource. \ + * {@link KnownMachineSkuDiskConnectionType} can be used interchangeably with MachineSkuDiskConnectionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PCIE**: PCIE connection type \ + * **SATA**: SATA connection type \ + * **RAID**: RAID connection type \ + * **SAS**: SAS connection type + */ +export type MachineSkuDiskConnectionType = string; + +/** The disk type of rack SKU resource. */ +export enum KnownDiskType { + /** HDD disk type */ + HDD = "HDD", + /** SSD disk type */ + SSD = "SSD", +} + +/** + * The disk type of rack SKU resource. \ + * {@link KnownDiskType} can be used interchangeably with DiskType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **HDD**: HDD disk type \ + * **SSD**: SSD disk type + */ +export type DiskType = string; + +export function networkInterfaceArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return networkInterfaceDeserializer(item); + }); +} + +/** NetworkInterface represents properties of the network interface. */ +export interface NetworkInterface { + /** The partial address of Peripheral Component Interconnect (PCI). */ + readonly address?: string; + /** The connection type of the device. */ + readonly deviceConnectionType?: DeviceConnectionType; + /** The model name of the device. */ + readonly model?: string; + /** The physical slot for this device. */ + readonly physicalSlot?: number; + /** The number of ports on the device. */ + readonly portCount?: number; + /** The maximum amount of data in gigabits that the line card transmits through a port at any given second. */ + readonly portSpeed?: number; + /** The vendor name of the device. */ + readonly vendor?: string; +} + +export function networkInterfaceDeserializer(item: any): NetworkInterface { + return { + address: item["address"], + deviceConnectionType: item["deviceConnectionType"], + model: item["model"], + physicalSlot: item["physicalSlot"], + portCount: item["portCount"], + portSpeed: item["portSpeed"], + vendor: item["vendor"], + }; +} + +/** The connection type of the device. */ +export enum KnownDeviceConnectionType { + /** PCI connection type */ + PCI = "PCI", +} + +/** + * The connection type of the device. \ + * {@link KnownDeviceConnectionType} can be used interchangeably with DeviceConnectionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PCI**: PCI connection type + */ +export type DeviceConnectionType = string; + +/** The provisioning state of the rack SKU resource. */ +export enum KnownRackSkuProvisioningState { + /** The Canceled status. */ + Canceled = "Canceled", + /** The Failed status. */ + Failed = "Failed", + /** The Succeeded status. */ + Succeeded = "Succeeded", +} + +/** + * The provisioning state of the rack SKU resource. \ + * {@link KnownRackSkuProvisioningState} can be used interchangeably with RackSkuProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Canceled**: The Canceled status. \ + * **Failed**: The Failed status. \ + * **Succeeded**: The Succeeded status. + */ +export type RackSkuProvisioningState = string; + +/** The type of the rack. */ +export enum KnownRackSkuType { + /** Aggregator Rack */ + Aggregator = "Aggregator", + /** Compute Rack */ + Compute = "Compute", + /** Combination of Aggregator Rack and Compute Rack for a single rack cluster */ + Single = "Single", +} + +/** + * The type of the rack. \ + * {@link KnownRackSkuType} can be used interchangeably with RackSkuType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Aggregator**: Aggregator Rack \ + * **Compute**: Compute Rack \ + * **Single**: Combination of Aggregator Rack and Compute Rack for a single rack cluster + */ +export type RackSkuType = string; + +export function storageApplianceSkuSlotArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return storageApplianceSkuSlotDeserializer(item); + }); +} + +/** StorageApplianceSkuSlot represents the single SKU and rack slot associated with the storage appliance. */ +export interface StorageApplianceSkuSlot { + /** The position in the rack for the storage appliance. */ + readonly rackSlot?: number; + /** The maximum capacity of the storage appliance. Measured in gibibytes. */ + readonly capacityGB?: number; + /** The model of the storage appliance. */ + readonly model?: string; +} + +export function storageApplianceSkuSlotDeserializer(item: any): StorageApplianceSkuSlot { + return { + ...(!item["properties"] + ? item["properties"] + : _storageApplianceSkuSlotPropertiesDeserializer(item["properties"])), + rackSlot: item["rackSlot"], + }; +} + +/** StorageApplianceSkuProperties represents the properties of the storage appliance SKU. */ +export interface StorageApplianceSkuProperties { + /** The maximum capacity of the storage appliance. Measured in gibibytes. */ + readonly capacityGB?: number; + /** The model of the storage appliance. */ + readonly model?: string; +} + +export function storageApplianceSkuPropertiesDeserializer( + item: any, +): StorageApplianceSkuProperties { + return { + capacityGB: item["capacityGB"], + model: item["model"], + }; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +export function proxyResourceDeserializer(item: any): ProxyResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** RackSkuList represents a list of rack SKUs. */ +export interface _RackSkuList { + /** The RackSku items on this page */ + value: RackSku[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _rackSkuListDeserializer(item: any): _RackSkuList { + return { + value: rackSkuArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function rackSkuArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return rackSkuDeserializer(item); + }); +} + +/** Rack represents the hardware of the rack and is dependent upon the cluster for lifecycle. */ +export interface Rack extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** The value that will be used for machines in this rack to represent the availability zones that can be referenced by Hybrid AKS Clusters for node arrangement. */ + availabilityZone: string; + /** The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, Isle 9, Rack 2B") */ + rackLocation: string; + /** The unique identifier for the rack within Network Cloud cluster. An alternate unique alphanumeric value other than a serial number may be provided if desired. */ + rackSerialNumber: string; + /** The SKU for the rack. */ + rackSkuId: string; + /** The resource ID of the cluster the rack is created for. This value is set when the rack is created by the cluster. */ + readonly clusterId?: string; + /** The more detailed status of the rack. */ + readonly detailedStatus?: RackDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The provisioning state of the rack resource. */ + readonly provisioningState?: RackProvisioningState; +} + +export function rackSerializer(item: Rack): any { + return { + tags: item["tags"], + location: item["location"], + properties: _rackPropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function rackDeserializer(item: any): Rack { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._rackPropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** RackProperties represents the properties of the rack. */ +export interface RackProperties { + /** The value that will be used for machines in this rack to represent the availability zones that can be referenced by Hybrid AKS Clusters for node arrangement. */ + availabilityZone: string; + /** The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, Isle 9, Rack 2B") */ + rackLocation: string; + /** The unique identifier for the rack within Network Cloud cluster. An alternate unique alphanumeric value other than a serial number may be provided if desired. */ + rackSerialNumber: string; + /** The SKU for the rack. */ + rackSkuId: string; + /** The resource ID of the cluster the rack is created for. This value is set when the rack is created by the cluster. */ + readonly clusterId?: string; + /** The more detailed status of the rack. */ + readonly detailedStatus?: RackDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The provisioning state of the rack resource. */ + readonly provisioningState?: RackProvisioningState; +} + +export function rackPropertiesSerializer(item: RackProperties): any { + return { + availabilityZone: item["availabilityZone"], + rackLocation: item["rackLocation"], + rackSerialNumber: item["rackSerialNumber"], + rackSkuId: item["rackSkuId"], + }; +} + +export function rackPropertiesDeserializer(item: any): RackProperties { + return { + availabilityZone: item["availabilityZone"], + rackLocation: item["rackLocation"], + rackSerialNumber: item["rackSerialNumber"], + rackSkuId: item["rackSkuId"], + clusterId: item["clusterId"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + provisioningState: item["provisioningState"], + }; +} + +/** The more detailed status of the rack. */ +export enum KnownRackDetailedStatus { + /** The Error status. */ + Error = "Error", + /** The Available status. */ + Available = "Available", + /** The Provisioning status. */ + Provisioning = "Provisioning", +} + +/** + * The more detailed status of the rack. \ + * {@link KnownRackDetailedStatus} can be used interchangeably with RackDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Error**: The Error status. \ + * **Available**: The Available status. \ + * **Provisioning**: The Provisioning status. + */ +export type RackDetailedStatus = string; + +/** The provisioning state of the rack resource. */ +export enum KnownRackProvisioningState { + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Failed status. */ + Failed = "Failed", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Accepted status. */ + Accepted = "Accepted", +} + +/** + * The provisioning state of the rack resource. \ + * {@link KnownRackProvisioningState} can be used interchangeably with RackProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The Succeeded status. \ + * **Failed**: The Failed status. \ + * **Canceled**: The Canceled status. \ + * **Provisioning**: The Provisioning status. \ + * **Accepted**: The Accepted status. + */ +export type RackProvisioningState = string; + +/** RackPatchParameters represents the body of the request to patch the rack properties. */ +export interface RackPatchParameters { + /** Resource tags. */ + tags?: Record; + /** The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, Isle 9, Rack 2B") */ + rackLocation?: string; + /** The globally unique identifier for the rack. */ + rackSerialNumber?: string; +} + +export function rackPatchParametersSerializer(item: RackPatchParameters): any { + return { + properties: areAllPropsUndefined(item, ["rackLocation", "rackSerialNumber"]) + ? undefined + : _rackPatchParametersPropertiesSerializer(item), + tags: item["tags"], + }; +} + +/** RacksPatchProperties represents the properties of the rack during patching. */ +export interface RacksPatchProperties { + /** The free-form description of the rack location. (e.g. "DTN Datacenter, Floor 3, Isle 9, Rack 2B") */ + rackLocation?: string; + /** The globally unique identifier for the rack. */ + rackSerialNumber?: string; +} + +export function racksPatchPropertiesSerializer(item: RacksPatchProperties): any { + return { rackLocation: item["rackLocation"], rackSerialNumber: item["rackSerialNumber"] }; +} + +/** RackList represents a list of racks. */ +export interface _RackList { + /** The Rack items on this page */ + value: Rack[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _rackListDeserializer(item: any): _RackList { + return { + value: rackArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function rackArraySerializer(result: Array): any[] { + return result.map((item) => { + return rackSerializer(item); + }); +} + +export function rackArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return rackDeserializer(item); + }); +} + +/** StorageAppliance represents on-premises Network Cloud storage appliance. */ +export interface StorageAppliance extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** The credentials of the administrative interface on this storage appliance. */ + administratorCredentials: AdministrativeCredentials; + /** The resource ID of the rack where this storage appliance resides. */ + rackId: string; + /** The slot the storage appliance is in the rack based on the BOM configuration. */ + rackSlot: number; + /** The serial number for the storage appliance. */ + serialNumber: string; + /** The SKU for the storage appliance. */ + storageApplianceSkuId: string; + /** The CA certificate information issued by the platform for connecting to TLS interfaces for the storage appliance. Callers add this certificate to their trusted CA store to allow secure communication with the storage appliance. */ + readonly caCertificate?: CertificateInfo; + /** The total capacity of the storage appliance. Measured in GiB. */ + readonly capacity?: number; + /** The amount of storage consumed. Measured in GiB. */ + readonly capacityUsed?: number; + /** The resource ID of the cluster this storage appliance is associated with. */ + readonly clusterId?: string; + /** The detailed status of the storage appliance. */ + readonly detailedStatus?: StorageApplianceDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The list of expansion shelves connected to the storage appliance. */ + readonly expansionShelves?: StorageApplianceExpansionShelf[]; + /** The endpoint for the management interface of the storage appliance. */ + readonly managementIpv4Address?: string; + /** The manufacturer of the storage appliance. */ + readonly manufacturer?: string; + /** The model of the storage appliance. */ + readonly model?: string; + /** The monitoring configuration status of the storage appliance. */ + readonly monitoringConfigurationStatus?: StorageApplianceMonitoringConfigurationStatus; + /** The indicator of whether the storage appliance supports remote vendor management. */ + readonly remoteVendorManagementFeature?: RemoteVendorManagementFeature; + /** The indicator of whether the remote vendor management feature is enabled or disabled, or unsupported if it is an unsupported feature. */ + readonly remoteVendorManagementStatus?: RemoteVendorManagementStatus; + /** The list of statuses that represent secret rotation activity. */ + readonly secretRotationStatus?: SecretRotationStatus[]; + /** The version of the storage appliance. */ + readonly version?: string; + /** The provisioning state of the storage appliance. */ + readonly provisioningState?: StorageApplianceProvisioningState; +} + +export function storageApplianceSerializer(item: StorageAppliance): any { + return { + tags: item["tags"], + location: item["location"], + properties: _storageAppliancePropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function storageApplianceDeserializer(item: any): StorageAppliance { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._storageAppliancePropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** StorageApplianceProperties represents the properties of the storage appliance. */ +export interface StorageApplianceProperties { + /** The credentials of the administrative interface on this storage appliance. */ + administratorCredentials: AdministrativeCredentials; + /** The resource ID of the rack where this storage appliance resides. */ + rackId: string; + /** The slot the storage appliance is in the rack based on the BOM configuration. */ + rackSlot: number; + /** The serial number for the storage appliance. */ + serialNumber: string; + /** The SKU for the storage appliance. */ + storageApplianceSkuId: string; + /** The CA certificate information issued by the platform for connecting to TLS interfaces for the storage appliance. Callers add this certificate to their trusted CA store to allow secure communication with the storage appliance. */ + readonly caCertificate?: CertificateInfo; + /** The total capacity of the storage appliance. Measured in GiB. */ + readonly capacity?: number; + /** The amount of storage consumed. Measured in GiB. */ + readonly capacityUsed?: number; + /** The resource ID of the cluster this storage appliance is associated with. */ + readonly clusterId?: string; + /** The detailed status of the storage appliance. */ + readonly detailedStatus?: StorageApplianceDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The list of expansion shelves connected to the storage appliance. */ + readonly expansionShelves?: StorageApplianceExpansionShelf[]; + /** The endpoint for the management interface of the storage appliance. */ + readonly managementIpv4Address?: string; + /** The manufacturer of the storage appliance. */ + readonly manufacturer?: string; + /** The model of the storage appliance. */ + readonly model?: string; + /** The monitoring configuration status of the storage appliance. */ + readonly monitoringConfigurationStatus?: StorageApplianceMonitoringConfigurationStatus; + /** The indicator of whether the storage appliance supports remote vendor management. */ + readonly remoteVendorManagementFeature?: RemoteVendorManagementFeature; + /** The indicator of whether the remote vendor management feature is enabled or disabled, or unsupported if it is an unsupported feature. */ + readonly remoteVendorManagementStatus?: RemoteVendorManagementStatus; + /** The list of statuses that represent secret rotation activity. */ + readonly secretRotationStatus?: SecretRotationStatus[]; + /** The version of the storage appliance. */ + readonly version?: string; + /** The provisioning state of the storage appliance. */ + readonly provisioningState?: StorageApplianceProvisioningState; +} + +export function storageAppliancePropertiesSerializer(item: StorageApplianceProperties): any { + return { + administratorCredentials: administrativeCredentialsSerializer(item["administratorCredentials"]), + rackId: item["rackId"], + rackSlot: item["rackSlot"], + serialNumber: item["serialNumber"], + storageApplianceSkuId: item["storageApplianceSkuId"], + }; +} + +export function storageAppliancePropertiesDeserializer(item: any): StorageApplianceProperties { + return { + administratorCredentials: administrativeCredentialsDeserializer( + item["administratorCredentials"], + ), + rackId: item["rackId"], + rackSlot: item["rackSlot"], + serialNumber: item["serialNumber"], + storageApplianceSkuId: item["storageApplianceSkuId"], + caCertificate: !item["caCertificate"] + ? item["caCertificate"] + : certificateInfoDeserializer(item["caCertificate"]), + capacity: item["capacity"], + capacityUsed: item["capacityUsed"], + clusterId: item["clusterId"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + expansionShelves: !item["expansionShelves"] + ? item["expansionShelves"] + : storageApplianceExpansionShelfArrayDeserializer(item["expansionShelves"]), + managementIpv4Address: item["managementIpv4Address"], + manufacturer: item["manufacturer"], + model: item["model"], + monitoringConfigurationStatus: !item["monitoringConfigurationStatus"] + ? item["monitoringConfigurationStatus"] + : storageApplianceMonitoringConfigurationStatusDeserializer( + item["monitoringConfigurationStatus"], + ), + remoteVendorManagementFeature: item["remoteVendorManagementFeature"], + remoteVendorManagementStatus: item["remoteVendorManagementStatus"], + secretRotationStatus: !item["secretRotationStatus"] + ? item["secretRotationStatus"] + : secretRotationStatusArrayDeserializer(item["secretRotationStatus"]), + version: item["version"], + provisioningState: item["provisioningState"], + }; +} + +/** The detailed status of the storage appliance. */ +export enum KnownStorageApplianceDetailedStatus { + /** The Available status. */ + Available = "Available", + /** The Degraded status. */ + Degraded = "Degraded", + /** The Error status. */ + Error = "Error", + /** The Provisioning status. */ + Provisioning = "Provisioning", +} + +/** + * The detailed status of the storage appliance. \ + * {@link KnownStorageApplianceDetailedStatus} can be used interchangeably with StorageApplianceDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Available**: The Available status. \ + * **Degraded**: The Degraded status. \ + * **Error**: The Error status. \ + * **Provisioning**: The Provisioning status. + */ +export type StorageApplianceDetailedStatus = string; + +export function storageApplianceExpansionShelfArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return storageApplianceExpansionShelfDeserializer(item); + }); +} + +/** StorageApplianceExpansionShelf represents an expansion shelf connected to a storage appliance. */ +export interface StorageApplianceExpansionShelf { + /** The model of the expansion shelf. */ + model?: string; + /** The version of the expansion shelf. */ + version?: string; +} + +export function storageApplianceExpansionShelfDeserializer( + item: any, +): StorageApplianceExpansionShelf { + return { + model: item["model"], + version: item["version"], + }; +} + +/** The monitoring configuration status of the storage appliance. */ +export interface StorageApplianceMonitoringConfigurationStatus { + /** The log level for the monitoring configuration status of the storage appliance. */ + logLevel?: StorageApplianceMetricsConfigurationStatusLogLevel; + /** The metrics level for the monitoring configuration status of the storage appliance. */ + metricsLevel?: StorageApplianceMetricsConfigurationStatusMetricsLevel; +} + +export function storageApplianceMonitoringConfigurationStatusDeserializer( + item: any, +): StorageApplianceMonitoringConfigurationStatus { + return { + logLevel: item["logLevel"], + metricsLevel: item["metricsLevel"], + }; +} + +/** The log level for the monitoring configuration status of the storage appliance. */ +export enum KnownStorageApplianceMetricsConfigurationStatusLogLevel { + /** Logs are emitted at the default log level. */ + Default = "Default", + /** Logs are emitted at the Nexus log level. */ + Nexus = "Nexus", +} + +/** + * The log level for the monitoring configuration status of the storage appliance. \ + * {@link KnownStorageApplianceMetricsConfigurationStatusLogLevel} can be used interchangeably with StorageApplianceMetricsConfigurationStatusLogLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default**: Logs are emitted at the default log level. \ + * **Nexus**: Logs are emitted at the Nexus log level. + */ +export type StorageApplianceMetricsConfigurationStatusLogLevel = string; + +/** The metrics level for the monitoring configuration status of the storage appliance. */ +export enum KnownStorageApplianceMetricsConfigurationStatusMetricsLevel { + /** Metrics are emitted at the default metrics level. */ + Default = "Default", + /** Metrics are emitted at the Nexus metrics level. */ + Nexus = "Nexus", +} + +/** + * The metrics level for the monitoring configuration status of the storage appliance. \ + * {@link KnownStorageApplianceMetricsConfigurationStatusMetricsLevel} can be used interchangeably with StorageApplianceMetricsConfigurationStatusMetricsLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default**: Metrics are emitted at the default metrics level. \ + * **Nexus**: Metrics are emitted at the Nexus metrics level. + */ +export type StorageApplianceMetricsConfigurationStatusMetricsLevel = string; + +/** The indicator of whether the storage appliance supports remote vendor management. */ +export enum KnownRemoteVendorManagementFeature { + /** Remote vendor management is supported. */ + Supported = "Supported", + /** Remote vendor management is unsupported. */ + Unsupported = "Unsupported", +} + +/** + * The indicator of whether the storage appliance supports remote vendor management. \ + * {@link KnownRemoteVendorManagementFeature} can be used interchangeably with RemoteVendorManagementFeature, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Supported**: Remote vendor management is supported. \ + * **Unsupported**: Remote vendor management is unsupported. + */ +export type RemoteVendorManagementFeature = string; + +/** The indicator of whether the remote vendor management feature is enabled or disabled, or unsupported if it is an unsupported feature. */ +export enum KnownRemoteVendorManagementStatus { + /** Remote vendor management is enabled. */ + Enabled = "Enabled", + /** Remote vendor management is disabled. */ + Disabled = "Disabled", + /** Remote vendor management is unsupported. */ + Unsupported = "Unsupported", +} + +/** + * The indicator of whether the remote vendor management feature is enabled or disabled, or unsupported if it is an unsupported feature. \ + * {@link KnownRemoteVendorManagementStatus} can be used interchangeably with RemoteVendorManagementStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Remote vendor management is enabled. \ + * **Disabled**: Remote vendor management is disabled. \ + * **Unsupported**: Remote vendor management is unsupported. + */ +export type RemoteVendorManagementStatus = string; + +/** The provisioning state of the storage appliance. */ +export enum KnownStorageApplianceProvisioningState { + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Failed status. */ + Failed = "Failed", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Accepted status. */ + Accepted = "Accepted", +} + +/** + * The provisioning state of the storage appliance. \ + * {@link KnownStorageApplianceProvisioningState} can be used interchangeably with StorageApplianceProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The Succeeded status. \ + * **Failed**: The Failed status. \ + * **Canceled**: The Canceled status. \ + * **Provisioning**: The Provisioning status. \ + * **Accepted**: The Accepted status. + */ +export type StorageApplianceProvisioningState = string; + +/** StorageAppliancePatchParameters represents the body of the request to patch storage appliance properties. */ +export interface StorageAppliancePatchParameters { + /** Resource tags. */ + tags?: Record; + /** The serial number for the storage appliance. */ + serialNumber?: string; +} + +export function storageAppliancePatchParametersSerializer( + item: StorageAppliancePatchParameters, +): any { + return { + properties: areAllPropsUndefined(item, ["serialNumber"]) + ? undefined + : _storageAppliancePatchParametersPropertiesSerializer(item), + tags: item["tags"], + }; +} + +/** StorageAppliancePatchProperties represents the properties of the storage appliance that can be patched. */ +export interface StorageAppliancePatchProperties { + /** The serial number for the storage appliance. */ + serialNumber?: string; +} + +export function storageAppliancePatchPropertiesSerializer( + item: StorageAppliancePatchProperties, +): any { + return { serialNumber: item["serialNumber"] }; +} + +/** StorageApplianceList represents a list of storage appliances. */ +export interface _StorageApplianceList { + /** The StorageAppliance items on this page */ + value: StorageAppliance[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _storageApplianceListDeserializer(item: any): _StorageApplianceList { + return { + value: storageApplianceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function storageApplianceArraySerializer(result: Array): any[] { + return result.map((item) => { + return storageApplianceSerializer(item); + }); +} + +export function storageApplianceArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return storageApplianceDeserializer(item); + }); +} + +/** StorageApplianceEnableRemoteVendorManagementParameters represents the body of the request to enable remote vendor management of a storage appliance. */ +export interface StorageApplianceEnableRemoteVendorManagementParameters { + /** Field Deprecated. This field is not used and will be rejected if provided. The list of IPv4 subnets (in CIDR format), IPv6 subnets (in CIDR format), or hostnames that the storage appliance needs accessible in order to turn on the remote vendor management. */ + supportEndpoints?: string[]; +} + +export function storageApplianceEnableRemoteVendorManagementParametersSerializer( + item: StorageApplianceEnableRemoteVendorManagementParameters, +): any { + return { + supportEndpoints: !item["supportEndpoints"] + ? item["supportEndpoints"] + : item["supportEndpoints"].map((p: any) => { + return p; + }), + }; +} + +/** StorageApplianceRunReadCommandsParameters represents the body of request containing list of read-only commands to run on the storage appliance. */ +export interface StorageApplianceRunReadCommandsParameters { + /** The list of read-only commands to be executed directly against the target storage appliance. */ + commands: StorageApplianceCommandSpecification[]; + /** The maximum time the commands are allowed to run. */ + limitTimeSeconds: number; +} + +export function storageApplianceRunReadCommandsParametersSerializer( + item: StorageApplianceRunReadCommandsParameters, +): any { + return { + commands: storageApplianceCommandSpecificationArraySerializer(item["commands"]), + limitTimeSeconds: item["limitTimeSeconds"], + }; +} + +export function storageApplianceCommandSpecificationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return storageApplianceCommandSpecificationSerializer(item); + }); +} + +/** StorageApplianceCommandSpecification represents the command and optional arguments to run. */ +export interface StorageApplianceCommandSpecification { + /** The list of strings that will be passed to the script in order as separate arguments. */ + arguments?: string[]; + /** The command to execute. */ + command: string; +} + +export function storageApplianceCommandSpecificationSerializer( + item: StorageApplianceCommandSpecification, +): any { + return { + arguments: !item["arguments"] + ? item["arguments"] + : item["arguments"].map((p: any) => { + return p; + }), + command: item["command"], + }; +} + +/** TrunkedNetwork represents a network that utilizes multiple isolation domains and specified VLANs to create a trunked network. */ +export interface TrunkedNetwork extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS. */ + hybridAksPluginType?: HybridAksPluginType; + /** The default interface name for this trunked network in the virtual machine. This name can be overridden by the name supplied in the network attachment configuration of that virtual machine. */ + interfaceName?: string; + /** The list of resource IDs representing the Network Fabric isolation domains. It can be any combination of l2IsolationDomain and l3IsolationDomain resources. */ + isolationDomainIds: string[]; + /** The list of vlans that are selected from the isolation domains for trunking. */ + vlans: number[]; + /** The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. */ + readonly associatedResourceIds?: string[]; + /** The resource ID of the Network Cloud cluster this trunked network is associated with. */ + readonly clusterId?: string; + /** The more detailed status of the trunked network. */ + readonly detailedStatus?: TrunkedNetworkDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are associated with this trunked network. */ + readonly hybridAksClustersAssociatedIds?: string[]; + /** Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this trunked network. */ + readonly virtualMachinesAssociatedIds?: string[]; + /** The provisioning state of the trunked network. */ + readonly provisioningState?: TrunkedNetworkProvisioningState; +} + +export function trunkedNetworkSerializer(item: TrunkedNetwork): any { + return { + tags: item["tags"], + location: item["location"], + properties: _trunkedNetworkPropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function trunkedNetworkDeserializer(item: any): TrunkedNetwork { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._trunkedNetworkPropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** TrunkedNetworkProperties represents properties of the trunked network. */ +export interface TrunkedNetworkProperties { + /** Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS. */ + hybridAksPluginType?: HybridAksPluginType; + /** The default interface name for this trunked network in the virtual machine. This name can be overridden by the name supplied in the network attachment configuration of that virtual machine. */ + interfaceName?: string; + /** The list of resource IDs representing the Network Fabric isolation domains. It can be any combination of l2IsolationDomain and l3IsolationDomain resources. */ + isolationDomainIds: string[]; + /** The list of vlans that are selected from the isolation domains for trunking. */ + vlans: number[]; + /** The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network. */ + readonly associatedResourceIds?: string[]; + /** The resource ID of the Network Cloud cluster this trunked network is associated with. */ + readonly clusterId?: string; + /** The more detailed status of the trunked network. */ + readonly detailedStatus?: TrunkedNetworkDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are associated with this trunked network. */ + readonly hybridAksClustersAssociatedIds?: string[]; + /** Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this trunked network. */ + readonly virtualMachinesAssociatedIds?: string[]; + /** The provisioning state of the trunked network. */ + readonly provisioningState?: TrunkedNetworkProvisioningState; +} + +export function trunkedNetworkPropertiesSerializer(item: TrunkedNetworkProperties): any { + return { + hybridAksPluginType: item["hybridAksPluginType"], + interfaceName: item["interfaceName"], + isolationDomainIds: item["isolationDomainIds"].map((p: any) => { + return p; + }), + vlans: item["vlans"].map((p: any) => { + return p; + }), + }; +} + +export function trunkedNetworkPropertiesDeserializer(item: any): TrunkedNetworkProperties { + return { + hybridAksPluginType: item["hybridAksPluginType"], + interfaceName: item["interfaceName"], + isolationDomainIds: item["isolationDomainIds"].map((p: any) => { + return p; + }), + vlans: item["vlans"].map((p: any) => { + return p; + }), + associatedResourceIds: !item["associatedResourceIds"] + ? item["associatedResourceIds"] + : item["associatedResourceIds"].map((p: any) => { + return p; + }), + clusterId: item["clusterId"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + hybridAksClustersAssociatedIds: !item["hybridAksClustersAssociatedIds"] + ? item["hybridAksClustersAssociatedIds"] + : item["hybridAksClustersAssociatedIds"].map((p: any) => { + return p; + }), + virtualMachinesAssociatedIds: !item["virtualMachinesAssociatedIds"] + ? item["virtualMachinesAssociatedIds"] + : item["virtualMachinesAssociatedIds"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +/** The more detailed status of the trunked network. */ +export enum KnownTrunkedNetworkDetailedStatus { + /** The Error status. */ + Error = "Error", + /** The Available status. */ + Available = "Available", + /** The Provisioning status. */ + Provisioning = "Provisioning", +} + +/** + * The more detailed status of the trunked network. \ + * {@link KnownTrunkedNetworkDetailedStatus} can be used interchangeably with TrunkedNetworkDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Error**: The Error status. \ + * **Available**: The Available status. \ + * **Provisioning**: The Provisioning status. + */ +export type TrunkedNetworkDetailedStatus = string; + +/** The provisioning state of the trunked network. */ +export enum KnownTrunkedNetworkProvisioningState { + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Failed status. */ + Failed = "Failed", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Accepted status. */ + Accepted = "Accepted", +} + +/** + * The provisioning state of the trunked network. \ + * {@link KnownTrunkedNetworkProvisioningState} can be used interchangeably with TrunkedNetworkProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The Succeeded status. \ + * **Failed**: The Failed status. \ + * **Canceled**: The Canceled status. \ + * **Provisioning**: The Provisioning status. \ + * **Accepted**: The Accepted status. + */ +export type TrunkedNetworkProvisioningState = string; + +/** TrunkedNetworkPatchParameters represents the body of the request to patch the Trunked network. */ +export interface TrunkedNetworkPatchParameters { + /** Resource tags. */ + tags?: Record; +} + +export function trunkedNetworkPatchParametersSerializer(item: TrunkedNetworkPatchParameters): any { + return { tags: item["tags"] }; +} + +/** TrunkedNetworkList represents a list of trunked networks. */ +export interface _TrunkedNetworkList { + /** The TrunkedNetwork items on this page */ + value: TrunkedNetwork[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _trunkedNetworkListDeserializer(item: any): _TrunkedNetworkList { + return { + value: trunkedNetworkArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function trunkedNetworkArraySerializer(result: Array): any[] { + return result.map((item) => { + return trunkedNetworkSerializer(item); + }); +} + +export function trunkedNetworkArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return trunkedNetworkDeserializer(item); + }); +} + +/** VirtualMachine represents the on-premises Network Cloud virtual machine. */ +export interface VirtualMachine extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; + /** The name of the administrator to which the ssh public keys will be added into the authorized keys. */ + adminUsername: string; + /** Selects the boot method for the virtual machine. */ + bootMethod?: VirtualMachineBootMethod; + /** The cloud service network that provides platform-level services for the virtual machine. */ + cloudServicesNetworkAttachment: NetworkAttachment; + /** The number of CPU cores in the virtual machine. */ + cpuCores: number; + /** 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. */ + isolateEmulatorThread?: VirtualMachineIsolateEmulatorThread; + /** The memory size of the virtual machine. Allocations are measured in gibibytes. */ + memorySizeGB: number; + /** The list of network attachments to the virtual machine. */ + networkAttachments?: NetworkAttachment[]; + /** Field Deprecated: The Base64 encoded cloud-init network data. The networkDataContent property will be used in preference to this property. */ + networkData?: string; + /** The Base64 encoded cloud-init network data. */ + networkDataContent?: string; + /** The scheduling hints for the virtual machine. */ + placementHints?: VirtualMachinePlacementHint[]; + /** The list of ssh public keys. Each key will be added to the virtual machine using the cloud-init ssh_authorized_keys mechanism for the adminUsername. */ + sshPublicKeys?: SshPublicKey[]; + /** The storage profile that specifies size and other parameters about the disks related to the virtual machine. */ + storageProfile: StorageProfile; + /** Field Deprecated: The Base64 encoded cloud-init user data. The userDataContent property will be used in preference to this property. */ + userData?: string; + /** The Base64 encoded cloud-init user data. */ + userDataContent?: string; + /** Field Deprecated, use virtualizationModel instead. The type of the virtio interface. */ + virtioInterface?: VirtualMachineVirtioInterfaceType; + /** The type of the device model to use. */ + vmDeviceModel?: VirtualMachineDeviceModelType; + /** The virtual machine image that is currently provisioned to the OS disk, using the full url and tag notation used to pull the image. */ + vmImage: string; + /** The credentials used to login to the image repository that has access to the specified image. */ + vmImageRepositoryCredentials?: ImageRepositoryCredentials; + /** The cluster availability zone containing this virtual machine. */ + readonly availabilityZone?: string; + /** The resource ID of the bare metal machine that hosts the virtual machine. */ + readonly bareMetalMachineId?: string; + /** The resource ID of the cluster the virtual machine is created for. */ + readonly clusterId?: string; + /** The extended location to use for creation of a VM console resource. */ + consoleExtendedLocation?: ExtendedLocation; + /** The more detailed status of the virtual machine. */ + readonly detailedStatus?: VirtualMachineDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The power state of the virtual machine. */ + readonly powerState?: VirtualMachinePowerState; + /** The resource IDs of volumes that are attached to the virtual machine. */ + readonly volumes?: string[]; + /** The provisioning state of the virtual machine. */ + readonly provisioningState?: VirtualMachineProvisioningState; +} + +export function virtualMachineSerializer(item: VirtualMachine): any { + return { + tags: item["tags"], + location: item["location"], + properties: _virtualMachinePropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentitySerializer(item["identity"]), + }; +} + +export function virtualMachineDeserializer(item: any): VirtualMachine { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._virtualMachinePropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentityDeserializer(item["identity"]), + }; +} + +/** VirtualMachineProperties represents the properties of the virtual machine. */ +export interface VirtualMachineProperties { + /** The name of the administrator to which the ssh public keys will be added into the authorized keys. */ + adminUsername: string; + /** Selects the boot method for the virtual machine. */ + bootMethod?: VirtualMachineBootMethod; + /** The cloud service network that provides platform-level services for the virtual machine. */ + cloudServicesNetworkAttachment: NetworkAttachment; + /** The number of CPU cores in the virtual machine. */ + cpuCores: number; + /** 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. */ + isolateEmulatorThread?: VirtualMachineIsolateEmulatorThread; + /** The memory size of the virtual machine. Allocations are measured in gibibytes. */ + memorySizeGB: number; + /** The list of network attachments to the virtual machine. */ + networkAttachments?: NetworkAttachment[]; + /** Field Deprecated: The Base64 encoded cloud-init network data. The networkDataContent property will be used in preference to this property. */ + networkData?: string; + /** The Base64 encoded cloud-init network data. */ + networkDataContent?: string; + /** The scheduling hints for the virtual machine. */ + placementHints?: VirtualMachinePlacementHint[]; + /** The list of ssh public keys. Each key will be added to the virtual machine using the cloud-init ssh_authorized_keys mechanism for the adminUsername. */ + sshPublicKeys?: SshPublicKey[]; + /** The storage profile that specifies size and other parameters about the disks related to the virtual machine. */ + storageProfile: StorageProfile; + /** Field Deprecated: The Base64 encoded cloud-init user data. The userDataContent property will be used in preference to this property. */ + userData?: string; + /** The Base64 encoded cloud-init user data. */ + userDataContent?: string; + /** Field Deprecated, use virtualizationModel instead. The type of the virtio interface. */ + virtioInterface?: VirtualMachineVirtioInterfaceType; + /** The type of the device model to use. */ + vmDeviceModel?: VirtualMachineDeviceModelType; + /** The virtual machine image that is currently provisioned to the OS disk, using the full url and tag notation used to pull the image. */ + vmImage: string; + /** The credentials used to login to the image repository that has access to the specified image. */ + vmImageRepositoryCredentials?: ImageRepositoryCredentials; + /** The cluster availability zone containing this virtual machine. */ + readonly availabilityZone?: string; + /** The resource ID of the bare metal machine that hosts the virtual machine. */ + readonly bareMetalMachineId?: string; + /** The resource ID of the cluster the virtual machine is created for. */ + readonly clusterId?: string; + /** The extended location to use for creation of a VM console resource. */ + consoleExtendedLocation?: ExtendedLocation; + /** The more detailed status of the virtual machine. */ + readonly detailedStatus?: VirtualMachineDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The power state of the virtual machine. */ + readonly powerState?: VirtualMachinePowerState; + /** The resource IDs of volumes that are attached to the virtual machine. */ + readonly volumes?: string[]; + /** The provisioning state of the virtual machine. */ + readonly provisioningState?: VirtualMachineProvisioningState; +} + +export function virtualMachinePropertiesSerializer(item: VirtualMachineProperties): any { + return { + adminUsername: item["adminUsername"], + bootMethod: item["bootMethod"], + cloudServicesNetworkAttachment: networkAttachmentSerializer( + item["cloudServicesNetworkAttachment"], + ), + cpuCores: item["cpuCores"], + isolateEmulatorThread: item["isolateEmulatorThread"], + memorySizeGB: item["memorySizeGB"], + networkAttachments: !item["networkAttachments"] + ? item["networkAttachments"] + : networkAttachmentArraySerializer(item["networkAttachments"]), + networkData: item["networkData"], + networkDataContent: item["networkDataContent"], + placementHints: !item["placementHints"] + ? item["placementHints"] + : virtualMachinePlacementHintArraySerializer(item["placementHints"]), + sshPublicKeys: !item["sshPublicKeys"] + ? item["sshPublicKeys"] + : sshPublicKeyArraySerializer(item["sshPublicKeys"]), + storageProfile: storageProfileSerializer(item["storageProfile"]), + userData: item["userData"], + userDataContent: item["userDataContent"], + virtioInterface: item["virtioInterface"], + vmDeviceModel: item["vmDeviceModel"], + vmImage: item["vmImage"], + vmImageRepositoryCredentials: !item["vmImageRepositoryCredentials"] + ? item["vmImageRepositoryCredentials"] + : imageRepositoryCredentialsSerializer(item["vmImageRepositoryCredentials"]), + consoleExtendedLocation: !item["consoleExtendedLocation"] + ? item["consoleExtendedLocation"] + : extendedLocationSerializer(item["consoleExtendedLocation"]), + }; +} + +export function virtualMachinePropertiesDeserializer(item: any): VirtualMachineProperties { + return { + adminUsername: item["adminUsername"], + bootMethod: item["bootMethod"], + cloudServicesNetworkAttachment: networkAttachmentDeserializer( + item["cloudServicesNetworkAttachment"], + ), + cpuCores: item["cpuCores"], + isolateEmulatorThread: item["isolateEmulatorThread"], + memorySizeGB: item["memorySizeGB"], + networkAttachments: !item["networkAttachments"] + ? item["networkAttachments"] + : networkAttachmentArrayDeserializer(item["networkAttachments"]), + networkData: item["networkData"], + networkDataContent: item["networkDataContent"], + placementHints: !item["placementHints"] + ? item["placementHints"] + : virtualMachinePlacementHintArrayDeserializer(item["placementHints"]), + sshPublicKeys: !item["sshPublicKeys"] + ? item["sshPublicKeys"] + : sshPublicKeyArrayDeserializer(item["sshPublicKeys"]), + storageProfile: storageProfileDeserializer(item["storageProfile"]), + userData: item["userData"], + userDataContent: item["userDataContent"], + virtioInterface: item["virtioInterface"], + vmDeviceModel: item["vmDeviceModel"], + vmImage: item["vmImage"], + vmImageRepositoryCredentials: !item["vmImageRepositoryCredentials"] + ? item["vmImageRepositoryCredentials"] + : imageRepositoryCredentialsDeserializer(item["vmImageRepositoryCredentials"]), + availabilityZone: item["availabilityZone"], + bareMetalMachineId: item["bareMetalMachineId"], + clusterId: item["clusterId"], + consoleExtendedLocation: !item["consoleExtendedLocation"] + ? item["consoleExtendedLocation"] + : extendedLocationDeserializer(item["consoleExtendedLocation"]), + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + powerState: item["powerState"], + volumes: !item["volumes"] + ? item["volumes"] + : item["volumes"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +/** Selects the boot method for the virtual machine. */ +export enum KnownVirtualMachineBootMethod { + /** BIOS boot mode. */ + Bios = "BIOS", + /** UEFI boot mode. */ + Uefi = "UEFI", +} + +/** + * Selects the boot method for the virtual machine. \ + * {@link KnownVirtualMachineBootMethod} can be used interchangeably with VirtualMachineBootMethod, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **BIOS**: BIOS boot mode. \ + * **UEFI**: UEFI boot mode. + */ +export type VirtualMachineBootMethod = string; + +/** 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. */ +export enum KnownVirtualMachineIsolateEmulatorThread { + /** Do not isolate the emulator thread. */ + False = "False", + /** Isolate the emulator thread. */ + True = "True", +} + +/** + * 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. \ + * {@link KnownVirtualMachineIsolateEmulatorThread} can be used interchangeably with VirtualMachineIsolateEmulatorThread, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **False**: Do not isolate the emulator thread. \ + * **True**: Isolate the emulator thread. + */ +export type VirtualMachineIsolateEmulatorThread = string; + +export function virtualMachinePlacementHintArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualMachinePlacementHintSerializer(item); + }); +} + +export function virtualMachinePlacementHintArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return virtualMachinePlacementHintDeserializer(item); + }); +} + +/** VirtualMachinePlacementHint represents a single scheduling hint of the virtual machine. */ +export interface VirtualMachinePlacementHint { + /** The specification of whether this hint supports affinity or anti-affinity with the referenced resources. */ + hintType: VirtualMachinePlacementHintType; + /** The resource ID of the target object that the placement hints will be checked against, e.g., the bare metal node to host the virtual machine. */ + resourceId: string; + /** The indicator of whether the hint is a hard or soft requirement during scheduling. */ + schedulingExecution: VirtualMachineSchedulingExecution; + /** The scope for the virtual machine affinity or anti-affinity placement hint. It should always be "Machine" in the case of node affinity. */ + scope: VirtualMachinePlacementHintPodAffinityScope; +} + +export function virtualMachinePlacementHintSerializer(item: VirtualMachinePlacementHint): any { + return { + hintType: item["hintType"], + resourceId: item["resourceId"], + schedulingExecution: item["schedulingExecution"], + scope: item["scope"], + }; +} + +export function virtualMachinePlacementHintDeserializer(item: any): VirtualMachinePlacementHint { + return { + hintType: item["hintType"], + resourceId: item["resourceId"], + schedulingExecution: item["schedulingExecution"], + scope: item["scope"], + }; +} + +/** The specification of whether this hint supports affinity or anti-affinity with the referenced resources. */ +export enum KnownVirtualMachinePlacementHintType { + /** The virtual machine has affinity with the referenced resources. */ + Affinity = "Affinity", + /** The virtual machine has anti-affinity with the referenced resources. */ + AntiAffinity = "AntiAffinity", +} + +/** + * The specification of whether this hint supports affinity or anti-affinity with the referenced resources. \ + * {@link KnownVirtualMachinePlacementHintType} can be used interchangeably with VirtualMachinePlacementHintType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Affinity**: The virtual machine has affinity with the referenced resources. \ + * **AntiAffinity**: The virtual machine has anti-affinity with the referenced resources. + */ +export type VirtualMachinePlacementHintType = string; + +/** The indicator of whether the hint is a hard or soft requirement during scheduling. */ +export enum KnownVirtualMachineSchedulingExecution { + /** The hint is a requirement during scheduling. */ + Hard = "Hard", + /** The hint is applied using a best-effort approach during scheduling. */ + Soft = "Soft", +} + +/** + * The indicator of whether the hint is a hard or soft requirement during scheduling. \ + * {@link KnownVirtualMachineSchedulingExecution} can be used interchangeably with VirtualMachineSchedulingExecution, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Hard**: The hint is a requirement during scheduling. \ + * **Soft**: The hint is applied using a best-effort approach during scheduling. + */ +export type VirtualMachineSchedulingExecution = string; + +/** The scope for the virtual machine affinity or anti-affinity placement hint. It should always be "Machine" in the case of node affinity. */ +export enum KnownVirtualMachinePlacementHintPodAffinityScope { + /** The virtual machine placement hint is scoped to the bare metal machine. */ + Machine = "Machine", + /** The virtual machine placement hint is scoped to the rack. */ + Rack = "Rack", +} + +/** + * The scope for the virtual machine affinity or anti-affinity placement hint. It should always be "Machine" in the case of node affinity. \ + * {@link KnownVirtualMachinePlacementHintPodAffinityScope} can be used interchangeably with VirtualMachinePlacementHintPodAffinityScope, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Machine**: The virtual machine placement hint is scoped to the bare metal machine. \ + * **Rack**: The virtual machine placement hint is scoped to the rack. + */ +export type VirtualMachinePlacementHintPodAffinityScope = string; + +/** StorageProfile represents information about a disk. */ +export interface StorageProfile { + /** The disk to use with this virtual machine. */ + osDisk: OsDisk; + /** The resource IDs of volumes that are requested to be attached to the virtual machine. */ + volumeAttachments?: string[]; +} + +export function storageProfileSerializer(item: StorageProfile): any { + return { + osDisk: osDiskSerializer(item["osDisk"]), + volumeAttachments: !item["volumeAttachments"] + ? item["volumeAttachments"] + : item["volumeAttachments"].map((p: any) => { + return p; + }), + }; +} + +export function storageProfileDeserializer(item: any): StorageProfile { + return { + osDisk: osDiskDeserializer(item["osDisk"]), + volumeAttachments: !item["volumeAttachments"] + ? item["volumeAttachments"] + : item["volumeAttachments"].map((p: any) => { + return p; + }), + }; +} + +/** OsDisk represents configuration of the boot disk. */ +export interface OsDisk { + /** The strategy for creating the OS disk. */ + createOption?: OsDiskCreateOption; + /** The strategy for deleting the OS disk. */ + deleteOption?: OsDiskDeleteOption; + /** The size of the disk. Required if the createOption is Ephemeral. Allocations are measured in gibibytes. */ + diskSizeGB: number; +} + +export function osDiskSerializer(item: OsDisk): any { + return { + createOption: item["createOption"], + deleteOption: item["deleteOption"], + diskSizeGB: item["diskSizeGB"], + }; +} + +export function osDiskDeserializer(item: any): OsDisk { + return { + createOption: item["createOption"], + deleteOption: item["deleteOption"], + diskSizeGB: item["diskSizeGB"], + }; +} + +/** The strategy for creating the OS disk. */ +export enum KnownOsDiskCreateOption { + /** The Os Disk will be created on ephemeral storage. */ + Ephemeral = "Ephemeral", + /** The Os Disk is on persistent storage. */ + Persistent = "Persistent", +} + +/** + * The strategy for creating the OS disk. \ + * {@link KnownOsDiskCreateOption} can be used interchangeably with OsDiskCreateOption, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Ephemeral**: The Os Disk will be created on ephemeral storage. \ + * **Persistent**: The Os Disk is on persistent storage. + */ +export type OsDiskCreateOption = string; + +/** The strategy for deleting the OS disk. */ +export enum KnownOsDiskDeleteOption { + /** The Os Disk will be deleted when the virtual machine is deleted. */ + Delete = "Delete", +} + +/** + * The strategy for deleting the OS disk. \ + * {@link KnownOsDiskDeleteOption} can be used interchangeably with OsDiskDeleteOption, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Delete**: The Os Disk will be deleted when the virtual machine is deleted. + */ +export type OsDiskDeleteOption = string; + +/** Field Deprecated, use virtualizationModel instead. The type of the virtio interface. */ +export enum KnownVirtualMachineVirtioInterfaceType { + /** Modern virtio interface. */ + Modern = "Modern", + /** Transitional virtio interface. */ + Transitional = "Transitional", +} + +/** + * Field Deprecated, use virtualizationModel instead. The type of the virtio interface. \ + * {@link KnownVirtualMachineVirtioInterfaceType} can be used interchangeably with VirtualMachineVirtioInterfaceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Modern**: Modern virtio interface. \ + * **Transitional**: Transitional virtio interface. + */ +export type VirtualMachineVirtioInterfaceType = string; + +/** The type of the device model to use. */ +export enum KnownVirtualMachineDeviceModelType { + /** The T1 device model. */ + T1 = "T1", + /** The T2 device model. */ + T2 = "T2", + /** The T3 device model. */ + T3 = "T3", +} + +/** + * The type of the device model to use. \ + * {@link KnownVirtualMachineDeviceModelType} can be used interchangeably with VirtualMachineDeviceModelType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **T1**: The T1 device model. \ + * **T2**: The T2 device model. \ + * **T3**: The T3 device model. + */ +export type VirtualMachineDeviceModelType = string; + +/** ImageRepositoryCredentials represents the credentials used to login to the image repository. */ +export interface ImageRepositoryCredentials { + /** The password or token used to access an image in the target repository. */ + password: string; + /** The URL of the authentication server used to validate the repository credentials. */ + registryUrl: string; + /** The username used to access an image in the target repository. */ + username: string; +} + +export function imageRepositoryCredentialsSerializer(item: ImageRepositoryCredentials): any { + return { + password: item["password"], + registryUrl: item["registryUrl"], + username: item["username"], + }; +} + +export function imageRepositoryCredentialsDeserializer(item: any): ImageRepositoryCredentials { + return { + password: item["password"], + registryUrl: item["registryUrl"], + username: item["username"], + }; +} + +/** The more detailed status of the virtual machine. */ +export enum KnownVirtualMachineDetailedStatus { + /** The Available status. */ + Available = "Available", + /** The Error status. */ + Error = "Error", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Running status. */ + Running = "Running", + /** The Scheduling status. */ + Scheduling = "Scheduling", + /** The Stopped status. */ + Stopped = "Stopped", + /** The Terminating status. */ + Terminating = "Terminating", + /** The Unknown status. */ + Unknown = "Unknown", +} + +/** + * The more detailed status of the virtual machine. \ + * {@link KnownVirtualMachineDetailedStatus} can be used interchangeably with VirtualMachineDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Available**: The Available status. \ + * **Error**: The Error status. \ + * **Provisioning**: The Provisioning status. \ + * **Running**: The Running status. \ + * **Scheduling**: The Scheduling status. \ + * **Stopped**: The Stopped status. \ + * **Terminating**: The Terminating status. \ + * **Unknown**: The Unknown status. + */ +export type VirtualMachineDetailedStatus = string; + +/** The power state of the virtual machine. */ +export enum KnownVirtualMachinePowerState { + /** The virtual machine is powered off. */ + Off = "Off", + /** The virtual machine is powered on. */ + On = "On", + /** The virtual machine power state is unknown. */ + Unknown = "Unknown", +} + +/** + * The power state of the virtual machine. \ + * {@link KnownVirtualMachinePowerState} can be used interchangeably with VirtualMachinePowerState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Off**: The virtual machine is powered off. \ + * **On**: The virtual machine is powered on. \ + * **Unknown**: The virtual machine power state is unknown. + */ +export type VirtualMachinePowerState = string; + +/** The provisioning state of the virtual machine. */ +export enum KnownVirtualMachineProvisioningState { + /** The Accepted status. */ + Accepted = "Accepted", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Failed status. */ + Failed = "Failed", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Succeeded status. */ + Succeeded = "Succeeded", +} + +/** + * The provisioning state of the virtual machine. \ + * {@link KnownVirtualMachineProvisioningState} can be used interchangeably with VirtualMachineProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Accepted**: The Accepted status. \ + * **Canceled**: The Canceled status. \ + * **Failed**: The Failed status. \ + * **Provisioning**: The Provisioning status. \ + * **Succeeded**: The Succeeded status. + */ +export type VirtualMachineProvisioningState = string; + +/** VirtualMachinePatchParameters represents the body of the request to patch the virtual machine. */ +export interface VirtualMachinePatchParameters { + /** The identity for the resource. */ + identity?: ManagedServiceIdentity; + /** Resource tags. */ + tags?: Record; + /** The credentials used to login to the image repository that has access to the specified image. */ + vmImageRepositoryCredentials?: ImageRepositoryCredentials; +} + +export function virtualMachinePatchParametersSerializer(item: VirtualMachinePatchParameters): any { + return { + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentitySerializer(item["identity"]), + properties: areAllPropsUndefined(item, ["vmImageRepositoryCredentials"]) + ? undefined + : _virtualMachinePatchParametersPropertiesSerializer(item), + tags: item["tags"], + }; +} + +/** VirtualMachinePatchProperties represents the properties of the virtual machine that can be patched. */ +export interface VirtualMachinePatchProperties { + /** The credentials used to login to the image repository that has access to the specified image. */ + vmImageRepositoryCredentials?: ImageRepositoryCredentials; +} + +export function virtualMachinePatchPropertiesSerializer(item: VirtualMachinePatchProperties): any { + return { + vmImageRepositoryCredentials: !item["vmImageRepositoryCredentials"] + ? item["vmImageRepositoryCredentials"] + : imageRepositoryCredentialsSerializer(item["vmImageRepositoryCredentials"]), + }; +} + +/** VirtualMachineList represents a list of virtual machines. */ +export interface _VirtualMachineList { + /** The VirtualMachine items on this page */ + value: VirtualMachine[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _virtualMachineListDeserializer(item: any): _VirtualMachineList { + return { + value: virtualMachineArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function virtualMachineArraySerializer(result: Array): any[] { + return result.map((item) => { + return virtualMachineSerializer(item); + }); +} + +export function virtualMachineArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return virtualMachineDeserializer(item); + }); +} + +/** VirtualMachineAssignRelayParameters represents the body of the request to update the relay used for a Microsoft.HybridCompute machine associated with the virtual machine. */ +export interface VirtualMachineAssignRelayParameters { + /** The resourceId of the Microsoft.HybridCompute machine resource to assign relay usage. */ + machineId: string; + /** The indicator of which relay type the machine should be assigned to use. Platform indicates the use of a platform-dedicated relay. Public indicates the use of the standard public relay for Arc services. */ + relayType?: RelayType; +} + +export function virtualMachineAssignRelayParametersSerializer( + item: VirtualMachineAssignRelayParameters, +): any { + return { machineId: item["machineId"], relayType: item["relayType"] }; +} + +/** The indicator of which relay type the machine should be assigned to use. Platform indicates the use of a platform-dedicated relay. Public indicates the use of the standard public relay for Arc services. */ +export enum KnownRelayType { + /** Utilize the platform-dedicated relay for Arc services. */ + Platform = "Platform", + /** Utilize the standard public relay for Arc services. */ + Public = "Public", +} + +/** + * The indicator of which relay type the machine should be assigned to use. Platform indicates the use of a platform-dedicated relay. Public indicates the use of the standard public relay for Arc services. \ + * {@link KnownRelayType} can be used interchangeably with RelayType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Platform**: Utilize the platform-dedicated relay for Arc services. \ + * **Public**: Utilize the standard public relay for Arc services. + */ +export type RelayType = string; + +/** VirtualMachinePowerOffParameters represents the body of the request to power off virtual machine. */ +export interface VirtualMachinePowerOffParameters { + /** The indicator of whether to skip the graceful OS shutdown and power off the virtual machine immediately. */ + skipShutdown?: SkipShutdown; +} + +export function virtualMachinePowerOffParametersSerializer( + item: VirtualMachinePowerOffParameters, +): any { + return { skipShutdown: item["skipShutdown"] }; +} + +/** The indicator of whether to skip the graceful OS shutdown and power off the virtual machine immediately. */ +export enum KnownSkipShutdown { + /** Skip the graceful OS shutdown and power off the virtual machine immediately. */ + True = "True", + /** Do not skip the graceful OS shutdown. */ + False = "False", +} + +/** + * The indicator of whether to skip the graceful OS shutdown and power off the virtual machine immediately. \ + * {@link KnownSkipShutdown} can be used interchangeably with SkipShutdown, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: Skip the graceful OS shutdown and power off the virtual machine immediately. \ + * **False**: Do not skip the graceful OS shutdown. + */ +export type SkipShutdown = string; + +/** Volume represents storage made available for use by resources running on the cluster. */ +export interface Volume extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** The requested storage allocation for the volume in Mebibytes. */ + sizeMiB: number; + /** The resource ID of the storage appliance that hosts the volume. */ + storageApplianceId?: string; + /** The allocated size of the volume in Mebibytes. */ + readonly allocatedSizeMiB?: number; + /** The assigned resource ID of the storage appliance that hosts the volume. */ + readonly assignedStorageApplianceId?: string; + /** The list of resource IDs that attach the volume. It may include virtual machines and Hybrid AKS clusters. */ + readonly attachedTo?: string[]; + /** The more detailed status of the volume. */ + readonly detailedStatus?: VolumeDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The unique identifier of the volume. */ + readonly serialNumber?: string; + /** The provisioning state of the volume. */ + readonly provisioningState?: VolumeProvisioningState; +} + +export function volumeSerializer(item: Volume): any { + return { + tags: item["tags"], + location: item["location"], + properties: _volumePropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function volumeDeserializer(item: any): Volume { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._volumePropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** VolumeProperties represents properties of the volume resource. */ +export interface VolumeProperties { + /** The requested storage allocation for the volume in Mebibytes. */ + sizeMiB: number; + /** The resource ID of the storage appliance that hosts the volume. */ + storageApplianceId?: string; + /** The allocated size of the volume in Mebibytes. */ + readonly allocatedSizeMiB?: number; + /** The assigned resource ID of the storage appliance that hosts the volume. */ + readonly assignedStorageApplianceId?: string; + /** The list of resource IDs that attach the volume. It may include virtual machines and Hybrid AKS clusters. */ + readonly attachedTo?: string[]; + /** The more detailed status of the volume. */ + readonly detailedStatus?: VolumeDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The unique identifier of the volume. */ + readonly serialNumber?: string; + /** The provisioning state of the volume. */ + readonly provisioningState?: VolumeProvisioningState; +} + +export function volumePropertiesSerializer(item: VolumeProperties): any { + return { sizeMiB: item["sizeMiB"], storageApplianceId: item["storageApplianceId"] }; +} + +export function volumePropertiesDeserializer(item: any): VolumeProperties { + return { + sizeMiB: item["sizeMiB"], + storageApplianceId: item["storageApplianceId"], + allocatedSizeMiB: item["allocatedSizeMiB"], + assignedStorageApplianceId: item["assignedStorageApplianceId"], + attachedTo: !item["attachedTo"] + ? item["attachedTo"] + : item["attachedTo"].map((p: any) => { + return p; + }), + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + serialNumber: item["serialNumber"], + provisioningState: item["provisioningState"], + }; +} + +/** The more detailed status of the volume. */ +export enum KnownVolumeDetailedStatus { + /** The Active status. */ + Active = "Active", + /** The Error status. */ + Error = "Error", + /** The Provisioning status. */ + Provisioning = "Provisioning", +} + +/** + * The more detailed status of the volume. \ + * {@link KnownVolumeDetailedStatus} can be used interchangeably with VolumeDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Active**: The Active status. \ + * **Error**: The Error status. \ + * **Provisioning**: The Provisioning status. + */ +export type VolumeDetailedStatus = string; + +/** The provisioning state of the volume. */ +export enum KnownVolumeProvisioningState { + /** The Accepted status. */ + Accepted = "Accepted", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Failed status. */ + Failed = "Failed", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Succeeded status. */ + Succeeded = "Succeeded", +} + +/** + * The provisioning state of the volume. \ + * {@link KnownVolumeProvisioningState} can be used interchangeably with VolumeProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Accepted**: The Accepted status. \ + * **Canceled**: The Canceled status. \ + * **Failed**: The Failed status. \ + * **Provisioning**: The Provisioning status. \ + * **Succeeded**: The Succeeded status. + */ +export type VolumeProvisioningState = string; + +/** VolumePatchParameters represents the body of the request to patch the volume resource. */ +export interface VolumePatchParameters { + /** Resource tags. */ + tags?: Record; +} + +export function volumePatchParametersSerializer(item: VolumePatchParameters): any { + return { tags: item["tags"] }; +} + +/** VolumeList represents a list of volumes. */ +export interface _VolumeList { + /** The Volume items on this page */ + value: Volume[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _volumeListDeserializer(item: any): _VolumeList { + return { + value: volumeArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function volumeArraySerializer(result: Array): any[] { + return result.map((item) => { + return volumeSerializer(item); + }); +} + +export function volumeArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return volumeDeserializer(item); + }); +} + +/** BareMetalMachineKeySet represents the bare metal machine key set. */ +export interface BareMetalMachineKeySet extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** The object ID of Azure Active Directory group that all users in the list must be in for access to be granted. Users that are not in the group will not have access. */ + azureGroupId: string; + /** The date and time after which the users in this key set will be removed from the bare metal machines. */ + expiration: Date; + /** The list of IP addresses of jump hosts with management network access from which a login will be allowed for the users. */ + jumpHostsAllowed: string[]; + /** The name of the group that users will be assigned to on the operating system of the machines. */ + osGroupName?: string; + /** The access level allowed for the users in this key set. */ + privilegeLevel: BareMetalMachineKeySetPrivilegeLevel; + /** The name of the access level to apply when the privilege level is set to Other. */ + privilegeLevelName?: string; + /** The unique list of permitted users. */ + userList: KeySetUser[]; + /** The more detailed status of the key set. */ + readonly detailedStatus?: BareMetalMachineKeySetDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The last time this key set was validated. */ + readonly lastValidation?: Date; + /** The status evaluation of each user. */ + readonly userListStatus?: KeySetUserStatus[]; + /** The provisioning state of the bare metal machine key set. */ + readonly provisioningState?: BareMetalMachineKeySetProvisioningState; +} + +export function bareMetalMachineKeySetSerializer(item: BareMetalMachineKeySet): any { + return { + tags: item["tags"], + location: item["location"], + properties: _bareMetalMachineKeySetPropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function bareMetalMachineKeySetDeserializer(item: any): BareMetalMachineKeySet { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._bareMetalMachineKeySetPropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** BareMetalMachineKeySetProperties represents the properties of bare metal machine key set. */ +export interface BareMetalMachineKeySetProperties { + /** The object ID of Azure Active Directory group that all users in the list must be in for access to be granted. Users that are not in the group will not have access. */ + azureGroupId: string; + /** The date and time after which the users in this key set will be removed from the bare metal machines. */ + expiration: Date; + /** The list of IP addresses of jump hosts with management network access from which a login will be allowed for the users. */ + jumpHostsAllowed: string[]; + /** The name of the group that users will be assigned to on the operating system of the machines. */ + osGroupName?: string; + /** The access level allowed for the users in this key set. */ + privilegeLevel: BareMetalMachineKeySetPrivilegeLevel; + /** The name of the access level to apply when the privilege level is set to Other. */ + privilegeLevelName?: string; + /** The unique list of permitted users. */ + userList: KeySetUser[]; + /** The more detailed status of the key set. */ + readonly detailedStatus?: BareMetalMachineKeySetDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The last time this key set was validated. */ + readonly lastValidation?: Date; + /** The status evaluation of each user. */ + readonly userListStatus?: KeySetUserStatus[]; + /** The provisioning state of the bare metal machine key set. */ + readonly provisioningState?: BareMetalMachineKeySetProvisioningState; +} + +export function bareMetalMachineKeySetPropertiesSerializer( + item: BareMetalMachineKeySetProperties, +): any { + return { + azureGroupId: item["azureGroupId"], + expiration: item["expiration"].toISOString(), + jumpHostsAllowed: item["jumpHostsAllowed"].map((p: any) => { + return p; + }), + osGroupName: item["osGroupName"], + privilegeLevel: item["privilegeLevel"], + privilegeLevelName: item["privilegeLevelName"], + userList: keySetUserArraySerializer(item["userList"]), + }; +} + +export function bareMetalMachineKeySetPropertiesDeserializer( + item: any, +): BareMetalMachineKeySetProperties { + return { + azureGroupId: item["azureGroupId"], + expiration: new Date(item["expiration"]), + jumpHostsAllowed: item["jumpHostsAllowed"].map((p: any) => { + return p; + }), + osGroupName: item["osGroupName"], + privilegeLevel: item["privilegeLevel"], + privilegeLevelName: item["privilegeLevelName"], + userList: keySetUserArrayDeserializer(item["userList"]), + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + lastValidation: !item["lastValidation"] + ? item["lastValidation"] + : new Date(item["lastValidation"]), + userListStatus: !item["userListStatus"] + ? item["userListStatus"] + : keySetUserStatusArrayDeserializer(item["userListStatus"]), + provisioningState: item["provisioningState"], + }; +} + +/** The access level allowed for the users in this key set. */ +export enum KnownBareMetalMachineKeySetPrivilegeLevel { + /** Standard access level. */ + Standard = "Standard", + /** Superuser access level. */ + Superuser = "Superuser", + /** Other access level. */ + Other = "Other", +} + +/** + * The access level allowed for the users in this key set. \ + * {@link KnownBareMetalMachineKeySetPrivilegeLevel} can be used interchangeably with BareMetalMachineKeySetPrivilegeLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard**: Standard access level. \ + * **Superuser**: Superuser access level. \ + * **Other**: Other access level. + */ +export type BareMetalMachineKeySetPrivilegeLevel = string; + +export function keySetUserArraySerializer(result: Array): any[] { + return result.map((item) => { + return keySetUserSerializer(item); + }); +} + +export function keySetUserArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return keySetUserDeserializer(item); + }); +} + +/** KeySetUser represents the properties of the user in the key set. */ +export interface KeySetUser { + /** The user name that will be used for access. */ + azureUserName: string; + /** The free-form description for this user. */ + description?: string; + /** 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. */ + sshPublicKey: SshPublicKey; + /** The user principal name (email format) used to validate this user's group membership. */ + userPrincipalName?: string; +} + +export function keySetUserSerializer(item: KeySetUser): any { + return { + azureUserName: item["azureUserName"], + description: item["description"], + sshPublicKey: sshPublicKeySerializer(item["sshPublicKey"]), + userPrincipalName: item["userPrincipalName"], + }; +} + +export function keySetUserDeserializer(item: any): KeySetUser { + return { + azureUserName: item["azureUserName"], + description: item["description"], + sshPublicKey: sshPublicKeyDeserializer(item["sshPublicKey"]), + userPrincipalName: item["userPrincipalName"], + }; +} + +/** The more detailed status of the key set. */ +export enum KnownBareMetalMachineKeySetDetailedStatus { + /** All users in the key set are active. */ + AllActive = "AllActive", + /** Some users in the key set are invalid. */ + SomeInvalid = "SomeInvalid", + /** All users in the key set are invalid. */ + AllInvalid = "AllInvalid", + /** Key set is being validated. */ + Validating = "Validating", +} + +/** + * The more detailed status of the key set. \ + * {@link KnownBareMetalMachineKeySetDetailedStatus} can be used interchangeably with BareMetalMachineKeySetDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AllActive**: All users in the key set are active. \ + * **SomeInvalid**: Some users in the key set are invalid. \ + * **AllInvalid**: All users in the key set are invalid. \ + * **Validating**: Key set is being validated. + */ +export type BareMetalMachineKeySetDetailedStatus = string; + +export function keySetUserStatusArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return keySetUserStatusDeserializer(item); + }); +} + +/** KeySetUserStatus represents the status of the key set user. */ +export interface KeySetUserStatus { + /** The user name that will be used for access. */ + readonly azureUserName?: string; + /** The indicator of whether the user is currently deployed for access. */ + readonly status?: BareMetalMachineKeySetUserSetupStatus; + /** The additional information describing the current status of this user, if any available. */ + readonly statusMessage?: string; +} + +export function keySetUserStatusDeserializer(item: any): KeySetUserStatus { + return { + azureUserName: item["azureUserName"], + status: item["status"], + statusMessage: item["statusMessage"], + }; +} + +/** The indicator of whether the user is currently deployed for access. */ +export enum KnownBareMetalMachineKeySetUserSetupStatus { + /** The user is currently active. */ + Active = "Active", + /** The user is not valid and has no access. */ + Invalid = "Invalid", +} + +/** + * The indicator of whether the user is currently deployed for access. \ + * {@link KnownBareMetalMachineKeySetUserSetupStatus} can be used interchangeably with BareMetalMachineKeySetUserSetupStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Active**: The user is currently active. \ + * **Invalid**: The user is not valid and has no access. + */ +export type BareMetalMachineKeySetUserSetupStatus = string; + +/** The provisioning state of the bare metal machine key set. */ +export enum KnownBareMetalMachineKeySetProvisioningState { + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Failed status. */ + Failed = "Failed", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Accepted status. */ + Accepted = "Accepted", + /** The Provisioning status. */ + Provisioning = "Provisioning", +} + +/** + * The provisioning state of the bare metal machine key set. \ + * {@link KnownBareMetalMachineKeySetProvisioningState} can be used interchangeably with BareMetalMachineKeySetProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The Succeeded status. \ + * **Failed**: The Failed status. \ + * **Canceled**: The Canceled status. \ + * **Accepted**: The Accepted status. \ + * **Provisioning**: The Provisioning status. + */ +export type BareMetalMachineKeySetProvisioningState = string; + +/** BareMetalMachineKeySetPatchParameters represents the body of the request to patch the bare metal machine key set. */ +export interface BareMetalMachineKeySetPatchParameters { + /** Resource tags. */ + tags?: Record; + /** The date and time after which the users in this key set will be removed from the bare metal machines. */ + expiration?: Date; + /** The list of IP addresses of jump hosts with management network access from which a login will be allowed for the users. */ + jumpHostsAllowed?: string[]; + /** The unique list of permitted users. */ + userList?: KeySetUser[]; +} + +export function bareMetalMachineKeySetPatchParametersSerializer( + item: BareMetalMachineKeySetPatchParameters, +): any { + return { + properties: areAllPropsUndefined(item, ["expiration", "jumpHostsAllowed", "userList"]) + ? undefined + : _bareMetalMachineKeySetPatchParametersPropertiesSerializer(item), + tags: item["tags"], + }; +} + +/** BareMetalMachineKeySetPatchProperties represents the properties of bare metal machine key set that can be patched. */ +export interface BareMetalMachineKeySetPatchProperties { + /** The date and time after which the users in this key set will be removed from the bare metal machines. */ + expiration?: Date; + /** The list of IP addresses of jump hosts with management network access from which a login will be allowed for the users. */ + jumpHostsAllowed?: string[]; + /** The unique list of permitted users. */ + userList?: KeySetUser[]; +} + +export function bareMetalMachineKeySetPatchPropertiesSerializer( + item: BareMetalMachineKeySetPatchProperties, +): any { + return { + expiration: !item["expiration"] ? item["expiration"] : item["expiration"].toISOString(), + jumpHostsAllowed: !item["jumpHostsAllowed"] + ? item["jumpHostsAllowed"] + : item["jumpHostsAllowed"].map((p: any) => { + return p; + }), + userList: !item["userList"] ? item["userList"] : keySetUserArraySerializer(item["userList"]), + }; +} + +/** BareMetalMachineKeySetList represents a list of bare metal machine key sets. */ +export interface _BareMetalMachineKeySetList { + /** The BareMetalMachineKeySet items on this page */ + value: BareMetalMachineKeySet[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _bareMetalMachineKeySetListDeserializer(item: any): _BareMetalMachineKeySetList { + return { + value: bareMetalMachineKeySetArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function bareMetalMachineKeySetArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return bareMetalMachineKeySetSerializer(item); + }); +} + +export function bareMetalMachineKeySetArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return bareMetalMachineKeySetDeserializer(item); + }); +} + +/** BmcKeySet represents the baseboard management controller key set. */ +export interface BmcKeySet extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** The object ID of Azure Active Directory group that all users in the list must be in for access to be granted. Users that are not in the group will not have access. */ + azureGroupId: string; + /** The date and time after which the users in this key set will be removed from the baseboard management controllers. */ + expiration: Date; + /** The access level allowed for the users in this key set. */ + privilegeLevel: BmcKeySetPrivilegeLevel; + /** The unique list of permitted users. */ + userList: KeySetUser[]; + /** The more detailed status of the key set. */ + readonly detailedStatus?: BmcKeySetDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The last time this key set was validated. */ + readonly lastValidation?: Date; + /** The status evaluation of each user. */ + readonly userListStatus?: KeySetUserStatus[]; + /** The provisioning state of the baseboard management controller key set. */ + readonly provisioningState?: BmcKeySetProvisioningState; +} + +export function bmcKeySetSerializer(item: BmcKeySet): any { + return { + tags: item["tags"], + location: item["location"], + properties: _bmcKeySetPropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function bmcKeySetDeserializer(item: any): BmcKeySet { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._bmcKeySetPropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** BmcKeySetProperties represents the properties of baseboard management controller key set. */ +export interface BmcKeySetProperties { + /** The object ID of Azure Active Directory group that all users in the list must be in for access to be granted. Users that are not in the group will not have access. */ + azureGroupId: string; + /** The date and time after which the users in this key set will be removed from the baseboard management controllers. */ + expiration: Date; + /** The access level allowed for the users in this key set. */ + privilegeLevel: BmcKeySetPrivilegeLevel; + /** The unique list of permitted users. */ + userList: KeySetUser[]; + /** The more detailed status of the key set. */ + readonly detailedStatus?: BmcKeySetDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The last time this key set was validated. */ + readonly lastValidation?: Date; + /** The status evaluation of each user. */ + readonly userListStatus?: KeySetUserStatus[]; + /** The provisioning state of the baseboard management controller key set. */ + readonly provisioningState?: BmcKeySetProvisioningState; +} + +export function bmcKeySetPropertiesSerializer(item: BmcKeySetProperties): any { + return { + azureGroupId: item["azureGroupId"], + expiration: item["expiration"].toISOString(), + privilegeLevel: item["privilegeLevel"], + userList: keySetUserArraySerializer(item["userList"]), + }; +} + +export function bmcKeySetPropertiesDeserializer(item: any): BmcKeySetProperties { + return { + azureGroupId: item["azureGroupId"], + expiration: new Date(item["expiration"]), + privilegeLevel: item["privilegeLevel"], + userList: keySetUserArrayDeserializer(item["userList"]), + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + lastValidation: !item["lastValidation"] + ? item["lastValidation"] + : new Date(item["lastValidation"]), + userListStatus: !item["userListStatus"] + ? item["userListStatus"] + : keySetUserStatusArrayDeserializer(item["userListStatus"]), + provisioningState: item["provisioningState"], + }; +} + +/** The access level allowed for the users in this key set. */ +export enum KnownBmcKeySetPrivilegeLevel { + /** ReadOnly privilege level */ + ReadOnly = "ReadOnly", + /** Administrator privilege level */ + Administrator = "Administrator", +} + +/** + * The access level allowed for the users in this key set. \ + * {@link KnownBmcKeySetPrivilegeLevel} can be used interchangeably with BmcKeySetPrivilegeLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ReadOnly**: ReadOnly privilege level \ + * **Administrator**: Administrator privilege level + */ +export type BmcKeySetPrivilegeLevel = string; + +/** The more detailed status of the key set. */ +export enum KnownBmcKeySetDetailedStatus { + /** The AllActive status. */ + AllActive = "AllActive", + /** The SomeInvalid status. */ + SomeInvalid = "SomeInvalid", + /** The AllInvalid status. */ + AllInvalid = "AllInvalid", + /** The Validating status. */ + Validating = "Validating", +} + +/** + * The more detailed status of the key set. \ + * {@link KnownBmcKeySetDetailedStatus} can be used interchangeably with BmcKeySetDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AllActive**: The AllActive status. \ + * **SomeInvalid**: The SomeInvalid status. \ + * **AllInvalid**: The AllInvalid status. \ + * **Validating**: The Validating status. + */ +export type BmcKeySetDetailedStatus = string; + +/** The provisioning state of the baseboard management controller key set. */ +export enum KnownBmcKeySetProvisioningState { + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Failed status. */ + Failed = "Failed", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Accepted status. */ + Accepted = "Accepted", + /** The Provisioning status. */ + Provisioning = "Provisioning", +} + +/** + * The provisioning state of the baseboard management controller key set. \ + * {@link KnownBmcKeySetProvisioningState} can be used interchangeably with BmcKeySetProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The Succeeded status. \ + * **Failed**: The Failed status. \ + * **Canceled**: The Canceled status. \ + * **Accepted**: The Accepted status. \ + * **Provisioning**: The Provisioning status. + */ +export type BmcKeySetProvisioningState = string; + +/** BmcKeySetPatchParameters represents the body of the request to patch the baseboard management controller key set. */ +export interface BmcKeySetPatchParameters { + /** Resource tags. */ + tags?: Record; + /** The date and time after which the users in this key set will be removed from the baseboard management controllers. */ + expiration?: Date; + /** The unique list of permitted users. */ + userList?: KeySetUser[]; +} + +export function bmcKeySetPatchParametersSerializer(item: BmcKeySetPatchParameters): any { + return { + properties: areAllPropsUndefined(item, ["expiration", "userList"]) + ? undefined + : _bmcKeySetPatchParametersPropertiesSerializer(item), + tags: item["tags"], + }; +} + +/** BmcKeySetPatchProperties represents the properties of baseboard management controller key set that are patchable. */ +export interface BmcKeySetPatchProperties { + /** The date and time after which the users in this key set will be removed from the baseboard management controllers. */ + expiration?: Date; + /** The unique list of permitted users. */ + userList?: KeySetUser[]; +} + +export function bmcKeySetPatchPropertiesSerializer(item: BmcKeySetPatchProperties): any { + return { + expiration: !item["expiration"] ? item["expiration"] : item["expiration"].toISOString(), + userList: !item["userList"] ? item["userList"] : keySetUserArraySerializer(item["userList"]), + }; +} + +/** BmcKeySetList represents a list of baseboard management controller key sets. */ +export interface _BmcKeySetList { + /** The BmcKeySet items on this page */ + value: BmcKeySet[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _bmcKeySetListDeserializer(item: any): _BmcKeySetList { + return { + value: bmcKeySetArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function bmcKeySetArraySerializer(result: Array): any[] { + return result.map((item) => { + return bmcKeySetSerializer(item); + }); +} + +export function bmcKeySetArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return bmcKeySetDeserializer(item); + }); +} + +/** AgentPool represents the agent pool of Kubernetes cluster. */ +export interface AgentPool extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + extendedLocation?: ExtendedLocation; + /** The administrator credentials to be used for the nodes in this agent pool. */ + administratorConfiguration?: AdministratorConfiguration; + /** The configurations that will be applied to each agent in this agent pool. */ + agentOptions?: AgentOptions; + /** The configuration of networks being attached to the agent pool for use by the workloads that run on this Kubernetes cluster. */ + attachedNetworkConfiguration?: AttachedNetworkConfiguration; + /** 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. */ + availabilityZones?: string[]; + /** The number of virtual machines that use this configuration. */ + count: number; + /** The labels applied to the nodes in this agent pool. */ + labels?: KubernetesLabel[]; + /** 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. */ + mode: AgentPoolMode; + /** The taints applied to the nodes in this agent pool. */ + taints?: KubernetesLabel[]; + /** The configuration of the agent pool. */ + upgradeSettings?: AgentPoolUpgradeSettings; + /** The name of the VM SKU that determines the size of resources allocated for node VMs. */ + vmSkuName: string; + /** The current status of the agent pool. */ + readonly detailedStatus?: AgentPoolDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The Kubernetes version running in this agent pool. */ + readonly kubernetesVersion?: string; + /** The provisioning state of the agent pool. */ + readonly provisioningState?: AgentPoolProvisioningState; +} + +export function agentPoolSerializer(item: AgentPool): any { + return { + tags: item["tags"], + location: item["location"], + properties: _agentPoolPropertiesSerializer(item), + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function agentPoolDeserializer(item: any): AgentPool { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._agentPoolPropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: !item["extendedLocation"] + ? item["extendedLocation"] + : extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** AgentPoolProperties represents the properties of the Kubernetes cluster agent pool. */ +export interface AgentPoolProperties { + /** The administrator credentials to be used for the nodes in this agent pool. */ + administratorConfiguration?: AdministratorConfiguration; + /** The configurations that will be applied to each agent in this agent pool. */ + agentOptions?: AgentOptions; + /** The configuration of networks being attached to the agent pool for use by the workloads that run on this Kubernetes cluster. */ + attachedNetworkConfiguration?: AttachedNetworkConfiguration; + /** 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. */ + availabilityZones?: string[]; + /** The number of virtual machines that use this configuration. */ + count: number; + /** The labels applied to the nodes in this agent pool. */ + labels?: KubernetesLabel[]; + /** 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. */ + mode: AgentPoolMode; + /** The taints applied to the nodes in this agent pool. */ + taints?: KubernetesLabel[]; + /** The configuration of the agent pool. */ + upgradeSettings?: AgentPoolUpgradeSettings; + /** The name of the VM SKU that determines the size of resources allocated for node VMs. */ + vmSkuName: string; + /** The current status of the agent pool. */ + readonly detailedStatus?: AgentPoolDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The Kubernetes version running in this agent pool. */ + readonly kubernetesVersion?: string; + /** The provisioning state of the agent pool. */ + readonly provisioningState?: AgentPoolProvisioningState; +} + +export function agentPoolPropertiesSerializer(item: AgentPoolProperties): any { + return { + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationSerializer(item["administratorConfiguration"]), + agentOptions: !item["agentOptions"] + ? item["agentOptions"] + : agentOptionsSerializer(item["agentOptions"]), + attachedNetworkConfiguration: !item["attachedNetworkConfiguration"] + ? item["attachedNetworkConfiguration"] + : attachedNetworkConfigurationSerializer(item["attachedNetworkConfiguration"]), + availabilityZones: !item["availabilityZones"] + ? item["availabilityZones"] + : item["availabilityZones"].map((p: any) => { + return p; + }), + count: item["count"], + labels: !item["labels"] ? item["labels"] : kubernetesLabelArraySerializer(item["labels"]), + mode: item["mode"], + taints: !item["taints"] ? item["taints"] : kubernetesLabelArraySerializer(item["taints"]), + upgradeSettings: !item["upgradeSettings"] + ? item["upgradeSettings"] + : agentPoolUpgradeSettingsSerializer(item["upgradeSettings"]), + vmSkuName: item["vmSkuName"], + }; +} + +export function agentPoolPropertiesDeserializer(item: any): AgentPoolProperties { + return { + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationDeserializer(item["administratorConfiguration"]), + agentOptions: !item["agentOptions"] + ? item["agentOptions"] + : agentOptionsDeserializer(item["agentOptions"]), + attachedNetworkConfiguration: !item["attachedNetworkConfiguration"] + ? item["attachedNetworkConfiguration"] + : attachedNetworkConfigurationDeserializer(item["attachedNetworkConfiguration"]), + availabilityZones: !item["availabilityZones"] + ? item["availabilityZones"] + : item["availabilityZones"].map((p: any) => { + return p; + }), + count: item["count"], + labels: !item["labels"] ? item["labels"] : kubernetesLabelArrayDeserializer(item["labels"]), + mode: item["mode"], + taints: !item["taints"] ? item["taints"] : kubernetesLabelArrayDeserializer(item["taints"]), + upgradeSettings: !item["upgradeSettings"] + ? item["upgradeSettings"] + : agentPoolUpgradeSettingsDeserializer(item["upgradeSettings"]), + vmSkuName: item["vmSkuName"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + kubernetesVersion: item["kubernetesVersion"], + provisioningState: item["provisioningState"], + }; +} + +/** The current status of the agent pool. */ +export enum KnownAgentPoolDetailedStatus { + /** The Available status. */ + Available = "Available", + /** The Error status. */ + Error = "Error", + /** The Provisioning status. */ + Provisioning = "Provisioning", +} + +/** + * The current status of the agent pool. \ + * {@link KnownAgentPoolDetailedStatus} can be used interchangeably with AgentPoolDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Available**: The Available status. \ + * **Error**: The Error status. \ + * **Provisioning**: The Provisioning status. + */ +export type AgentPoolDetailedStatus = string; + +/** The provisioning state of the agent pool. */ +export enum KnownAgentPoolProvisioningState { + /** The Accepted status. */ + Accepted = "Accepted", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Deleting status. */ + Deleting = "Deleting", + /** The Failed status. */ + Failed = "Failed", + /** The InProgress status. */ + InProgress = "InProgress", + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Updating status. */ + Updating = "Updating", +} + +/** + * The provisioning state of the agent pool. \ + * {@link KnownAgentPoolProvisioningState} can be used interchangeably with AgentPoolProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Accepted**: The Accepted status. \ + * **Canceled**: The Canceled status. \ + * **Deleting**: The Deleting status. \ + * **Failed**: The Failed status. \ + * **InProgress**: The InProgress status. \ + * **Succeeded**: The Succeeded status. \ + * **Updating**: The Updating status. + */ +export type AgentPoolProvisioningState = string; + +/** AgentPoolPatchParameters represents the body of the request to patch the Kubernetes cluster agent pool. */ +export interface AgentPoolPatchParameters { + /** Resource tags. */ + tags?: Record; + /** The configuration of administrator credentials for the control plane nodes. */ + administratorConfiguration?: NodePoolAdministratorConfigurationPatch; + /** The number of virtual machines that use this configuration. */ + count?: number; + /** The configuration of the agent pool. */ + upgradeSettings?: AgentPoolUpgradeSettings; +} + +export function agentPoolPatchParametersSerializer(item: AgentPoolPatchParameters): any { + return { + properties: areAllPropsUndefined(item, [ + "administratorConfiguration", + "count", + "upgradeSettings", + ]) + ? undefined + : _agentPoolPatchParametersPropertiesSerializer(item), + tags: item["tags"], + }; +} + +/** AgentPoolPatchProperties represents the properties of an agent pool that can be modified. */ +export interface AgentPoolPatchProperties { + /** The configuration of administrator credentials for the control plane nodes. */ + administratorConfiguration?: NodePoolAdministratorConfigurationPatch; + /** The number of virtual machines that use this configuration. */ + count?: number; + /** The configuration of the agent pool. */ + upgradeSettings?: AgentPoolUpgradeSettings; +} + +export function agentPoolPatchPropertiesSerializer(item: AgentPoolPatchProperties): any { + return { + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : nodePoolAdministratorConfigurationPatchSerializer(item["administratorConfiguration"]), + count: item["count"], + upgradeSettings: !item["upgradeSettings"] + ? item["upgradeSettings"] + : agentPoolUpgradeSettingsSerializer(item["upgradeSettings"]), + }; +} + +/** NodePoolAdministratorConfigurationPatch represents the patching capabilities for the administrator configuration. */ +export interface NodePoolAdministratorConfigurationPatch { + /** SshPublicKey represents the public key used to authenticate with a resource through SSH. */ + sshPublicKeys?: SshPublicKey[]; +} + +export function nodePoolAdministratorConfigurationPatchSerializer( + item: NodePoolAdministratorConfigurationPatch, +): any { + return { + sshPublicKeys: !item["sshPublicKeys"] + ? item["sshPublicKeys"] + : sshPublicKeyArraySerializer(item["sshPublicKeys"]), + }; +} + +/** AgentPoolList represents a list of Kubernetes cluster agent pools. */ +export interface _AgentPoolList { + /** The AgentPool items on this page */ + value: AgentPool[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _agentPoolListDeserializer(item: any): _AgentPoolList { + return { + value: agentPoolArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function agentPoolArraySerializer(result: Array): any[] { + return result.map((item) => { + return agentPoolSerializer(item); + }); +} + +export function agentPoolArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return agentPoolDeserializer(item); + }); +} + +/** KubernetesClusterFeature represents the feature of a Kubernetes cluster. */ +export interface KubernetesClusterFeature extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The configured options for the feature. */ + options?: StringKeyValuePair[]; + /** The lifecycle indicator of the feature. */ + readonly availabilityLifecycle?: KubernetesClusterFeatureAvailabilityLifecycle; + /** The detailed status of the feature. */ + readonly detailedStatus?: KubernetesClusterFeatureDetailedStatus; + /** The descriptive message for the detailed status of the feature. */ + readonly detailedStatusMessage?: string; + /** 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. */ + readonly required?: KubernetesClusterFeatureRequired; + /** The version of the feature. */ + readonly version?: string; + /** The provisioning state of the Kubernetes cluster feature. */ + readonly provisioningState?: KubernetesClusterFeatureProvisioningState; +} + +export function kubernetesClusterFeatureSerializer(item: KubernetesClusterFeature): any { + return { + tags: item["tags"], + location: item["location"], + properties: areAllPropsUndefined(item, ["options"]) + ? undefined + : _kubernetesClusterFeaturePropertiesSerializer(item), + }; +} + +export function kubernetesClusterFeatureDeserializer(item: any): KubernetesClusterFeature { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _kubernetesClusterFeaturePropertiesDeserializer(item["properties"])), + etag: item["etag"], + }; +} + +/** KubernetesClusterFeatureProperties represents the properties of a Kubernetes cluster feature. */ +export interface KubernetesClusterFeatureProperties { + /** The configured options for the feature. */ + options?: StringKeyValuePair[]; + /** The lifecycle indicator of the feature. */ + readonly availabilityLifecycle?: KubernetesClusterFeatureAvailabilityLifecycle; + /** The detailed status of the feature. */ + readonly detailedStatus?: KubernetesClusterFeatureDetailedStatus; + /** The descriptive message for the detailed status of the feature. */ + readonly detailedStatusMessage?: string; + /** 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. */ + readonly required?: KubernetesClusterFeatureRequired; + /** The version of the feature. */ + readonly version?: string; + /** The provisioning state of the Kubernetes cluster feature. */ + readonly provisioningState?: KubernetesClusterFeatureProvisioningState; +} + +export function kubernetesClusterFeaturePropertiesSerializer( + item: KubernetesClusterFeatureProperties, +): any { + return { + options: !item["options"] + ? item["options"] + : stringKeyValuePairArraySerializer(item["options"]), + }; +} + +export function kubernetesClusterFeaturePropertiesDeserializer( + item: any, +): KubernetesClusterFeatureProperties { + return { + options: !item["options"] + ? item["options"] + : stringKeyValuePairArrayDeserializer(item["options"]), + availabilityLifecycle: item["availabilityLifecycle"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + required: item["required"], + version: item["version"], + provisioningState: item["provisioningState"], + }; +} + +export function stringKeyValuePairArraySerializer(result: Array): any[] { + return result.map((item) => { + return stringKeyValuePairSerializer(item); + }); +} + +export function stringKeyValuePairArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return stringKeyValuePairDeserializer(item); + }); +} + +/** StringKeyValuePair represents a single entry in a mapping of keys to values. */ +export interface StringKeyValuePair { + /** The key to the mapped value. */ + key: string; + /** The value of the mapping key. */ + value: string; +} + +export function stringKeyValuePairSerializer(item: StringKeyValuePair): any { + return { key: item["key"], value: item["value"] }; +} + +export function stringKeyValuePairDeserializer(item: any): StringKeyValuePair { + return { + key: item["key"], + value: item["value"], + }; +} + +/** The lifecycle indicator of the feature. */ +export enum KnownKubernetesClusterFeatureAvailabilityLifecycle { + /** Preview availability */ + Preview = "Preview", + /** Generally available */ + GenerallyAvailable = "GenerallyAvailable", +} + +/** + * The lifecycle indicator of the feature. \ + * {@link KnownKubernetesClusterFeatureAvailabilityLifecycle} can be used interchangeably with KubernetesClusterFeatureAvailabilityLifecycle, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Preview**: Preview availability \ + * **GenerallyAvailable**: Generally available + */ +export type KubernetesClusterFeatureAvailabilityLifecycle = string; + +/** The detailed status of the feature. */ +export enum KnownKubernetesClusterFeatureDetailedStatus { + /** The Error status. */ + Error = "Error", + /** The Provisioning status. */ + Provisioning = "Provisioning", + /** The Installed status. */ + Installed = "Installed", +} + +/** + * The detailed status of the feature. \ + * {@link KnownKubernetesClusterFeatureDetailedStatus} can be used interchangeably with KubernetesClusterFeatureDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Error**: The Error status. \ + * **Provisioning**: The Provisioning status. \ + * **Installed**: The Installed status. + */ +export type KubernetesClusterFeatureDetailedStatus = string; + +/** 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. */ +export enum KnownKubernetesClusterFeatureRequired { + /** A required feature. */ + True = "True", + /** An optional feature. */ + False = "False", +} + +/** + * 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. \ + * {@link KnownKubernetesClusterFeatureRequired} can be used interchangeably with KubernetesClusterFeatureRequired, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: A required feature. \ + * **False**: An optional feature. + */ +export type KubernetesClusterFeatureRequired = string; + +/** The provisioning state of the Kubernetes cluster feature. */ +export enum KnownKubernetesClusterFeatureProvisioningState { + /** The Accepted status. */ + Accepted = "Accepted", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Deleting status. */ + Deleting = "Deleting", + /** The Failed status. */ + Failed = "Failed", + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Updating status. */ + Updating = "Updating", +} + +/** + * The provisioning state of the Kubernetes cluster feature. \ + * {@link KnownKubernetesClusterFeatureProvisioningState} can be used interchangeably with KubernetesClusterFeatureProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Accepted**: The Accepted status. \ + * **Canceled**: The Canceled status. \ + * **Deleting**: The Deleting status. \ + * **Failed**: The Failed status. \ + * **Succeeded**: The Succeeded status. \ + * **Updating**: The Updating status. + */ +export type KubernetesClusterFeatureProvisioningState = string; + +/** KubernetesClusterFeaturePatchParameters represents the body of the request to patch the Kubernetes cluster feature. */ +export interface KubernetesClusterFeaturePatchParameters { + /** Resource tags. */ + tags?: Record; + /** The configured options for the feature. */ + options?: StringKeyValuePair[]; +} + +export function kubernetesClusterFeaturePatchParametersSerializer( + item: KubernetesClusterFeaturePatchParameters, +): any { + return { + properties: areAllPropsUndefined(item, ["options"]) + ? undefined + : _kubernetesClusterFeaturePatchParametersPropertiesSerializer(item), + tags: item["tags"], + }; +} + +/** KubernetesClusterFeaturePatchProperties represents the Kubernetes cluster feature properties for patching. */ +export interface KubernetesClusterFeaturePatchProperties { + /** The configured options for the feature. */ + options?: StringKeyValuePair[]; +} + +export function kubernetesClusterFeaturePatchPropertiesSerializer( + item: KubernetesClusterFeaturePatchProperties, +): any { + return { + options: !item["options"] + ? item["options"] + : stringKeyValuePairArraySerializer(item["options"]), + }; +} + +/** KubernetesClusterFeatureList represents the list of Kubernetes cluster feature resources. */ +export interface _KubernetesClusterFeatureList { + /** The KubernetesClusterFeature items on this page */ + value: KubernetesClusterFeature[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _kubernetesClusterFeatureListDeserializer( + item: any, +): _KubernetesClusterFeatureList { + return { + value: kubernetesClusterFeatureArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function kubernetesClusterFeatureArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return kubernetesClusterFeatureSerializer(item); + }); +} + +export function kubernetesClusterFeatureArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return kubernetesClusterFeatureDeserializer(item); + }); +} + +/** Console represents the console of an on-premises Network Cloud virtual machine. */ +export interface Console extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** The indicator of whether the console access is enabled. */ + enabled: ConsoleEnabled; + /** The date and time after which the key will be disallowed access. */ + expiration?: Date; + /** 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. */ + sshPublicKey: SshPublicKey; + /** The more detailed status of the console. */ + readonly detailedStatus?: ConsoleDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The resource ID of the private link service that is used to provide virtual machine console access. */ + readonly privateLinkServiceId?: string; + /** The unique identifier for the virtual machine that is used to access the console. */ + readonly virtualMachineAccessId?: string; + /** The provisioning state of the virtual machine console. */ + readonly provisioningState?: ConsoleProvisioningState; +} + +export function consoleSerializer(item: Console): any { + return { + tags: item["tags"], + location: item["location"], + properties: _consolePropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function consoleDeserializer(item: any): Console { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._consolePropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** ConsoleProperties represents the properties of the virtual machine console. */ +export interface ConsoleProperties { + /** The indicator of whether the console access is enabled. */ + enabled: ConsoleEnabled; + /** The date and time after which the key will be disallowed access. */ + expiration?: Date; + /** 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. */ + sshPublicKey: SshPublicKey; + /** The more detailed status of the console. */ + readonly detailedStatus?: ConsoleDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The resource ID of the private link service that is used to provide virtual machine console access. */ + readonly privateLinkServiceId?: string; + /** The unique identifier for the virtual machine that is used to access the console. */ + readonly virtualMachineAccessId?: string; + /** The provisioning state of the virtual machine console. */ + readonly provisioningState?: ConsoleProvisioningState; +} + +export function consolePropertiesSerializer(item: ConsoleProperties): any { + return { + enabled: item["enabled"], + expiration: !item["expiration"] ? item["expiration"] : item["expiration"].toISOString(), + sshPublicKey: sshPublicKeySerializer(item["sshPublicKey"]), + }; +} + +export function consolePropertiesDeserializer(item: any): ConsoleProperties { + return { + enabled: item["enabled"], + expiration: !item["expiration"] ? item["expiration"] : new Date(item["expiration"]), + sshPublicKey: sshPublicKeyDeserializer(item["sshPublicKey"]), + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + privateLinkServiceId: item["privateLinkServiceId"], + virtualMachineAccessId: item["virtualMachineAccessId"], + provisioningState: item["provisioningState"], + }; +} + +/** The indicator of whether the console access is enabled. */ +export enum KnownConsoleEnabled { + /** Console access enabled */ + True = "True", + /** Console access disabled */ + False = "False", +} + +/** + * The indicator of whether the console access is enabled. \ + * {@link KnownConsoleEnabled} can be used interchangeably with ConsoleEnabled, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True**: Console access enabled \ + * **False**: Console access disabled + */ +export type ConsoleEnabled = string; + +/** The more detailed status of the console. */ +export enum KnownConsoleDetailedStatus { + /** The Ready status. */ + Ready = "Ready", + /** The Error status. */ + Error = "Error", +} + +/** + * The more detailed status of the console. \ + * {@link KnownConsoleDetailedStatus} can be used interchangeably with ConsoleDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Ready**: The Ready status. \ + * **Error**: The Error status. + */ +export type ConsoleDetailedStatus = string; + +/** The provisioning state of the virtual machine console. */ +export enum KnownConsoleProvisioningState { + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Failed status. */ + Failed = "Failed", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Accepted status. */ + Accepted = "Accepted", + /** The Provisioning status. */ + Provisioning = "Provisioning", +} + +/** + * The provisioning state of the virtual machine console. \ + * {@link KnownConsoleProvisioningState} can be used interchangeably with ConsoleProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The Succeeded status. \ + * **Failed**: The Failed status. \ + * **Canceled**: The Canceled status. \ + * **Accepted**: The Accepted status. \ + * **Provisioning**: The Provisioning status. + */ +export type ConsoleProvisioningState = string; + +/** ConsolePatchParameters represents the body of the request to patch the virtual machine console. */ +export interface ConsolePatchParameters { + /** Resource tags. */ + tags?: Record; + /** The indicator of whether the console access is enabled. */ + enabled?: ConsoleEnabled; + /** The date and time after which the key will be disallowed access. */ + expiration?: Date; + /** 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. */ + sshPublicKey?: SshPublicKey; +} + +export function consolePatchParametersSerializer(item: ConsolePatchParameters): any { + return { + properties: areAllPropsUndefined(item, ["enabled", "expiration", "sshPublicKey"]) + ? undefined + : _consolePatchParametersPropertiesSerializer(item), + tags: item["tags"], + }; +} + +/** ConsolePatchProperties represents the properties of the virtual machine console that can be patched. */ +export interface ConsolePatchProperties { + /** The indicator of whether the console access is enabled. */ + enabled?: ConsoleEnabled; + /** The date and time after which the key will be disallowed access. */ + expiration?: Date; + /** 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. */ + sshPublicKey?: SshPublicKey; +} + +export function consolePatchPropertiesSerializer(item: ConsolePatchProperties): any { + return { + enabled: item["enabled"], + expiration: !item["expiration"] ? item["expiration"] : item["expiration"].toISOString(), + sshPublicKey: !item["sshPublicKey"] + ? item["sshPublicKey"] + : sshPublicKeySerializer(item["sshPublicKey"]), + }; +} + +/** ConsoleList represents a list of virtual machine consoles. */ +export interface _ConsoleList { + /** The Console items on this page */ + value: Console[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _consoleListDeserializer(item: any): _ConsoleList { + return { + value: consoleArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function consoleArraySerializer(result: Array): any[] { + return result.map((item) => { + return consoleSerializer(item); + }); +} + +export function consoleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return consoleDeserializer(item); + }); +} + +/** ClusterMetricsConfiguration represents the metrics configuration of an on-premises Network Cloud cluster. */ +export interface ClusterMetricsConfiguration extends TrackedResource { + /** "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.") */ + readonly etag?: string; + /** The extended location of the resource. This property is required when creating the resource. */ + extendedLocation: ExtendedLocation; + /** The list of metric names that have been chosen to be enabled in addition to the core set of enabled metrics. */ + enabledMetrics?: string[]; + /** The interval in minutes by which metrics will be collected. */ + collectionInterval: number; + /** The more detailed status of the metrics configuration. */ + readonly detailedStatus?: ClusterMetricsConfigurationDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The list of metrics that are available for the cluster but disabled at the moment. */ + readonly disabledMetrics?: string[]; + /** The provisioning state of the metrics configuration. */ + readonly provisioningState?: ClusterMetricsConfigurationProvisioningState; +} + +export function clusterMetricsConfigurationSerializer(item: ClusterMetricsConfiguration): any { + return { + tags: item["tags"], + location: item["location"], + properties: _clusterMetricsConfigurationPropertiesSerializer(item), + extendedLocation: extendedLocationSerializer(item["extendedLocation"]), + }; +} + +export function clusterMetricsConfigurationDeserializer(item: any): ClusterMetricsConfiguration { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._clusterMetricsConfigurationPropertiesDeserializer(item["properties"]), + etag: item["etag"], + extendedLocation: extendedLocationDeserializer(item["extendedLocation"]), + }; +} + +/** ClusterMetricsConfigurationProperties represents the properties of metrics configuration for the cluster. */ +export interface ClusterMetricsConfigurationProperties { + /** The list of metric names that have been chosen to be enabled in addition to the core set of enabled metrics. */ + enabledMetrics?: string[]; + /** The interval in minutes by which metrics will be collected. */ + collectionInterval: number; + /** The more detailed status of the metrics configuration. */ + readonly detailedStatus?: ClusterMetricsConfigurationDetailedStatus; + /** The descriptive message about the current detailed status. */ + readonly detailedStatusMessage?: string; + /** The list of metrics that are available for the cluster but disabled at the moment. */ + readonly disabledMetrics?: string[]; + /** The provisioning state of the metrics configuration. */ + readonly provisioningState?: ClusterMetricsConfigurationProvisioningState; +} + +export function clusterMetricsConfigurationPropertiesSerializer( + item: ClusterMetricsConfigurationProperties, +): any { + return { + enabledMetrics: !item["enabledMetrics"] + ? item["enabledMetrics"] + : item["enabledMetrics"].map((p: any) => { + return p; + }), + collectionInterval: item["collectionInterval"], + }; +} + +export function clusterMetricsConfigurationPropertiesDeserializer( + item: any, +): ClusterMetricsConfigurationProperties { + return { + enabledMetrics: !item["enabledMetrics"] + ? item["enabledMetrics"] + : item["enabledMetrics"].map((p: any) => { + return p; + }), + collectionInterval: item["collectionInterval"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + disabledMetrics: !item["disabledMetrics"] + ? item["disabledMetrics"] + : item["disabledMetrics"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +/** The more detailed status of the metrics configuration. */ +export enum KnownClusterMetricsConfigurationDetailedStatus { + /** The Processing status. */ + Processing = "Processing", + /** The Applied status. */ + Applied = "Applied", + /** The Error status. */ + Error = "Error", +} + +/** + * The more detailed status of the metrics configuration. \ + * {@link KnownClusterMetricsConfigurationDetailedStatus} can be used interchangeably with ClusterMetricsConfigurationDetailedStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Processing**: The Processing status. \ + * **Applied**: The Applied status. \ + * **Error**: The Error status. + */ +export type ClusterMetricsConfigurationDetailedStatus = string; + +/** The provisioning state of the metrics configuration. */ +export enum KnownClusterMetricsConfigurationProvisioningState { + /** The Succeeded status. */ + Succeeded = "Succeeded", + /** The Failed status. */ + Failed = "Failed", + /** The Canceled status. */ + Canceled = "Canceled", + /** The Accepted status. */ + Accepted = "Accepted", + /** The Provisioning status. */ + Provisioning = "Provisioning", +} + +/** + * The provisioning state of the metrics configuration. \ + * {@link KnownClusterMetricsConfigurationProvisioningState} can be used interchangeably with ClusterMetricsConfigurationProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: The Succeeded status. \ + * **Failed**: The Failed status. \ + * **Canceled**: The Canceled status. \ + * **Accepted**: The Accepted status. \ + * **Provisioning**: The Provisioning status. + */ +export type ClusterMetricsConfigurationProvisioningState = string; + +/** ClusterMetricsConfigurationPatchParameters represents the body of the request to patch the metrics configuration of cluster. */ +export interface ClusterMetricsConfigurationPatchParameters { + /** Resource tags. */ + tags?: Record; + /** The interval in minutes by which metrics will be collected. */ + collectionInterval?: number; + /** The list of metric names that have been chosen to be enabled in addition to the core set of enabled metrics. */ + enabledMetrics?: string[]; +} + +export function clusterMetricsConfigurationPatchParametersSerializer( + item: ClusterMetricsConfigurationPatchParameters, +): any { + return { + properties: areAllPropsUndefined(item, ["collectionInterval", "enabledMetrics"]) + ? undefined + : _clusterMetricsConfigurationPatchParametersPropertiesSerializer(item), + tags: item["tags"], + }; +} + +/** ClusterMetricsConfigurationPatchProperties represents the properties of metrics configuration for the cluster for patching. */ +export interface ClusterMetricsConfigurationPatchProperties { + /** The interval in minutes by which metrics will be collected. */ + collectionInterval?: number; + /** The list of metric names that have been chosen to be enabled in addition to the core set of enabled metrics. */ + enabledMetrics?: string[]; +} + +export function clusterMetricsConfigurationPatchPropertiesSerializer( + item: ClusterMetricsConfigurationPatchProperties, +): any { + return { + collectionInterval: item["collectionInterval"], + enabledMetrics: !item["enabledMetrics"] + ? item["enabledMetrics"] + : item["enabledMetrics"].map((p: any) => { + return p; + }), + }; +} + +/** ClusterMetricsConfigurationList represents a list of metrics configuration of the cluster. */ +export interface _ClusterMetricsConfigurationList { + /** The ClusterMetricsConfiguration items on this page */ + value: ClusterMetricsConfiguration[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _clusterMetricsConfigurationListDeserializer( + item: any, +): _ClusterMetricsConfigurationList { + return { + value: clusterMetricsConfigurationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function clusterMetricsConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return clusterMetricsConfigurationSerializer(item); + }); +} + +export function clusterMetricsConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return clusterMetricsConfigurationDeserializer(item); + }); +} + +/** + * The available API versions. + * Note: Order Matters more than naming. If you add a new version, please add it to the correct location based on the version date and which versions + * have preceded it. + */ +export enum KnownVersions { + /** The 2025-09-01 API version. */ + V20250901 = "2025-09-01", + /** The 2026-01-01-preview API version. */ + V20260101Preview = "2026-01-01-preview", + /** The 2026-05-01-preview API version. */ + V20260501Preview = "2026-05-01-preview", +} + +export function _accessBridgePropertiesSerializer(item: AccessBridge): any { + return { + ipv4ConnectedPrefix: item["ipv4ConnectedPrefix"], + ipv6ConnectedPrefix: item["ipv6ConnectedPrefix"], + networkId: item["networkId"], + securityRules: !item["securityRules"] + ? item["securityRules"] + : accessBridgeSecurityRuleArraySerializer(item["securityRules"]), + }; +} + +export function _accessBridgePropertiesDeserializer(item: any) { + return { + ipv4ConnectedPrefix: item["ipv4ConnectedPrefix"], + ipv6ConnectedPrefix: item["ipv6ConnectedPrefix"], + networkId: item["networkId"], + securityRules: !item["securityRules"] + ? item["securityRules"] + : accessBridgeSecurityRuleArrayDeserializer(item["securityRules"]), + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + endpoints: !item["endpoints"] + ? item["endpoints"] + : accessBridgeEndpointArrayDeserializer(item["endpoints"]), + protocol: item["protocol"], + provisioningState: item["provisioningState"], + }; +} + +export function _operationStatusResultPropertiesDeserializer(item: any) { + return { + exitCode: item["exitCode"], + outputHead: item["outputHead"], + resultRef: item["resultRef"], + resultUrl: item["resultUrl"], + }; +} + +export function _bareMetalMachinePropertiesSerializer(item: BareMetalMachine): any { + return { + bmcConnectionString: item["bmcConnectionString"], + bmcCredentials: administrativeCredentialsSerializer(item["bmcCredentials"]), + bmcMacAddress: item["bmcMacAddress"], + bootMacAddress: item["bootMacAddress"], + machineDetails: item["machineDetails"], + machineName: item["machineName"], + machineSkuId: item["machineSkuId"], + rackId: item["rackId"], + rackSlot: item["rackSlot"], + serialNumber: item["serialNumber"], + machineClusterVersion: item["machineClusterVersion"], + }; +} + +export function _bareMetalMachinePropertiesDeserializer(item: any) { + return { + bmcConnectionString: item["bmcConnectionString"], + bmcCredentials: administrativeCredentialsDeserializer(item["bmcCredentials"]), + bmcMacAddress: item["bmcMacAddress"], + bootMacAddress: item["bootMacAddress"], + machineDetails: item["machineDetails"], + machineName: item["machineName"], + machineSkuId: item["machineSkuId"], + rackId: item["rackId"], + rackSlot: item["rackSlot"], + serialNumber: item["serialNumber"], + actionStates: !item["actionStates"] + ? item["actionStates"] + : actionStateArrayDeserializer(item["actionStates"]), + associatedResourceIds: !item["associatedResourceIds"] + ? item["associatedResourceIds"] + : item["associatedResourceIds"].map((p: any) => { + return p; + }), + bmcIpv4Address: item["bmcIpv4Address"], + bmcIpv6Address: item["bmcIpv6Address"], + caCertificate: !item["caCertificate"] + ? item["caCertificate"] + : certificateInfoDeserializer(item["caCertificate"]), + clusterId: item["clusterId"], + cordonStatus: item["cordonStatus"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + hardwareInventory: !item["hardwareInventory"] + ? item["hardwareInventory"] + : hardwareInventoryDeserializer(item["hardwareInventory"]), + hardwareValidationStatus: !item["hardwareValidationStatus"] + ? item["hardwareValidationStatus"] + : hardwareValidationStatusDeserializer(item["hardwareValidationStatus"]), + hybridAksClustersAssociatedIds: !item["hybridAksClustersAssociatedIds"] + ? item["hybridAksClustersAssociatedIds"] + : item["hybridAksClustersAssociatedIds"].map((p: any) => { + return p; + }), + kubernetesNodeName: item["kubernetesNodeName"], + kubernetesVersion: item["kubernetesVersion"], + machineClusterVersion: item["machineClusterVersion"], + machineRoles: !item["machineRoles"] + ? item["machineRoles"] + : item["machineRoles"].map((p: any) => { + return p; + }), + monitoringConfigurationStatus: !item["monitoringConfigurationStatus"] + ? item["monitoringConfigurationStatus"] + : bareMetalMachineMonitoringConfigurationStatusDeserializer( + item["monitoringConfigurationStatus"], + ), + oamIpv4Address: item["oamIpv4Address"], + oamIpv6Address: item["oamIpv6Address"], + osImage: item["osImage"], + powerState: item["powerState"], + readyState: item["readyState"], + runtimeProtectionStatus: !item["runtimeProtectionStatus"] + ? item["runtimeProtectionStatus"] + : runtimeProtectionStatusDeserializer(item["runtimeProtectionStatus"]), + secretRotationStatus: !item["secretRotationStatus"] + ? item["secretRotationStatus"] + : secretRotationStatusArrayDeserializer(item["secretRotationStatus"]), + serviceTag: item["serviceTag"], + virtualMachinesAssociatedIds: !item["virtualMachinesAssociatedIds"] + ? item["virtualMachinesAssociatedIds"] + : item["virtualMachinesAssociatedIds"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function _bareMetalMachinePatchParametersPropertiesSerializer( + item: BareMetalMachinePatchParameters, +): any { + return { machineDetails: item["machineDetails"] }; +} + +export function _cloudServicesNetworkPropertiesSerializer(item: CloudServicesNetwork): any { + return { + additionalEgressEndpoints: !item["additionalEgressEndpoints"] + ? item["additionalEgressEndpoints"] + : egressEndpointArraySerializer(item["additionalEgressEndpoints"]), + enableDefaultEgressEndpoints: item["enableDefaultEgressEndpoints"], + storageOptions: !item["storageOptions"] + ? item["storageOptions"] + : cloudServicesNetworkStorageOptionsSerializer(item["storageOptions"]), + }; +} + +export function _cloudServicesNetworkPropertiesDeserializer(item: any) { + return { + additionalEgressEndpoints: !item["additionalEgressEndpoints"] + ? item["additionalEgressEndpoints"] + : egressEndpointArrayDeserializer(item["additionalEgressEndpoints"]), + enableDefaultEgressEndpoints: item["enableDefaultEgressEndpoints"], + storageOptions: !item["storageOptions"] + ? item["storageOptions"] + : cloudServicesNetworkStorageOptionsDeserializer(item["storageOptions"]), + associatedResourceIds: !item["associatedResourceIds"] + ? item["associatedResourceIds"] + : item["associatedResourceIds"].map((p: any) => { + return p; + }), + clusterId: item["clusterId"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + enabledEgressEndpoints: !item["enabledEgressEndpoints"] + ? item["enabledEgressEndpoints"] + : egressEndpointArrayDeserializer(item["enabledEgressEndpoints"]), + hybridAksClustersAssociatedIds: !item["hybridAksClustersAssociatedIds"] + ? item["hybridAksClustersAssociatedIds"] + : item["hybridAksClustersAssociatedIds"].map((p: any) => { + return p; + }), + interfaceName: item["interfaceName"], + storageStatus: !item["storageStatus"] + ? item["storageStatus"] + : cloudServicesNetworkStorageStatusDeserializer(item["storageStatus"]), + virtualMachinesAssociatedIds: !item["virtualMachinesAssociatedIds"] + ? item["virtualMachinesAssociatedIds"] + : item["virtualMachinesAssociatedIds"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function _cloudServicesNetworkPatchParametersPropertiesSerializer( + item: CloudServicesNetworkPatchParameters, +): any { + return { + additionalEgressEndpoints: !item["additionalEgressEndpoints"] + ? item["additionalEgressEndpoints"] + : egressEndpointArraySerializer(item["additionalEgressEndpoints"]), + enableDefaultEgressEndpoints: item["enableDefaultEgressEndpoints"], + storageOptions: !item["storageOptions"] + ? item["storageOptions"] + : cloudServicesNetworkStorageOptionsPatchSerializer(item["storageOptions"]), + }; +} + +export function _clusterManagerPropertiesSerializer(item: ClusterManager): any { + return { + analyticsWorkspaceId: item["analyticsWorkspaceId"], + availabilityZones: !item["availabilityZones"] + ? item["availabilityZones"] + : item["availabilityZones"].map((p: any) => { + return p; + }), + fabricControllerId: item["fabricControllerId"], + managedResourceGroupConfiguration: !item["managedResourceGroupConfiguration"] + ? item["managedResourceGroupConfiguration"] + : managedResourceGroupConfigurationSerializer(item["managedResourceGroupConfiguration"]), + vmSize: item["vmSize"], + }; +} + +export function _clusterManagerPropertiesDeserializer(item: any) { + return { + analyticsWorkspaceId: item["analyticsWorkspaceId"], + availabilityZones: !item["availabilityZones"] + ? item["availabilityZones"] + : item["availabilityZones"].map((p: any) => { + return p; + }), + clusterVersions: !item["clusterVersions"] + ? item["clusterVersions"] + : clusterAvailableVersionArrayDeserializer(item["clusterVersions"]), + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + fabricControllerId: item["fabricControllerId"], + managedResourceGroupConfiguration: !item["managedResourceGroupConfiguration"] + ? item["managedResourceGroupConfiguration"] + : managedResourceGroupConfigurationDeserializer(item["managedResourceGroupConfiguration"]), + managerExtendedLocation: !item["managerExtendedLocation"] + ? item["managerExtendedLocation"] + : extendedLocationDeserializer(item["managerExtendedLocation"]), + provisioningState: item["provisioningState"], + relayConfiguration: !item["relayConfiguration"] + ? item["relayConfiguration"] + : clusterManagerRelayConfigurationDeserializer(item["relayConfiguration"]), + vmSize: item["vmSize"], + }; +} + +export function _clusterPropertiesSerializer(item: Cluster): any { + return { + aggregatorOrSingleRackDefinition: rackDefinitionSerializer( + item["aggregatorOrSingleRackDefinition"], + ), + analyticsOutputSettings: !item["analyticsOutputSettings"] + ? item["analyticsOutputSettings"] + : analyticsOutputSettingsSerializer(item["analyticsOutputSettings"]), + analyticsWorkspaceId: item["analyticsWorkspaceId"], + clusterLocation: item["clusterLocation"], + clusterServicePrincipal: !item["clusterServicePrincipal"] + ? item["clusterServicePrincipal"] + : servicePrincipalInformationSerializer(item["clusterServicePrincipal"]), + clusterType: item["clusterType"], + clusterVersion: item["clusterVersion"], + commandOutputSettings: !item["commandOutputSettings"] + ? item["commandOutputSettings"] + : commandOutputSettingsSerializer(item["commandOutputSettings"]), + computeDeploymentThreshold: !item["computeDeploymentThreshold"] + ? item["computeDeploymentThreshold"] + : validationThresholdSerializer(item["computeDeploymentThreshold"]), + computeRackDefinitions: !item["computeRackDefinitions"] + ? item["computeRackDefinitions"] + : rackDefinitionArraySerializer(item["computeRackDefinitions"]), + managedResourceGroupConfiguration: !item["managedResourceGroupConfiguration"] + ? item["managedResourceGroupConfiguration"] + : managedResourceGroupConfigurationSerializer(item["managedResourceGroupConfiguration"]), + networkFabricId: item["networkFabricId"], + runtimeProtectionConfiguration: !item["runtimeProtectionConfiguration"] + ? item["runtimeProtectionConfiguration"] + : runtimeProtectionConfigurationSerializer(item["runtimeProtectionConfiguration"]), + secretArchive: !item["secretArchive"] + ? item["secretArchive"] + : clusterSecretArchiveSerializer(item["secretArchive"]), + secretArchiveSettings: !item["secretArchiveSettings"] + ? item["secretArchiveSettings"] + : secretArchiveSettingsSerializer(item["secretArchiveSettings"]), + updateStrategy: !item["updateStrategy"] + ? item["updateStrategy"] + : clusterUpdateStrategySerializer(item["updateStrategy"]), + vulnerabilityScanningSettings: !item["vulnerabilityScanningSettings"] + ? item["vulnerabilityScanningSettings"] + : vulnerabilityScanningSettingsSerializer(item["vulnerabilityScanningSettings"]), + }; +} + +export function _clusterPropertiesDeserializer(item: any) { + return { + aggregatorOrSingleRackDefinition: rackDefinitionDeserializer( + item["aggregatorOrSingleRackDefinition"], + ), + analyticsOutputSettings: !item["analyticsOutputSettings"] + ? item["analyticsOutputSettings"] + : analyticsOutputSettingsDeserializer(item["analyticsOutputSettings"]), + analyticsWorkspaceId: item["analyticsWorkspaceId"], + clusterLocation: item["clusterLocation"], + clusterServicePrincipal: !item["clusterServicePrincipal"] + ? item["clusterServicePrincipal"] + : servicePrincipalInformationDeserializer(item["clusterServicePrincipal"]), + clusterType: item["clusterType"], + clusterVersion: item["clusterVersion"], + commandOutputSettings: !item["commandOutputSettings"] + ? item["commandOutputSettings"] + : commandOutputSettingsDeserializer(item["commandOutputSettings"]), + computeDeploymentThreshold: !item["computeDeploymentThreshold"] + ? item["computeDeploymentThreshold"] + : validationThresholdDeserializer(item["computeDeploymentThreshold"]), + computeRackDefinitions: !item["computeRackDefinitions"] + ? item["computeRackDefinitions"] + : rackDefinitionArrayDeserializer(item["computeRackDefinitions"]), + managedResourceGroupConfiguration: !item["managedResourceGroupConfiguration"] + ? item["managedResourceGroupConfiguration"] + : managedResourceGroupConfigurationDeserializer(item["managedResourceGroupConfiguration"]), + networkFabricId: item["networkFabricId"], + runtimeProtectionConfiguration: !item["runtimeProtectionConfiguration"] + ? item["runtimeProtectionConfiguration"] + : runtimeProtectionConfigurationDeserializer(item["runtimeProtectionConfiguration"]), + secretArchive: !item["secretArchive"] + ? item["secretArchive"] + : clusterSecretArchiveDeserializer(item["secretArchive"]), + secretArchiveSettings: !item["secretArchiveSettings"] + ? item["secretArchiveSettings"] + : secretArchiveSettingsDeserializer(item["secretArchiveSettings"]), + updateStrategy: !item["updateStrategy"] + ? item["updateStrategy"] + : clusterUpdateStrategyDeserializer(item["updateStrategy"]), + vulnerabilityScanningSettings: !item["vulnerabilityScanningSettings"] + ? item["vulnerabilityScanningSettings"] + : vulnerabilityScanningSettingsDeserializer(item["vulnerabilityScanningSettings"]), + actionStates: !item["actionStates"] + ? item["actionStates"] + : actionStateArrayDeserializer(item["actionStates"]), + availableUpgradeVersions: !item["availableUpgradeVersions"] + ? item["availableUpgradeVersions"] + : clusterAvailableUpgradeVersionArrayDeserializer(item["availableUpgradeVersions"]), + clusterCapacity: !item["clusterCapacity"] + ? item["clusterCapacity"] + : clusterCapacityDeserializer(item["clusterCapacity"]), + clusterConnectionStatus: item["clusterConnectionStatus"], + clusterExtendedLocation: !item["clusterExtendedLocation"] + ? item["clusterExtendedLocation"] + : extendedLocationDeserializer(item["clusterExtendedLocation"]), + clusterManagerConnectionStatus: item["clusterManagerConnectionStatus"], + clusterManagerId: item["clusterManagerId"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + hybridAksExtendedLocation: !item["hybridAksExtendedLocation"] + ? item["hybridAksExtendedLocation"] + : extendedLocationDeserializer(item["hybridAksExtendedLocation"]), + lastSuccessfulVersionUpdateTime: !item["lastSuccessfulVersionUpdateTime"] + ? item["lastSuccessfulVersionUpdateTime"] + : new Date(item["lastSuccessfulVersionUpdateTime"]), + managedCredentials: !item["managedCredentials"] + ? item["managedCredentials"] + : item["managedCredentials"].map((p: any) => { + return p; + }), + manualActionCount: item["manualActionCount"], + supportExpiryDate: item["supportExpiryDate"], + workloadResourceIds: !item["workloadResourceIds"] + ? item["workloadResourceIds"] + : item["workloadResourceIds"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function _clusterPatchParametersPropertiesSerializer(item: ClusterPatchParameters): any { + return { + aggregatorOrSingleRackDefinition: !item["aggregatorOrSingleRackDefinition"] + ? item["aggregatorOrSingleRackDefinition"] + : rackDefinitionSerializer(item["aggregatorOrSingleRackDefinition"]), + analyticsOutputSettings: !item["analyticsOutputSettings"] + ? item["analyticsOutputSettings"] + : analyticsOutputSettingsSerializer(item["analyticsOutputSettings"]), + clusterLocation: item["clusterLocation"], + clusterServicePrincipal: !item["clusterServicePrincipal"] + ? item["clusterServicePrincipal"] + : servicePrincipalInformationSerializer(item["clusterServicePrincipal"]), + commandOutputSettings: !item["commandOutputSettings"] + ? item["commandOutputSettings"] + : commandOutputSettingsSerializer(item["commandOutputSettings"]), + computeDeploymentThreshold: !item["computeDeploymentThreshold"] + ? item["computeDeploymentThreshold"] + : validationThresholdSerializer(item["computeDeploymentThreshold"]), + computeRackDefinitions: !item["computeRackDefinitions"] + ? item["computeRackDefinitions"] + : rackDefinitionArraySerializer(item["computeRackDefinitions"]), + runtimeProtectionConfiguration: !item["runtimeProtectionConfiguration"] + ? item["runtimeProtectionConfiguration"] + : runtimeProtectionConfigurationSerializer(item["runtimeProtectionConfiguration"]), + secretArchive: !item["secretArchive"] + ? item["secretArchive"] + : clusterSecretArchiveSerializer(item["secretArchive"]), + secretArchiveSettings: !item["secretArchiveSettings"] + ? item["secretArchiveSettings"] + : secretArchiveSettingsSerializer(item["secretArchiveSettings"]), + updateStrategy: !item["updateStrategy"] + ? item["updateStrategy"] + : clusterUpdateStrategySerializer(item["updateStrategy"]), + vulnerabilityScanningSettings: !item["vulnerabilityScanningSettings"] + ? item["vulnerabilityScanningSettings"] + : vulnerabilityScanningSettingsPatchSerializer(item["vulnerabilityScanningSettings"]), + }; +} + +export function _kubernetesClusterPropertiesSerializer(item: KubernetesCluster): any { + return { + aadConfiguration: !item["aadConfiguration"] + ? item["aadConfiguration"] + : aadConfigurationSerializer(item["aadConfiguration"]), + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationSerializer(item["administratorConfiguration"]), + controlPlaneNodeConfiguration: controlPlaneNodeConfigurationSerializer( + item["controlPlaneNodeConfiguration"], + ), + initialAgentPoolConfigurations: initialAgentPoolConfigurationArraySerializer( + item["initialAgentPoolConfigurations"], + ), + kubernetesVersion: item["kubernetesVersion"], + managedResourceGroupConfiguration: !item["managedResourceGroupConfiguration"] + ? item["managedResourceGroupConfiguration"] + : managedResourceGroupConfigurationSerializer(item["managedResourceGroupConfiguration"]), + networkConfiguration: networkConfigurationSerializer(item["networkConfiguration"]), + }; +} + +export function _kubernetesClusterPropertiesDeserializer(item: any) { + return { + aadConfiguration: !item["aadConfiguration"] + ? item["aadConfiguration"] + : aadConfigurationDeserializer(item["aadConfiguration"]), + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationDeserializer(item["administratorConfiguration"]), + controlPlaneNodeConfiguration: controlPlaneNodeConfigurationDeserializer( + item["controlPlaneNodeConfiguration"], + ), + initialAgentPoolConfigurations: initialAgentPoolConfigurationArrayDeserializer( + item["initialAgentPoolConfigurations"], + ), + kubernetesVersion: item["kubernetesVersion"], + managedResourceGroupConfiguration: !item["managedResourceGroupConfiguration"] + ? item["managedResourceGroupConfiguration"] + : managedResourceGroupConfigurationDeserializer(item["managedResourceGroupConfiguration"]), + networkConfiguration: networkConfigurationDeserializer(item["networkConfiguration"]), + attachedNetworkIds: !item["attachedNetworkIds"] + ? item["attachedNetworkIds"] + : item["attachedNetworkIds"].map((p: any) => { + return p; + }), + availableUpgrades: !item["availableUpgrades"] + ? item["availableUpgrades"] + : availableUpgradeArrayDeserializer(item["availableUpgrades"]), + clusterId: item["clusterId"], + connectedClusterId: item["connectedClusterId"], + controlPlaneKubernetesVersion: item["controlPlaneKubernetesVersion"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + featureStatuses: !item["featureStatuses"] + ? item["featureStatuses"] + : featureStatusArrayDeserializer(item["featureStatuses"]), + nodes: !item["nodes"] ? item["nodes"] : kubernetesClusterNodeArrayDeserializer(item["nodes"]), + provisioningState: item["provisioningState"], + }; +} + +export function _kubernetesClusterPatchParametersPropertiesSerializer( + item: KubernetesClusterPatchParameters, +): any { + return { + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationPatchSerializer(item["administratorConfiguration"]), + controlPlaneNodeConfiguration: !item["controlPlaneNodeConfiguration"] + ? item["controlPlaneNodeConfiguration"] + : controlPlaneNodePatchConfigurationSerializer(item["controlPlaneNodeConfiguration"]), + kubernetesVersion: item["kubernetesVersion"], + }; +} + +export function _kubernetesVersionPropertiesSerializer(_item: KubernetesVersion): any { + return {}; +} + +export function _kubernetesVersionPropertiesDeserializer(item: any) { + return { + values: !item["values"] + ? item["values"] + : kubernetesVersionValueArrayDeserializer(item["values"]), + provisioningState: item["provisioningState"], + }; +} + +export function _l2NetworkPropertiesSerializer(item: L2Network): any { + return { + hybridAksPluginType: item["hybridAksPluginType"], + interfaceName: item["interfaceName"], + l2IsolationDomainId: item["l2IsolationDomainId"], + }; +} + +export function _l2NetworkPropertiesDeserializer(item: any) { + return { + hybridAksPluginType: item["hybridAksPluginType"], + interfaceName: item["interfaceName"], + l2IsolationDomainId: item["l2IsolationDomainId"], + associatedResourceIds: !item["associatedResourceIds"] + ? item["associatedResourceIds"] + : item["associatedResourceIds"].map((p: any) => { + return p; + }), + clusterId: item["clusterId"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + hybridAksClustersAssociatedIds: !item["hybridAksClustersAssociatedIds"] + ? item["hybridAksClustersAssociatedIds"] + : item["hybridAksClustersAssociatedIds"].map((p: any) => { + return p; + }), + virtualMachinesAssociatedIds: !item["virtualMachinesAssociatedIds"] + ? item["virtualMachinesAssociatedIds"] + : item["virtualMachinesAssociatedIds"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function _l3NetworkPropertiesSerializer(item: L3Network): any { + return { + hybridAksIpamEnabled: item["hybridAksIpamEnabled"], + hybridAksPluginType: item["hybridAksPluginType"], + interfaceName: item["interfaceName"], + ipAllocationType: item["ipAllocationType"], + ipv4ConnectedPrefix: item["ipv4ConnectedPrefix"], + ipv6ConnectedPrefix: item["ipv6ConnectedPrefix"], + l3IsolationDomainId: item["l3IsolationDomainId"], + vlan: item["vlan"], + }; +} + +export function _l3NetworkPropertiesDeserializer(item: any) { + return { + hybridAksIpamEnabled: item["hybridAksIpamEnabled"], + hybridAksPluginType: item["hybridAksPluginType"], + interfaceName: item["interfaceName"], + ipAllocationType: item["ipAllocationType"], + ipv4ConnectedPrefix: item["ipv4ConnectedPrefix"], + ipv6ConnectedPrefix: item["ipv6ConnectedPrefix"], + l3IsolationDomainId: item["l3IsolationDomainId"], + vlan: item["vlan"], + associatedResourceIds: !item["associatedResourceIds"] + ? item["associatedResourceIds"] + : item["associatedResourceIds"].map((p: any) => { + return p; + }), + clusterId: item["clusterId"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + hybridAksClustersAssociatedIds: !item["hybridAksClustersAssociatedIds"] + ? item["hybridAksClustersAssociatedIds"] + : item["hybridAksClustersAssociatedIds"].map((p: any) => { + return p; + }), + virtualMachinesAssociatedIds: !item["virtualMachinesAssociatedIds"] + ? item["virtualMachinesAssociatedIds"] + : item["virtualMachinesAssociatedIds"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function _machineSkuSlotPropertiesDeserializer(item: any) { + return { + bootstrapProtocol: item["bootstrapProtocol"], + cpuCores: item["cpuCores"], + cpuSockets: item["cpuSockets"], + disks: !item["disks"] ? item["disks"] : machineDiskArrayDeserializer(item["disks"]), + generation: item["generation"], + hardwareVersion: item["hardwareVersion"], + memoryCapacityGB: item["memoryCapacityGB"], + model: item["model"], + networkInterfaces: !item["networkInterfaces"] + ? item["networkInterfaces"] + : networkInterfaceArrayDeserializer(item["networkInterfaces"]), + totalThreads: item["totalThreads"], + vendor: item["vendor"], + }; +} + +export function _storageApplianceSkuSlotPropertiesDeserializer(item: any) { + return { + capacityGB: item["capacityGB"], + model: item["model"], + }; +} + +export function _rackSkuPropertiesDeserializer(item: any) { + return { + computeMachines: !item["computeMachines"] + ? item["computeMachines"] + : machineSkuSlotArrayDeserializer(item["computeMachines"]), + controllerMachines: !item["controllerMachines"] + ? item["controllerMachines"] + : machineSkuSlotArrayDeserializer(item["controllerMachines"]), + deploymentType: item["deploymentType"], + description: item["description"], + maxClusterSlots: item["maxClusterSlots"], + provisioningState: item["provisioningState"], + rackType: item["rackType"], + storageAppliances: !item["storageAppliances"] + ? item["storageAppliances"] + : storageApplianceSkuSlotArrayDeserializer(item["storageAppliances"]), + supportedRackSkuIds: !item["supportedRackSkuIds"] + ? item["supportedRackSkuIds"] + : item["supportedRackSkuIds"].map((p: any) => { + return p; + }), + }; +} + +export function _rackPropertiesSerializer(item: Rack): any { + return { + availabilityZone: item["availabilityZone"], + rackLocation: item["rackLocation"], + rackSerialNumber: item["rackSerialNumber"], + rackSkuId: item["rackSkuId"], + }; +} + +export function _rackPropertiesDeserializer(item: any) { + return { + availabilityZone: item["availabilityZone"], + rackLocation: item["rackLocation"], + rackSerialNumber: item["rackSerialNumber"], + rackSkuId: item["rackSkuId"], + clusterId: item["clusterId"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + provisioningState: item["provisioningState"], + }; +} + +export function _rackPatchParametersPropertiesSerializer(item: RackPatchParameters): any { + return { rackLocation: item["rackLocation"], rackSerialNumber: item["rackSerialNumber"] }; +} + +export function _storageAppliancePropertiesSerializer(item: StorageAppliance): any { + return { + administratorCredentials: administrativeCredentialsSerializer(item["administratorCredentials"]), + rackId: item["rackId"], + rackSlot: item["rackSlot"], + serialNumber: item["serialNumber"], + storageApplianceSkuId: item["storageApplianceSkuId"], + }; +} + +export function _storageAppliancePropertiesDeserializer(item: any) { + return { + administratorCredentials: administrativeCredentialsDeserializer( + item["administratorCredentials"], + ), + rackId: item["rackId"], + rackSlot: item["rackSlot"], + serialNumber: item["serialNumber"], + storageApplianceSkuId: item["storageApplianceSkuId"], + caCertificate: !item["caCertificate"] + ? item["caCertificate"] + : certificateInfoDeserializer(item["caCertificate"]), + capacity: item["capacity"], + capacityUsed: item["capacityUsed"], + clusterId: item["clusterId"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + expansionShelves: !item["expansionShelves"] + ? item["expansionShelves"] + : storageApplianceExpansionShelfArrayDeserializer(item["expansionShelves"]), + managementIpv4Address: item["managementIpv4Address"], + manufacturer: item["manufacturer"], + model: item["model"], + monitoringConfigurationStatus: !item["monitoringConfigurationStatus"] + ? item["monitoringConfigurationStatus"] + : storageApplianceMonitoringConfigurationStatusDeserializer( + item["monitoringConfigurationStatus"], + ), + remoteVendorManagementFeature: item["remoteVendorManagementFeature"], + remoteVendorManagementStatus: item["remoteVendorManagementStatus"], + secretRotationStatus: !item["secretRotationStatus"] + ? item["secretRotationStatus"] + : secretRotationStatusArrayDeserializer(item["secretRotationStatus"]), + version: item["version"], + provisioningState: item["provisioningState"], + }; +} + +export function _storageAppliancePatchParametersPropertiesSerializer( + item: StorageAppliancePatchParameters, +): any { + return { serialNumber: item["serialNumber"] }; +} + +export function _trunkedNetworkPropertiesSerializer(item: TrunkedNetwork): any { + return { + hybridAksPluginType: item["hybridAksPluginType"], + interfaceName: item["interfaceName"], + isolationDomainIds: item["isolationDomainIds"].map((p: any) => { + return p; + }), + vlans: item["vlans"].map((p: any) => { + return p; + }), + }; +} + +export function _trunkedNetworkPropertiesDeserializer(item: any) { + return { + hybridAksPluginType: item["hybridAksPluginType"], + interfaceName: item["interfaceName"], + isolationDomainIds: item["isolationDomainIds"].map((p: any) => { + return p; + }), + vlans: item["vlans"].map((p: any) => { + return p; + }), + associatedResourceIds: !item["associatedResourceIds"] + ? item["associatedResourceIds"] + : item["associatedResourceIds"].map((p: any) => { + return p; + }), + clusterId: item["clusterId"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + hybridAksClustersAssociatedIds: !item["hybridAksClustersAssociatedIds"] + ? item["hybridAksClustersAssociatedIds"] + : item["hybridAksClustersAssociatedIds"].map((p: any) => { + return p; + }), + virtualMachinesAssociatedIds: !item["virtualMachinesAssociatedIds"] + ? item["virtualMachinesAssociatedIds"] + : item["virtualMachinesAssociatedIds"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function _virtualMachinePropertiesSerializer(item: VirtualMachine): any { + return { + adminUsername: item["adminUsername"], + bootMethod: item["bootMethod"], + cloudServicesNetworkAttachment: networkAttachmentSerializer( + item["cloudServicesNetworkAttachment"], + ), + cpuCores: item["cpuCores"], + isolateEmulatorThread: item["isolateEmulatorThread"], + memorySizeGB: item["memorySizeGB"], + networkAttachments: !item["networkAttachments"] + ? item["networkAttachments"] + : networkAttachmentArraySerializer(item["networkAttachments"]), + networkData: item["networkData"], + networkDataContent: item["networkDataContent"], + placementHints: !item["placementHints"] + ? item["placementHints"] + : virtualMachinePlacementHintArraySerializer(item["placementHints"]), + sshPublicKeys: !item["sshPublicKeys"] + ? item["sshPublicKeys"] + : sshPublicKeyArraySerializer(item["sshPublicKeys"]), + storageProfile: storageProfileSerializer(item["storageProfile"]), + userData: item["userData"], + userDataContent: item["userDataContent"], + virtioInterface: item["virtioInterface"], + vmDeviceModel: item["vmDeviceModel"], + vmImage: item["vmImage"], + vmImageRepositoryCredentials: !item["vmImageRepositoryCredentials"] + ? item["vmImageRepositoryCredentials"] + : imageRepositoryCredentialsSerializer(item["vmImageRepositoryCredentials"]), + consoleExtendedLocation: !item["consoleExtendedLocation"] + ? item["consoleExtendedLocation"] + : extendedLocationSerializer(item["consoleExtendedLocation"]), + }; +} + +export function _virtualMachinePropertiesDeserializer(item: any) { + return { + adminUsername: item["adminUsername"], + bootMethod: item["bootMethod"], + cloudServicesNetworkAttachment: networkAttachmentDeserializer( + item["cloudServicesNetworkAttachment"], + ), + cpuCores: item["cpuCores"], + isolateEmulatorThread: item["isolateEmulatorThread"], + memorySizeGB: item["memorySizeGB"], + networkAttachments: !item["networkAttachments"] + ? item["networkAttachments"] + : networkAttachmentArrayDeserializer(item["networkAttachments"]), + networkData: item["networkData"], + networkDataContent: item["networkDataContent"], + placementHints: !item["placementHints"] + ? item["placementHints"] + : virtualMachinePlacementHintArrayDeserializer(item["placementHints"]), + sshPublicKeys: !item["sshPublicKeys"] + ? item["sshPublicKeys"] + : sshPublicKeyArrayDeserializer(item["sshPublicKeys"]), + storageProfile: storageProfileDeserializer(item["storageProfile"]), + userData: item["userData"], + userDataContent: item["userDataContent"], + virtioInterface: item["virtioInterface"], + vmDeviceModel: item["vmDeviceModel"], + vmImage: item["vmImage"], + vmImageRepositoryCredentials: !item["vmImageRepositoryCredentials"] + ? item["vmImageRepositoryCredentials"] + : imageRepositoryCredentialsDeserializer(item["vmImageRepositoryCredentials"]), + availabilityZone: item["availabilityZone"], + bareMetalMachineId: item["bareMetalMachineId"], + clusterId: item["clusterId"], + consoleExtendedLocation: !item["consoleExtendedLocation"] + ? item["consoleExtendedLocation"] + : extendedLocationDeserializer(item["consoleExtendedLocation"]), + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + powerState: item["powerState"], + volumes: !item["volumes"] + ? item["volumes"] + : item["volumes"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function _virtualMachinePatchParametersPropertiesSerializer( + item: VirtualMachinePatchParameters, +): any { + return { + vmImageRepositoryCredentials: !item["vmImageRepositoryCredentials"] + ? item["vmImageRepositoryCredentials"] + : imageRepositoryCredentialsSerializer(item["vmImageRepositoryCredentials"]), + }; +} + +export function _volumePropertiesSerializer(item: Volume): any { + return { sizeMiB: item["sizeMiB"], storageApplianceId: item["storageApplianceId"] }; +} + +export function _volumePropertiesDeserializer(item: any) { + return { + sizeMiB: item["sizeMiB"], + storageApplianceId: item["storageApplianceId"], + allocatedSizeMiB: item["allocatedSizeMiB"], + assignedStorageApplianceId: item["assignedStorageApplianceId"], + attachedTo: !item["attachedTo"] + ? item["attachedTo"] + : item["attachedTo"].map((p: any) => { + return p; + }), + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + serialNumber: item["serialNumber"], + provisioningState: item["provisioningState"], + }; +} + +export function _bareMetalMachineKeySetPropertiesSerializer(item: BareMetalMachineKeySet): any { + return { + azureGroupId: item["azureGroupId"], + expiration: item["expiration"].toISOString(), + jumpHostsAllowed: item["jumpHostsAllowed"].map((p: any) => { + return p; + }), + osGroupName: item["osGroupName"], + privilegeLevel: item["privilegeLevel"], + privilegeLevelName: item["privilegeLevelName"], + userList: keySetUserArraySerializer(item["userList"]), + }; +} + +export function _bareMetalMachineKeySetPropertiesDeserializer(item: any) { + return { + azureGroupId: item["azureGroupId"], + expiration: new Date(item["expiration"]), + jumpHostsAllowed: item["jumpHostsAllowed"].map((p: any) => { + return p; + }), + osGroupName: item["osGroupName"], + privilegeLevel: item["privilegeLevel"], + privilegeLevelName: item["privilegeLevelName"], + userList: keySetUserArrayDeserializer(item["userList"]), + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + lastValidation: !item["lastValidation"] + ? item["lastValidation"] + : new Date(item["lastValidation"]), + userListStatus: !item["userListStatus"] + ? item["userListStatus"] + : keySetUserStatusArrayDeserializer(item["userListStatus"]), + provisioningState: item["provisioningState"], + }; +} + +export function _bareMetalMachineKeySetPatchParametersPropertiesSerializer( + item: BareMetalMachineKeySetPatchParameters, +): any { + return { + expiration: !item["expiration"] ? item["expiration"] : item["expiration"].toISOString(), + jumpHostsAllowed: !item["jumpHostsAllowed"] + ? item["jumpHostsAllowed"] + : item["jumpHostsAllowed"].map((p: any) => { + return p; + }), + userList: !item["userList"] ? item["userList"] : keySetUserArraySerializer(item["userList"]), + }; +} + +export function _bmcKeySetPropertiesSerializer(item: BmcKeySet): any { + return { + azureGroupId: item["azureGroupId"], + expiration: item["expiration"].toISOString(), + privilegeLevel: item["privilegeLevel"], + userList: keySetUserArraySerializer(item["userList"]), + }; +} + +export function _bmcKeySetPropertiesDeserializer(item: any) { + return { + azureGroupId: item["azureGroupId"], + expiration: new Date(item["expiration"]), + privilegeLevel: item["privilegeLevel"], + userList: keySetUserArrayDeserializer(item["userList"]), + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + lastValidation: !item["lastValidation"] + ? item["lastValidation"] + : new Date(item["lastValidation"]), + userListStatus: !item["userListStatus"] + ? item["userListStatus"] + : keySetUserStatusArrayDeserializer(item["userListStatus"]), + provisioningState: item["provisioningState"], + }; +} + +export function _bmcKeySetPatchParametersPropertiesSerializer(item: BmcKeySetPatchParameters): any { + return { + expiration: !item["expiration"] ? item["expiration"] : item["expiration"].toISOString(), + userList: !item["userList"] ? item["userList"] : keySetUserArraySerializer(item["userList"]), + }; +} + +export function _agentPoolPropertiesSerializer(item: AgentPool): any { + return { + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationSerializer(item["administratorConfiguration"]), + agentOptions: !item["agentOptions"] + ? item["agentOptions"] + : agentOptionsSerializer(item["agentOptions"]), + attachedNetworkConfiguration: !item["attachedNetworkConfiguration"] + ? item["attachedNetworkConfiguration"] + : attachedNetworkConfigurationSerializer(item["attachedNetworkConfiguration"]), + availabilityZones: !item["availabilityZones"] + ? item["availabilityZones"] + : item["availabilityZones"].map((p: any) => { + return p; + }), + count: item["count"], + labels: !item["labels"] ? item["labels"] : kubernetesLabelArraySerializer(item["labels"]), + mode: item["mode"], + taints: !item["taints"] ? item["taints"] : kubernetesLabelArraySerializer(item["taints"]), + upgradeSettings: !item["upgradeSettings"] + ? item["upgradeSettings"] + : agentPoolUpgradeSettingsSerializer(item["upgradeSettings"]), + vmSkuName: item["vmSkuName"], + }; +} + +export function _agentPoolPropertiesDeserializer(item: any) { + return { + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : administratorConfigurationDeserializer(item["administratorConfiguration"]), + agentOptions: !item["agentOptions"] + ? item["agentOptions"] + : agentOptionsDeserializer(item["agentOptions"]), + attachedNetworkConfiguration: !item["attachedNetworkConfiguration"] + ? item["attachedNetworkConfiguration"] + : attachedNetworkConfigurationDeserializer(item["attachedNetworkConfiguration"]), + availabilityZones: !item["availabilityZones"] + ? item["availabilityZones"] + : item["availabilityZones"].map((p: any) => { + return p; + }), + count: item["count"], + labels: !item["labels"] ? item["labels"] : kubernetesLabelArrayDeserializer(item["labels"]), + mode: item["mode"], + taints: !item["taints"] ? item["taints"] : kubernetesLabelArrayDeserializer(item["taints"]), + upgradeSettings: !item["upgradeSettings"] + ? item["upgradeSettings"] + : agentPoolUpgradeSettingsDeserializer(item["upgradeSettings"]), + vmSkuName: item["vmSkuName"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + kubernetesVersion: item["kubernetesVersion"], + provisioningState: item["provisioningState"], + }; +} + +export function _agentPoolPatchParametersPropertiesSerializer(item: AgentPoolPatchParameters): any { + return { + administratorConfiguration: !item["administratorConfiguration"] + ? item["administratorConfiguration"] + : nodePoolAdministratorConfigurationPatchSerializer(item["administratorConfiguration"]), + count: item["count"], + upgradeSettings: !item["upgradeSettings"] + ? item["upgradeSettings"] + : agentPoolUpgradeSettingsSerializer(item["upgradeSettings"]), + }; +} + +export function _kubernetesClusterFeaturePropertiesSerializer(item: KubernetesClusterFeature): any { + return { + options: !item["options"] + ? item["options"] + : stringKeyValuePairArraySerializer(item["options"]), + }; +} + +export function _kubernetesClusterFeaturePropertiesDeserializer(item: any) { + return { + options: !item["options"] + ? item["options"] + : stringKeyValuePairArrayDeserializer(item["options"]), + availabilityLifecycle: item["availabilityLifecycle"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + required: item["required"], + version: item["version"], + provisioningState: item["provisioningState"], + }; +} + +export function _kubernetesClusterFeaturePatchParametersPropertiesSerializer( + item: KubernetesClusterFeaturePatchParameters, +): any { + return { + options: !item["options"] + ? item["options"] + : stringKeyValuePairArraySerializer(item["options"]), + }; +} + +export function _consolePropertiesSerializer(item: Console): any { + return { + enabled: item["enabled"], + expiration: !item["expiration"] ? item["expiration"] : item["expiration"].toISOString(), + sshPublicKey: sshPublicKeySerializer(item["sshPublicKey"]), + }; +} + +export function _consolePropertiesDeserializer(item: any) { + return { + enabled: item["enabled"], + expiration: !item["expiration"] ? item["expiration"] : new Date(item["expiration"]), + sshPublicKey: sshPublicKeyDeserializer(item["sshPublicKey"]), + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + privateLinkServiceId: item["privateLinkServiceId"], + virtualMachineAccessId: item["virtualMachineAccessId"], + provisioningState: item["provisioningState"], + }; +} + +export function _consolePatchParametersPropertiesSerializer(item: ConsolePatchParameters): any { + return { + enabled: item["enabled"], + expiration: !item["expiration"] ? item["expiration"] : item["expiration"].toISOString(), + sshPublicKey: !item["sshPublicKey"] + ? item["sshPublicKey"] + : sshPublicKeySerializer(item["sshPublicKey"]), + }; +} + +export function _clusterMetricsConfigurationPropertiesSerializer( + item: ClusterMetricsConfiguration, +): any { + return { + enabledMetrics: !item["enabledMetrics"] + ? item["enabledMetrics"] + : item["enabledMetrics"].map((p: any) => { + return p; + }), + collectionInterval: item["collectionInterval"], + }; +} + +export function _clusterMetricsConfigurationPropertiesDeserializer(item: any) { + return { + enabledMetrics: !item["enabledMetrics"] + ? item["enabledMetrics"] + : item["enabledMetrics"].map((p: any) => { + return p; + }), + collectionInterval: item["collectionInterval"], + detailedStatus: item["detailedStatus"], + detailedStatusMessage: item["detailedStatusMessage"], + disabledMetrics: !item["disabledMetrics"] + ? item["disabledMetrics"] + : item["disabledMetrics"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + }; +} + +export function _clusterMetricsConfigurationPatchParametersPropertiesSerializer( + item: ClusterMetricsConfigurationPatchParameters, +): any { + return { + collectionInterval: item["collectionInterval"], + enabledMetrics: !item["enabledMetrics"] + ? item["enabledMetrics"] + : item["enabledMetrics"].map((p: any) => { + return p; + }), + }; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/models/parameters.ts b/sdk/networkcloud/arm-networkcloud/src/models/parameters.ts deleted file mode 100644 index 6046c5e5431c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/models/parameters.ts +++ /dev/null @@ -1,716 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { - OperationParameter, - OperationURLParameter, - OperationQueryParameter, -} from "@azure/core-client"; -import { - BareMetalMachine as BareMetalMachineMapper, - BareMetalMachinePatchParameters as BareMetalMachinePatchParametersMapper, - BareMetalMachineCordonParameters as BareMetalMachineCordonParametersMapper, - BareMetalMachinePowerOffParameters as BareMetalMachinePowerOffParametersMapper, - BareMetalMachineReplaceParameters as BareMetalMachineReplaceParametersMapper, - BareMetalMachineRunCommandParameters as BareMetalMachineRunCommandParametersMapper, - BareMetalMachineRunDataExtractsParameters as BareMetalMachineRunDataExtractsParametersMapper, - BareMetalMachineRunReadCommandsParameters as BareMetalMachineRunReadCommandsParametersMapper, - CloudServicesNetwork as CloudServicesNetworkMapper, - CloudServicesNetworkPatchParameters as CloudServicesNetworkPatchParametersMapper, - ClusterManager as ClusterManagerMapper, - ClusterManagerPatchParameters as ClusterManagerPatchParametersMapper, - Cluster as ClusterMapper, - ClusterPatchParameters as ClusterPatchParametersMapper, - ClusterContinueUpdateVersionParameters as ClusterContinueUpdateVersionParametersMapper, - ClusterDeployParameters as ClusterDeployParametersMapper, - ClusterScanRuntimeParameters as ClusterScanRuntimeParametersMapper, - ClusterUpdateVersionParameters as ClusterUpdateVersionParametersMapper, - KubernetesCluster as KubernetesClusterMapper, - KubernetesClusterPatchParameters as KubernetesClusterPatchParametersMapper, - KubernetesClusterRestartNodeParameters as KubernetesClusterRestartNodeParametersMapper, - L2Network as L2NetworkMapper, - L2NetworkPatchParameters as L2NetworkPatchParametersMapper, - L3Network as L3NetworkMapper, - L3NetworkPatchParameters as L3NetworkPatchParametersMapper, - Rack as RackMapper, - RackPatchParameters as RackPatchParametersMapper, - StorageAppliance as StorageApplianceMapper, - StorageAppliancePatchParameters as StorageAppliancePatchParametersMapper, - StorageApplianceEnableRemoteVendorManagementParameters as StorageApplianceEnableRemoteVendorManagementParametersMapper, - StorageApplianceRunReadCommandsParameters as StorageApplianceRunReadCommandsParametersMapper, - TrunkedNetwork as TrunkedNetworkMapper, - TrunkedNetworkPatchParameters as TrunkedNetworkPatchParametersMapper, - VirtualMachine as VirtualMachineMapper, - VirtualMachinePatchParameters as VirtualMachinePatchParametersMapper, - VirtualMachineAssignRelayParameters as VirtualMachineAssignRelayParametersMapper, - VirtualMachinePowerOffParameters as VirtualMachinePowerOffParametersMapper, - Volume as VolumeMapper, - VolumePatchParameters as VolumePatchParametersMapper, - BareMetalMachineKeySet as BareMetalMachineKeySetMapper, - BareMetalMachineKeySetPatchParameters as BareMetalMachineKeySetPatchParametersMapper, - BmcKeySet as BmcKeySetMapper, - BmcKeySetPatchParameters as BmcKeySetPatchParametersMapper, - ClusterMetricsConfiguration as ClusterMetricsConfigurationMapper, - ClusterMetricsConfigurationPatchParameters as ClusterMetricsConfigurationPatchParametersMapper, - AgentPool as AgentPoolMapper, - AgentPoolPatchParameters as AgentPoolPatchParametersMapper, - KubernetesClusterFeature as KubernetesClusterFeatureMapper, - KubernetesClusterFeaturePatchParameters as KubernetesClusterFeaturePatchParametersMapper, - Console as ConsoleMapper, - ConsolePatchParameters as ConsolePatchParametersMapper, -} from "../models/mappers.js"; - -export const accept: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Accept", - type: { - name: "String", - }, - }, -}; - -export const $host: OperationURLParameter = { - parameterPath: "$host", - mapper: { - serializedName: "$host", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2025-09-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String", - }, - }, -}; - -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - serializedName: "subscriptionId", - required: true, - type: { - name: "Uuid", - }, - }, -}; - -export const top: OperationQueryParameter = { - parameterPath: ["options", "top"], - mapper: { - serializedName: "$top", - type: { - name: "Number", - }, - }, -}; - -export const skipToken: OperationQueryParameter = { - parameterPath: ["options", "skipToken"], - mapper: { - serializedName: "$skipToken", - type: { - name: "String", - }, - }, -}; - -export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - constraints: { - MaxLength: 90, - MinLength: 1, - }, - serializedName: "resourceGroupName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const bareMetalMachineName: OperationURLParameter = { - parameterPath: "bareMetalMachineName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9]{0,62}[a-zA-Z0-9])$"), - }, - serializedName: "bareMetalMachineName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String", - }, - }, -}; - -export const bareMetalMachineParameters: OperationParameter = { - parameterPath: "bareMetalMachineParameters", - mapper: BareMetalMachineMapper, -}; - -export const ifMatch: OperationParameter = { - parameterPath: ["options", "ifMatch"], - mapper: { - serializedName: "If-Match", - type: { - name: "String", - }, - }, -}; - -export const ifNoneMatch: OperationParameter = { - parameterPath: ["options", "ifNoneMatch"], - mapper: { - serializedName: "If-None-Match", - type: { - name: "String", - }, - }, -}; - -export const bareMetalMachineUpdateParameters: OperationParameter = { - parameterPath: ["options", "bareMetalMachineUpdateParameters"], - mapper: BareMetalMachinePatchParametersMapper, -}; - -export const bareMetalMachineCordonParameters: OperationParameter = { - parameterPath: ["options", "bareMetalMachineCordonParameters"], - mapper: BareMetalMachineCordonParametersMapper, -}; - -export const bareMetalMachinePowerOffParameters: OperationParameter = { - parameterPath: ["options", "bareMetalMachinePowerOffParameters"], - mapper: BareMetalMachinePowerOffParametersMapper, -}; - -export const bareMetalMachineReplaceParameters: OperationParameter = { - parameterPath: ["options", "bareMetalMachineReplaceParameters"], - mapper: BareMetalMachineReplaceParametersMapper, -}; - -export const bareMetalMachineRunCommandParameters: OperationParameter = { - parameterPath: "bareMetalMachineRunCommandParameters", - mapper: BareMetalMachineRunCommandParametersMapper, -}; - -export const bareMetalMachineRunDataExtractsParameters: OperationParameter = { - parameterPath: "bareMetalMachineRunDataExtractsParameters", - mapper: BareMetalMachineRunDataExtractsParametersMapper, -}; - -export const bareMetalMachineRunDataExtractsRestrictedParameters: OperationParameter = { - parameterPath: "bareMetalMachineRunDataExtractsRestrictedParameters", - mapper: BareMetalMachineRunDataExtractsParametersMapper, -}; - -export const bareMetalMachineRunReadCommandsParameters: OperationParameter = { - parameterPath: "bareMetalMachineRunReadCommandsParameters", - mapper: BareMetalMachineRunReadCommandsParametersMapper, -}; - -export const cloudServicesNetworkName: OperationURLParameter = { - parameterPath: "cloudServicesNetworkName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$"), - }, - serializedName: "cloudServicesNetworkName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const cloudServicesNetworkParameters: OperationParameter = { - parameterPath: "cloudServicesNetworkParameters", - mapper: CloudServicesNetworkMapper, -}; - -export const cloudServicesNetworkUpdateParameters: OperationParameter = { - parameterPath: ["options", "cloudServicesNetworkUpdateParameters"], - mapper: CloudServicesNetworkPatchParametersMapper, -}; - -export const clusterManagerName: OperationURLParameter = { - parameterPath: "clusterManagerName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$"), - }, - serializedName: "clusterManagerName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const clusterManagerParameters: OperationParameter = { - parameterPath: "clusterManagerParameters", - mapper: ClusterManagerMapper, -}; - -export const clusterManagerUpdateParameters: OperationParameter = { - parameterPath: ["options", "clusterManagerUpdateParameters"], - mapper: ClusterManagerPatchParametersMapper, -}; - -export const clusterName: OperationURLParameter = { - parameterPath: "clusterName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$"), - }, - serializedName: "clusterName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const clusterParameters: OperationParameter = { - parameterPath: "clusterParameters", - mapper: ClusterMapper, -}; - -export const clusterUpdateParameters: OperationParameter = { - parameterPath: ["options", "clusterUpdateParameters"], - mapper: ClusterPatchParametersMapper, -}; - -export const clusterContinueUpdateVersionParameters: OperationParameter = { - parameterPath: "clusterContinueUpdateVersionParameters", - mapper: ClusterContinueUpdateVersionParametersMapper, -}; - -export const clusterDeployParameters: OperationParameter = { - parameterPath: ["options", "clusterDeployParameters"], - mapper: ClusterDeployParametersMapper, -}; - -export const clusterScanRuntimeParameters: OperationParameter = { - parameterPath: ["options", "clusterScanRuntimeParameters"], - mapper: ClusterScanRuntimeParametersMapper, -}; - -export const clusterUpdateVersionParameters: OperationParameter = { - parameterPath: "clusterUpdateVersionParameters", - mapper: ClusterUpdateVersionParametersMapper, -}; - -export const kubernetesClusterName: OperationURLParameter = { - parameterPath: "kubernetesClusterName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$"), - }, - serializedName: "kubernetesClusterName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const kubernetesClusterParameters: OperationParameter = { - parameterPath: "kubernetesClusterParameters", - mapper: KubernetesClusterMapper, -}; - -export const kubernetesClusterUpdateParameters: OperationParameter = { - parameterPath: ["options", "kubernetesClusterUpdateParameters"], - mapper: KubernetesClusterPatchParametersMapper, -}; - -export const kubernetesClusterRestartNodeParameters: OperationParameter = { - parameterPath: "kubernetesClusterRestartNodeParameters", - mapper: KubernetesClusterRestartNodeParametersMapper, -}; - -export const l2NetworkName: OperationURLParameter = { - parameterPath: "l2NetworkName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$"), - }, - serializedName: "l2NetworkName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const l2NetworkParameters: OperationParameter = { - parameterPath: "l2NetworkParameters", - mapper: L2NetworkMapper, -}; - -export const l2NetworkUpdateParameters: OperationParameter = { - parameterPath: ["options", "l2NetworkUpdateParameters"], - mapper: L2NetworkPatchParametersMapper, -}; - -export const l3NetworkName: OperationURLParameter = { - parameterPath: "l3NetworkName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$"), - }, - serializedName: "l3NetworkName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const l3NetworkParameters: OperationParameter = { - parameterPath: "l3NetworkParameters", - mapper: L3NetworkMapper, -}; - -export const l3NetworkUpdateParameters: OperationParameter = { - parameterPath: ["options", "l3NetworkUpdateParameters"], - mapper: L3NetworkPatchParametersMapper, -}; - -export const rackSkuName: OperationURLParameter = { - parameterPath: "rackSkuName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,126}[a-zA-Z0-9])$"), - }, - serializedName: "rackSkuName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const rackName: OperationURLParameter = { - parameterPath: "rackName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$"), - }, - serializedName: "rackName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const rackParameters: OperationParameter = { - parameterPath: "rackParameters", - mapper: RackMapper, -}; - -export const rackUpdateParameters: OperationParameter = { - parameterPath: ["options", "rackUpdateParameters"], - mapper: RackPatchParametersMapper, -}; - -export const storageApplianceName: OperationURLParameter = { - parameterPath: "storageApplianceName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$"), - }, - serializedName: "storageApplianceName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const storageApplianceParameters: OperationParameter = { - parameterPath: "storageApplianceParameters", - mapper: StorageApplianceMapper, -}; - -export const storageApplianceUpdateParameters: OperationParameter = { - parameterPath: ["options", "storageApplianceUpdateParameters"], - mapper: StorageAppliancePatchParametersMapper, -}; - -export const storageApplianceEnableRemoteVendorManagementParameters: OperationParameter = { - parameterPath: ["options", "storageApplianceEnableRemoteVendorManagementParameters"], - mapper: StorageApplianceEnableRemoteVendorManagementParametersMapper, -}; - -export const storageApplianceRunReadCommandsParameters: OperationParameter = { - parameterPath: "storageApplianceRunReadCommandsParameters", - mapper: StorageApplianceRunReadCommandsParametersMapper, -}; - -export const trunkedNetworkName: OperationURLParameter = { - parameterPath: "trunkedNetworkName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$"), - }, - serializedName: "trunkedNetworkName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const trunkedNetworkParameters: OperationParameter = { - parameterPath: "trunkedNetworkParameters", - mapper: TrunkedNetworkMapper, -}; - -export const trunkedNetworkUpdateParameters: OperationParameter = { - parameterPath: ["options", "trunkedNetworkUpdateParameters"], - mapper: TrunkedNetworkPatchParametersMapper, -}; - -export const virtualMachineName: OperationURLParameter = { - parameterPath: "virtualMachineName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9]{0,62}[a-zA-Z0-9])$"), - }, - serializedName: "virtualMachineName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const virtualMachineParameters: OperationParameter = { - parameterPath: "virtualMachineParameters", - mapper: VirtualMachineMapper, -}; - -export const virtualMachineUpdateParameters: OperationParameter = { - parameterPath: ["options", "virtualMachineUpdateParameters"], - mapper: VirtualMachinePatchParametersMapper, -}; - -export const virtualMachineAssignRelayParameters: OperationParameter = { - parameterPath: ["options", "virtualMachineAssignRelayParameters"], - mapper: VirtualMachineAssignRelayParametersMapper, -}; - -export const virtualMachinePowerOffParameters: OperationParameter = { - parameterPath: ["options", "virtualMachinePowerOffParameters"], - mapper: VirtualMachinePowerOffParametersMapper, -}; - -export const volumeName: OperationURLParameter = { - parameterPath: "volumeName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,62}[a-zA-Z0-9])$"), - }, - serializedName: "volumeName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const volumeParameters: OperationParameter = { - parameterPath: "volumeParameters", - mapper: VolumeMapper, -}; - -export const volumeUpdateParameters: OperationParameter = { - parameterPath: ["options", "volumeUpdateParameters"], - mapper: VolumePatchParametersMapper, -}; - -export const bareMetalMachineKeySetName: OperationURLParameter = { - parameterPath: "bareMetalMachineKeySetName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$"), - }, - serializedName: "bareMetalMachineKeySetName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const bareMetalMachineKeySetParameters: OperationParameter = { - parameterPath: "bareMetalMachineKeySetParameters", - mapper: BareMetalMachineKeySetMapper, -}; - -export const bareMetalMachineKeySetUpdateParameters: OperationParameter = { - parameterPath: ["options", "bareMetalMachineKeySetUpdateParameters"], - mapper: BareMetalMachineKeySetPatchParametersMapper, -}; - -export const bmcKeySetName: OperationURLParameter = { - parameterPath: "bmcKeySetName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$"), - }, - serializedName: "bmcKeySetName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const bmcKeySetParameters: OperationParameter = { - parameterPath: "bmcKeySetParameters", - mapper: BmcKeySetMapper, -}; - -export const bmcKeySetUpdateParameters: OperationParameter = { - parameterPath: ["options", "bmcKeySetUpdateParameters"], - mapper: BmcKeySetPatchParametersMapper, -}; - -export const metricsConfigurationName: OperationURLParameter = { - parameterPath: "metricsConfigurationName", - mapper: { - constraints: { - Pattern: new RegExp("^default$"), - }, - serializedName: "metricsConfigurationName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const metricsConfigurationParameters: OperationParameter = { - parameterPath: "metricsConfigurationParameters", - mapper: ClusterMetricsConfigurationMapper, -}; - -export const metricsConfigurationUpdateParameters: OperationParameter = { - parameterPath: ["options", "metricsConfigurationUpdateParameters"], - mapper: ClusterMetricsConfigurationPatchParametersMapper, -}; - -export const agentPoolName: OperationURLParameter = { - parameterPath: "agentPoolName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-_]{0,28}[a-zA-Z0-9])$"), - }, - serializedName: "agentPoolName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const agentPoolParameters: OperationParameter = { - parameterPath: "agentPoolParameters", - mapper: AgentPoolMapper, -}; - -export const agentPoolUpdateParameters: OperationParameter = { - parameterPath: ["options", "agentPoolUpdateParameters"], - mapper: AgentPoolPatchParametersMapper, -}; - -export const featureName: OperationURLParameter = { - parameterPath: "featureName", - mapper: { - constraints: { - Pattern: new RegExp("^([a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$"), - }, - serializedName: "featureName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const kubernetesClusterFeatureParameters: OperationParameter = { - parameterPath: "kubernetesClusterFeatureParameters", - mapper: KubernetesClusterFeatureMapper, -}; - -export const kubernetesClusterFeatureUpdateParameters: OperationParameter = { - parameterPath: ["options", "kubernetesClusterFeatureUpdateParameters"], - mapper: KubernetesClusterFeaturePatchParametersMapper, -}; - -export const consoleName: OperationURLParameter = { - parameterPath: "consoleName", - mapper: { - constraints: { - Pattern: new RegExp("^default$"), - }, - serializedName: "consoleName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const consoleParameters: OperationParameter = { - parameterPath: "consoleParameters", - mapper: ConsoleMapper, -}; - -export const consoleUpdateParameters: OperationParameter = { - parameterPath: ["options", "consoleUpdateParameters"], - mapper: ConsolePatchParametersMapper, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/networkCloud.ts b/sdk/networkcloud/arm-networkcloud/src/networkCloud.ts index 56459e854d89..453e67a8efbd 100644 --- a/sdk/networkcloud/arm-networkcloud/src/networkCloud.ts +++ b/sdk/networkcloud/arm-networkcloud/src/networkCloud.ts @@ -1,208 +1,160 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import * as coreClient from "@azure/core-client"; -import * as coreRestPipeline from "@azure/core-rest-pipeline"; -import type { PipelineRequest, PipelineResponse, SendRequest } from "@azure/core-rest-pipeline"; -import type * as coreAuth from "@azure/core-auth"; import { - OperationsImpl, - BareMetalMachinesImpl, - CloudServicesNetworksImpl, - ClusterManagersImpl, - ClustersImpl, - KubernetesClustersImpl, - L2NetworksImpl, - L3NetworksImpl, - RackSkusImpl, - RacksImpl, - StorageAppliancesImpl, - TrunkedNetworksImpl, - VirtualMachinesImpl, - VolumesImpl, - BareMetalMachineKeySetsImpl, - BmcKeySetsImpl, - MetricsConfigurationsImpl, - AgentPoolsImpl, - KubernetesClusterFeaturesImpl, - ConsolesImpl, -} from "./operations/index.js"; -import type { - Operations, - BareMetalMachines, - CloudServicesNetworks, - ClusterManagers, - Clusters, - KubernetesClusters, - L2Networks, - L3Networks, - RackSkus, - Racks, - StorageAppliances, - TrunkedNetworks, - VirtualMachines, - Volumes, - BareMetalMachineKeySets, - BmcKeySets, - MetricsConfigurations, - AgentPools, - KubernetesClusterFeatures, - Consoles, -} from "./operationsInterfaces/index.js"; -import type { NetworkCloudOptionalParams } from "./models/index.js"; + NetworkCloudContext, + NetworkCloudOptionalParams, + createNetworkCloud, +} from "./api/index.js"; +import { + AccessBridgesOperations, + _getAccessBridgesOperations, +} from "./classic/accessBridges/index.js"; +import { AgentPoolsOperations, _getAgentPoolsOperations } from "./classic/agentPools/index.js"; +import { + BareMetalMachineKeySetsOperations, + _getBareMetalMachineKeySetsOperations, +} from "./classic/bareMetalMachineKeySets/index.js"; +import { + BareMetalMachinesOperations, + _getBareMetalMachinesOperations, +} from "./classic/bareMetalMachines/index.js"; +import { BmcKeySetsOperations, _getBmcKeySetsOperations } from "./classic/bmcKeySets/index.js"; +import { + CloudServicesNetworksOperations, + _getCloudServicesNetworksOperations, +} from "./classic/cloudServicesNetworks/index.js"; +import { + ClusterManagersOperations, + _getClusterManagersOperations, +} from "./classic/clusterManagers/index.js"; +import { ClustersOperations, _getClustersOperations } from "./classic/clusters/index.js"; +import { ConsolesOperations, _getConsolesOperations } from "./classic/consoles/index.js"; +import { + KubernetesClusterFeaturesOperations, + _getKubernetesClusterFeaturesOperations, +} from "./classic/kubernetesClusterFeatures/index.js"; +import { + KubernetesClustersOperations, + _getKubernetesClustersOperations, +} from "./classic/kubernetesClusters/index.js"; +import { + KubernetesVersionsOperations, + _getKubernetesVersionsOperations, +} from "./classic/kubernetesVersions/index.js"; +import { L2NetworksOperations, _getL2NetworksOperations } from "./classic/l2Networks/index.js"; +import { L3NetworksOperations, _getL3NetworksOperations } from "./classic/l3Networks/index.js"; +import { + MetricsConfigurationsOperations, + _getMetricsConfigurationsOperations, +} from "./classic/metricsConfigurations/index.js"; +import { OperationsOperations, _getOperationsOperations } from "./classic/operations/index.js"; +import { RackSkusOperations, _getRackSkusOperations } from "./classic/rackSkus/index.js"; +import { RacksOperations, _getRacksOperations } from "./classic/racks/index.js"; +import { + StorageAppliancesOperations, + _getStorageAppliancesOperations, +} from "./classic/storageAppliances/index.js"; +import { + TrunkedNetworksOperations, + _getTrunkedNetworksOperations, +} from "./classic/trunkedNetworks/index.js"; +import { + VirtualMachinesOperations, + _getVirtualMachinesOperations, +} from "./classic/virtualMachines/index.js"; +import { VolumesOperations, _getVolumesOperations } from "./classic/volumes/index.js"; +import { TokenCredential } from "@azure/core-auth"; +import { Pipeline } from "@azure/core-rest-pipeline"; + +export type { NetworkCloudOptionalParams } from "./api/networkCloudContext.js"; -export class NetworkCloud extends coreClient.ServiceClient { - $host: string; - apiVersion: string; - subscriptionId: string; +export class NetworkCloud { + private _client: NetworkCloudContext; + /** The pipeline used by this client to make requests */ + public readonly pipeline: Pipeline; - /** - * Initializes a new instance of the NetworkCloud class. - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param options The parameter options - */ + /** The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. */ constructor( - credentials: coreAuth.TokenCredential, + credential: TokenCredential, subscriptionId: string, - options?: NetworkCloudOptionalParams, + options: NetworkCloudOptionalParams = {}, ) { - if (credentials === undefined) { - throw new Error("'credentials' cannot be null"); - } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); - } - - // Initializing default values for options - if (!options) { - options = {}; - } - const defaults: NetworkCloudOptionalParams = { - requestContentType: "application/json; charset=utf-8", - credential: credentials, - }; - - const packageDetails = `azsdk-js-arm-networkcloud/1.3.0`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - - const optionsWithDefaults = { - ...defaults, + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-client` + : `azsdk-js-client`; + this._client = createNetworkCloud(credential, subscriptionId, { ...options, - userAgentOptions: { - userAgentPrefix, - }, - endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com", - }; - super(optionsWithDefaults); - - let bearerTokenAuthenticationPolicyFound: boolean = false; - if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = - options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( - (pipelinePolicy) => - pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName, - ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName, - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: - optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge, - }, - }), - ); - } - // Parameter assignments - this.subscriptionId = subscriptionId; - - // Assigning values to Constant parameters - this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2025-09-01"; - this.operations = new OperationsImpl(this); - this.bareMetalMachines = new BareMetalMachinesImpl(this); - this.cloudServicesNetworks = new CloudServicesNetworksImpl(this); - this.clusterManagers = new ClusterManagersImpl(this); - this.clusters = new ClustersImpl(this); - this.kubernetesClusters = new KubernetesClustersImpl(this); - this.l2Networks = new L2NetworksImpl(this); - this.l3Networks = new L3NetworksImpl(this); - this.rackSkus = new RackSkusImpl(this); - this.racks = new RacksImpl(this); - this.storageAppliances = new StorageAppliancesImpl(this); - this.trunkedNetworks = new TrunkedNetworksImpl(this); - this.virtualMachines = new VirtualMachinesImpl(this); - this.volumes = new VolumesImpl(this); - this.bareMetalMachineKeySets = new BareMetalMachineKeySetsImpl(this); - this.bmcKeySets = new BmcKeySetsImpl(this); - this.metricsConfigurations = new MetricsConfigurationsImpl(this); - this.agentPools = new AgentPoolsImpl(this); - this.kubernetesClusterFeatures = new KubernetesClusterFeaturesImpl(this); - this.consoles = new ConsolesImpl(this); - this.addCustomApiVersionPolicy(options.apiVersion); - } - - /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ - private addCustomApiVersionPolicy(apiVersion?: string) { - if (!apiVersion) { - return; - } - const apiVersionPolicy = { - name: "CustomApiVersionPolicy", - async sendRequest(request: PipelineRequest, next: SendRequest): Promise { - const param = request.url.split("?"); - if (param.length > 1) { - const newParams = param[1].split("&").map((item) => { - if (item.indexOf("api-version") > -1) { - return "api-version=" + apiVersion; - } else { - return item; - } - }); - request.url = param[0] + "?" + newParams.join("&"); - } - return next(request); - }, - }; - this.pipeline.addPolicy(apiVersionPolicy); + userAgentOptions: { userAgentPrefix }, + }); + this.pipeline = this._client.pipeline; + this.metricsConfigurations = _getMetricsConfigurationsOperations(this._client); + this.consoles = _getConsolesOperations(this._client); + this.kubernetesClusterFeatures = _getKubernetesClusterFeaturesOperations(this._client); + this.agentPools = _getAgentPoolsOperations(this._client); + this.bmcKeySets = _getBmcKeySetsOperations(this._client); + this.bareMetalMachineKeySets = _getBareMetalMachineKeySetsOperations(this._client); + this.volumes = _getVolumesOperations(this._client); + this.virtualMachines = _getVirtualMachinesOperations(this._client); + this.trunkedNetworks = _getTrunkedNetworksOperations(this._client); + this.storageAppliances = _getStorageAppliancesOperations(this._client); + this.racks = _getRacksOperations(this._client); + this.rackSkus = _getRackSkusOperations(this._client); + this.l3Networks = _getL3NetworksOperations(this._client); + this.l2Networks = _getL2NetworksOperations(this._client); + this.kubernetesVersions = _getKubernetesVersionsOperations(this._client); + this.kubernetesClusters = _getKubernetesClustersOperations(this._client); + this.clusters = _getClustersOperations(this._client); + this.clusterManagers = _getClusterManagersOperations(this._client); + this.cloudServicesNetworks = _getCloudServicesNetworksOperations(this._client); + this.bareMetalMachines = _getBareMetalMachinesOperations(this._client); + this.accessBridges = _getAccessBridgesOperations(this._client); + this.operations = _getOperationsOperations(this._client); } - operations: Operations; - bareMetalMachines: BareMetalMachines; - cloudServicesNetworks: CloudServicesNetworks; - clusterManagers: ClusterManagers; - clusters: Clusters; - kubernetesClusters: KubernetesClusters; - l2Networks: L2Networks; - l3Networks: L3Networks; - rackSkus: RackSkus; - racks: Racks; - storageAppliances: StorageAppliances; - trunkedNetworks: TrunkedNetworks; - virtualMachines: VirtualMachines; - volumes: Volumes; - bareMetalMachineKeySets: BareMetalMachineKeySets; - bmcKeySets: BmcKeySets; - metricsConfigurations: MetricsConfigurations; - agentPools: AgentPools; - kubernetesClusterFeatures: KubernetesClusterFeatures; - consoles: Consoles; + /** The operation groups for metricsConfigurations */ + public readonly metricsConfigurations: MetricsConfigurationsOperations; + /** The operation groups for consoles */ + public readonly consoles: ConsolesOperations; + /** The operation groups for kubernetesClusterFeatures */ + public readonly kubernetesClusterFeatures: KubernetesClusterFeaturesOperations; + /** The operation groups for agentPools */ + public readonly agentPools: AgentPoolsOperations; + /** The operation groups for bmcKeySets */ + public readonly bmcKeySets: BmcKeySetsOperations; + /** The operation groups for bareMetalMachineKeySets */ + public readonly bareMetalMachineKeySets: BareMetalMachineKeySetsOperations; + /** The operation groups for volumes */ + public readonly volumes: VolumesOperations; + /** The operation groups for virtualMachines */ + public readonly virtualMachines: VirtualMachinesOperations; + /** The operation groups for trunkedNetworks */ + public readonly trunkedNetworks: TrunkedNetworksOperations; + /** The operation groups for storageAppliances */ + public readonly storageAppliances: StorageAppliancesOperations; + /** The operation groups for racks */ + public readonly racks: RacksOperations; + /** The operation groups for rackSkus */ + public readonly rackSkus: RackSkusOperations; + /** The operation groups for l3Networks */ + public readonly l3Networks: L3NetworksOperations; + /** The operation groups for l2Networks */ + public readonly l2Networks: L2NetworksOperations; + /** The operation groups for kubernetesVersions */ + public readonly kubernetesVersions: KubernetesVersionsOperations; + /** The operation groups for kubernetesClusters */ + public readonly kubernetesClusters: KubernetesClustersOperations; + /** The operation groups for clusters */ + public readonly clusters: ClustersOperations; + /** The operation groups for clusterManagers */ + public readonly clusterManagers: ClusterManagersOperations; + /** The operation groups for cloudServicesNetworks */ + public readonly cloudServicesNetworks: CloudServicesNetworksOperations; + /** The operation groups for bareMetalMachines */ + public readonly bareMetalMachines: BareMetalMachinesOperations; + /** The operation groups for accessBridges */ + public readonly accessBridges: AccessBridgesOperations; + /** The operation groups for operations */ + public readonly operations: OperationsOperations; } diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/agentPools.ts b/sdk/networkcloud/arm-networkcloud/src/operations/agentPools.ts deleted file mode 100644 index c4a49947243d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/agentPools.ts +++ /dev/null @@ -1,654 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { AgentPools } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - AgentPool, - AgentPoolsListByKubernetesClusterNextOptionalParams, - AgentPoolsListByKubernetesClusterOptionalParams, - AgentPoolsListByKubernetesClusterResponse, - AgentPoolsGetOptionalParams, - AgentPoolsGetResponse, - AgentPoolsCreateOrUpdateOptionalParams, - AgentPoolsCreateOrUpdateResponse, - AgentPoolsDeleteOptionalParams, - AgentPoolsDeleteResponse, - AgentPoolsUpdateOptionalParams, - AgentPoolsUpdateResponse, - AgentPoolsListByKubernetesClusterNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AgentPools operations. */ -export class AgentPoolsImpl implements AgentPools { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class AgentPools class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of agent pools for the provided Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - public listByKubernetesCluster( - resourceGroupName: string, - kubernetesClusterName: string, - options?: AgentPoolsListByKubernetesClusterOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByKubernetesClusterPagingAll( - resourceGroupName, - kubernetesClusterName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByKubernetesClusterPagingPage( - resourceGroupName, - kubernetesClusterName, - options, - settings, - ); - }, - }; - } - - private async *listByKubernetesClusterPagingPage( - resourceGroupName: string, - kubernetesClusterName: string, - options?: AgentPoolsListByKubernetesClusterOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AgentPoolsListByKubernetesClusterResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByKubernetesCluster( - resourceGroupName, - kubernetesClusterName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByKubernetesClusterNext( - resourceGroupName, - kubernetesClusterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByKubernetesClusterPagingAll( - resourceGroupName: string, - kubernetesClusterName: string, - options?: AgentPoolsListByKubernetesClusterOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByKubernetesClusterPagingPage( - resourceGroupName, - kubernetesClusterName, - options, - )) { - yield* page; - } - } - - /** - * Get a list of agent pools for the provided Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - private _listByKubernetesCluster( - resourceGroupName: string, - kubernetesClusterName: string, - options?: AgentPoolsListByKubernetesClusterOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, kubernetesClusterName, options }, - listByKubernetesClusterOperationSpec, - ); - } - - /** - * Get properties of the provided Kubernetes cluster agent pool. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - kubernetesClusterName: string, - agentPoolName: string, - options?: AgentPoolsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, kubernetesClusterName, agentPoolName, options }, - getOperationSpec, - ); - } - - /** - * Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param agentPoolParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - kubernetesClusterName: string, - agentPoolName: string, - agentPoolParameters: AgentPool, - options?: AgentPoolsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AgentPoolsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - kubernetesClusterName, - agentPoolName, - agentPoolParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - AgentPoolsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param agentPoolParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - agentPoolName: string, - agentPoolParameters: AgentPool, - options?: AgentPoolsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - agentPoolParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided Kubernetes cluster agent pool. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - kubernetesClusterName: string, - agentPoolName: string, - options?: AgentPoolsDeleteOptionalParams, - ): Promise, AgentPoolsDeleteResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - kubernetesClusterName, - agentPoolName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - AgentPoolsDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the provided Kubernetes cluster agent pool. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - agentPoolName: string, - options?: AgentPoolsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - kubernetesClusterName: string, - agentPoolName: string, - options?: AgentPoolsUpdateOptionalParams, - ): Promise, AgentPoolsUpdateResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - kubernetesClusterName, - agentPoolName, - options, - }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - AgentPoolsUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - agentPoolName: string, - options?: AgentPoolsUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByKubernetesClusterNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param nextLink The nextLink from the previous successful call to the ListByKubernetesCluster - * method. - * @param options The options parameters. - */ - private _listByKubernetesClusterNext( - resourceGroupName: string, - kubernetesClusterName: string, - nextLink: string, - options?: AgentPoolsListByKubernetesClusterNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, kubernetesClusterName, nextLink, options }, - listByKubernetesClusterNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByKubernetesClusterOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AgentPoolList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AgentPool, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - Parameters.agentPoolName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AgentPool, - }, - 201: { - bodyMapper: Mappers.AgentPool, - }, - 202: { - bodyMapper: Mappers.AgentPool, - }, - 204: { - bodyMapper: Mappers.AgentPool, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.agentPoolParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - Parameters.agentPoolName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - Parameters.agentPoolName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.AgentPool, - }, - 201: { - bodyMapper: Mappers.AgentPool, - }, - 202: { - bodyMapper: Mappers.AgentPool, - }, - 204: { - bodyMapper: Mappers.AgentPool, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.agentPoolUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - Parameters.agentPoolName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const listByKubernetesClusterNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AgentPoolList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/bareMetalMachineKeySets.ts b/sdk/networkcloud/arm-networkcloud/src/operations/bareMetalMachineKeySets.ts deleted file mode 100644 index 837f72a0cf6d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/bareMetalMachineKeySets.ts +++ /dev/null @@ -1,650 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { BareMetalMachineKeySets } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - BareMetalMachineKeySet, - BareMetalMachineKeySetsListByClusterNextOptionalParams, - BareMetalMachineKeySetsListByClusterOptionalParams, - BareMetalMachineKeySetsListByClusterResponse, - BareMetalMachineKeySetsGetOptionalParams, - BareMetalMachineKeySetsGetResponse, - BareMetalMachineKeySetsCreateOrUpdateOptionalParams, - BareMetalMachineKeySetsCreateOrUpdateResponse, - BareMetalMachineKeySetsDeleteOptionalParams, - BareMetalMachineKeySetsDeleteResponse, - BareMetalMachineKeySetsUpdateOptionalParams, - BareMetalMachineKeySetsUpdateResponse, - BareMetalMachineKeySetsListByClusterNextResponse, -} from "../models/index.js"; - -/// -/** Class containing BareMetalMachineKeySets operations. */ -export class BareMetalMachineKeySetsImpl implements BareMetalMachineKeySets { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class BareMetalMachineKeySets class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of bare metal machine key sets for the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - public listByCluster( - resourceGroupName: string, - clusterName: string, - options?: BareMetalMachineKeySetsListByClusterOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByClusterPagingAll(resourceGroupName, clusterName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByClusterPagingPage(resourceGroupName, clusterName, options, settings); - }, - }; - } - - private async *listByClusterPagingPage( - resourceGroupName: string, - clusterName: string, - options?: BareMetalMachineKeySetsListByClusterOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: BareMetalMachineKeySetsListByClusterResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByCluster(resourceGroupName, clusterName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByClusterNext( - resourceGroupName, - clusterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByClusterPagingAll( - resourceGroupName: string, - clusterName: string, - options?: BareMetalMachineKeySetsListByClusterOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByClusterPagingPage( - resourceGroupName, - clusterName, - options, - )) { - yield* page; - } - } - - /** - * Get a list of bare metal machine key sets for the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - private _listByCluster( - resourceGroupName: string, - clusterName: string, - options?: BareMetalMachineKeySetsListByClusterOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - listByClusterOperationSpec, - ); - } - - /** - * Get bare metal machine key set of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - bareMetalMachineKeySetName: string, - options?: BareMetalMachineKeySetsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, bareMetalMachineKeySetName, options }, - getOperationSpec, - ); - } - - /** - * Create a new bare metal machine key set or update the existing one for the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param bareMetalMachineKeySetParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - bareMetalMachineKeySetName: string, - bareMetalMachineKeySetParameters: BareMetalMachineKeySet, - options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachineKeySetsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - bareMetalMachineKeySetParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachineKeySetsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new bare metal machine key set or update the existing one for the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param bareMetalMachineKeySetParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - bareMetalMachineKeySetName: string, - bareMetalMachineKeySetParameters: BareMetalMachineKeySet, - options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - bareMetalMachineKeySetParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the bare metal machine key set of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterName: string, - bareMetalMachineKeySetName: string, - options?: BareMetalMachineKeySetsDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachineKeySetsDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachineKeySetsDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the bare metal machine key set of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - bareMetalMachineKeySetName: string, - options?: BareMetalMachineKeySetsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - clusterName: string, - bareMetalMachineKeySetName: string, - options?: BareMetalMachineKeySetsUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachineKeySetsUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - options, - }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachineKeySetsUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - clusterName: string, - bareMetalMachineKeySetName: string, - options?: BareMetalMachineKeySetsUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByClusterNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param nextLink The nextLink from the previous successful call to the ListByCluster method. - * @param options The options parameters. - */ - private _listByClusterNext( - resourceGroupName: string, - clusterName: string, - nextLink: string, - options?: BareMetalMachineKeySetsListByClusterNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, nextLink, options }, - listByClusterNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByClusterOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BareMetalMachineKeySetList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BareMetalMachineKeySet, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.bareMetalMachineKeySetName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.BareMetalMachineKeySet, - }, - 201: { - bodyMapper: Mappers.BareMetalMachineKeySet, - }, - 202: { - bodyMapper: Mappers.BareMetalMachineKeySet, - }, - 204: { - bodyMapper: Mappers.BareMetalMachineKeySet, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.bareMetalMachineKeySetParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.bareMetalMachineKeySetName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.bareMetalMachineKeySetName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.BareMetalMachineKeySet, - }, - 201: { - bodyMapper: Mappers.BareMetalMachineKeySet, - }, - 202: { - bodyMapper: Mappers.BareMetalMachineKeySet, - }, - 204: { - bodyMapper: Mappers.BareMetalMachineKeySet, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.bareMetalMachineKeySetUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.bareMetalMachineKeySetName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const listByClusterNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BareMetalMachineKeySetList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/bareMetalMachines.ts b/sdk/networkcloud/arm-networkcloud/src/operations/bareMetalMachines.ts deleted file mode 100644 index 11bd1ef7ce1a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/bareMetalMachines.ts +++ /dev/null @@ -1,2078 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { BareMetalMachines } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - BareMetalMachine, - BareMetalMachinesListBySubscriptionNextOptionalParams, - BareMetalMachinesListBySubscriptionOptionalParams, - BareMetalMachinesListBySubscriptionResponse, - BareMetalMachinesListByResourceGroupNextOptionalParams, - BareMetalMachinesListByResourceGroupOptionalParams, - BareMetalMachinesListByResourceGroupResponse, - BareMetalMachinesGetOptionalParams, - BareMetalMachinesGetResponse, - BareMetalMachinesCreateOrUpdateOptionalParams, - BareMetalMachinesCreateOrUpdateResponse, - BareMetalMachinesDeleteOptionalParams, - BareMetalMachinesDeleteResponse, - BareMetalMachinesUpdateOptionalParams, - BareMetalMachinesUpdateResponse, - BareMetalMachinesCordonOptionalParams, - BareMetalMachinesCordonResponse, - BareMetalMachinesPowerOffOptionalParams, - BareMetalMachinesPowerOffResponse, - BareMetalMachinesReimageOptionalParams, - BareMetalMachinesReimageResponse, - BareMetalMachinesReplaceOptionalParams, - BareMetalMachinesReplaceResponse, - BareMetalMachinesRestartOptionalParams, - BareMetalMachinesRestartResponse, - BareMetalMachineRunCommandParameters, - BareMetalMachinesRunCommandOptionalParams, - BareMetalMachinesRunCommandResponse, - BareMetalMachineRunDataExtractsParameters, - BareMetalMachinesRunDataExtractsOptionalParams, - BareMetalMachinesRunDataExtractsResponse, - BareMetalMachinesRunDataExtractsRestrictedOptionalParams, - BareMetalMachinesRunDataExtractsRestrictedResponse, - BareMetalMachineRunReadCommandsParameters, - BareMetalMachinesRunReadCommandsOptionalParams, - BareMetalMachinesRunReadCommandsResponse, - BareMetalMachinesStartOptionalParams, - BareMetalMachinesStartResponse, - BareMetalMachinesUncordonOptionalParams, - BareMetalMachinesUncordonResponse, - BareMetalMachinesListBySubscriptionNextResponse, - BareMetalMachinesListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing BareMetalMachines operations. */ -export class BareMetalMachinesImpl implements BareMetalMachines { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class BareMetalMachines class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of bare metal machines in the provided subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: BareMetalMachinesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: BareMetalMachinesListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: BareMetalMachinesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: BareMetalMachinesListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of bare metal machines in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: BareMetalMachinesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: BareMetalMachinesListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: BareMetalMachinesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: BareMetalMachinesListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Get a list of bare metal machines in the provided subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: BareMetalMachinesListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Get a list of bare metal machines in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: BareMetalMachinesListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Get properties of the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, bareMetalMachineName, options }, - getOperationSpec, - ); - } - - /** - * Create a new bare metal machine or update the properties of the existing one. All customer initiated - * requests will be rejected as the life cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineParameters: BareMetalMachine, - options?: BareMetalMachinesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - bareMetalMachineName, - bareMetalMachineParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachinesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new bare metal machine or update the properties of the existing one. All customer initiated - * requests will be rejected as the life cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineParameters: BareMetalMachine, - options?: BareMetalMachinesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life - * cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bareMetalMachineName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachinesDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life - * cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, bareMetalMachineName, options); - return poller.pollUntilDone(); - } - - /** - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal - * machine. Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bareMetalMachineName, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachinesUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal - * machine. Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate(resourceGroupName, bareMetalMachineName, options); - return poller.pollUntilDone(); - } - - /** - * Cordon the provided bare metal machine's Kubernetes node. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginCordon( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesCordonOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesCordonResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bareMetalMachineName, options }, - spec: cordonOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachinesCordonResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Cordon the provided bare metal machine's Kubernetes node. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginCordonAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesCordonOptionalParams, - ): Promise { - const poller = await this.beginCordon(resourceGroupName, bareMetalMachineName, options); - return poller.pollUntilDone(); - } - - /** - * Power off the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginPowerOff( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesPowerOffOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesPowerOffResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bareMetalMachineName, options }, - spec: powerOffOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachinesPowerOffResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Power off the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginPowerOffAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesPowerOffOptionalParams, - ): Promise { - const poller = await this.beginPowerOff(resourceGroupName, bareMetalMachineName, options); - return poller.pollUntilDone(); - } - - /** - * Reimage the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginReimage( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesReimageOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesReimageResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bareMetalMachineName, options }, - spec: reimageOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachinesReimageResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Reimage the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginReimageAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesReimageOptionalParams, - ): Promise { - const poller = await this.beginReimage(resourceGroupName, bareMetalMachineName, options); - return poller.pollUntilDone(); - } - - /** - * Replace the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginReplace( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesReplaceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesReplaceResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bareMetalMachineName, options }, - spec: replaceOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachinesReplaceResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Replace the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginReplaceAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesReplaceOptionalParams, - ): Promise { - const poller = await this.beginReplace(resourceGroupName, bareMetalMachineName, options); - return poller.pollUntilDone(); - } - - /** - * Restart the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginRestart( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesRestartOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesRestartResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bareMetalMachineName, options }, - spec: restartOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachinesRestartResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Restart the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginRestartAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesRestartOptionalParams, - ): Promise { - const poller = await this.beginRestart(resourceGroupName, bareMetalMachineName, options); - return poller.pollUntilDone(); - } - - /** - * Run the command or the script on the provided bare metal machine. The URL to storage account with - * the command execution results and the command exit code can be retrieved from the operation status - * API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunCommandParameters The request body. - * @param options The options parameters. - */ - async beginRunCommand( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, - options?: BareMetalMachinesRunCommandOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesRunCommandResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunCommandParameters, - options, - }, - spec: runCommandOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachinesRunCommandResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Run the command or the script on the provided bare metal machine. The URL to storage account with - * the command execution results and the command exit code can be retrieved from the operation status - * API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunCommandParameters The request body. - * @param options The options parameters. - */ - async beginRunCommandAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, - options?: BareMetalMachinesRunCommandOptionalParams, - ): Promise { - const poller = await this.beginRunCommand( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunCommandParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Run one or more data extractions on the provided bare metal machine. The URL to storage account with - * the command execution results and the command exit code can be retrieved from the operation status - * API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunDataExtractsParameters The request body. - * @param options The options parameters. - */ - async beginRunDataExtracts( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, - options?: BareMetalMachinesRunDataExtractsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesRunDataExtractsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunDataExtractsParameters, - options, - }, - spec: runDataExtractsOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachinesRunDataExtractsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Run one or more data extractions on the provided bare metal machine. The URL to storage account with - * the command execution results and the command exit code can be retrieved from the operation status - * API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunDataExtractsParameters The request body. - * @param options The options parameters. - */ - async beginRunDataExtractsAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, - options?: BareMetalMachinesRunDataExtractsOptionalParams, - ): Promise { - const poller = await this.beginRunDataExtracts( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunDataExtractsParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage - * account with the command execution results and the command exit code can be retrieved from the - * operation status API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunDataExtractsRestrictedParameters The request body. - * @param options The options parameters. - */ - async beginRunDataExtractsRestricted( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, - options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesRunDataExtractsRestrictedResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunDataExtractsRestrictedParameters, - options, - }, - spec: runDataExtractsRestrictedOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachinesRunDataExtractsRestrictedResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage - * account with the command execution results and the command exit code can be retrieved from the - * operation status API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunDataExtractsRestrictedParameters The request body. - * @param options The options parameters. - */ - async beginRunDataExtractsRestrictedAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, - options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams, - ): Promise { - const poller = await this.beginRunDataExtractsRestricted( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunDataExtractsRestrictedParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Run one or more read-only commands on the provided bare metal machine. The URL to storage account - * with the command execution results and the command exit code can be retrieved from the operation - * status API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunReadCommandsParameters The request body. - * @param options The options parameters. - */ - async beginRunReadCommands( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, - options?: BareMetalMachinesRunReadCommandsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesRunReadCommandsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunReadCommandsParameters, - options, - }, - spec: runReadCommandsOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachinesRunReadCommandsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Run one or more read-only commands on the provided bare metal machine. The URL to storage account - * with the command execution results and the command exit code can be retrieved from the operation - * status API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunReadCommandsParameters The request body. - * @param options The options parameters. - */ - async beginRunReadCommandsAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, - options?: BareMetalMachinesRunReadCommandsOptionalParams, - ): Promise { - const poller = await this.beginRunReadCommands( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunReadCommandsParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Start the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginStart( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesStartOptionalParams, - ): Promise< - SimplePollerLike, BareMetalMachinesStartResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bareMetalMachineName, options }, - spec: startOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachinesStartResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Start the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginStartAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesStartOptionalParams, - ): Promise { - const poller = await this.beginStart(resourceGroupName, bareMetalMachineName, options); - return poller.pollUntilDone(); - } - - /** - * Uncordon the provided bare metal machine's Kubernetes node. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginUncordon( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesUncordonOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesUncordonResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, bareMetalMachineName, options }, - spec: uncordonOperationSpec, - }); - const poller = await createHttpPoller< - BareMetalMachinesUncordonResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Uncordon the provided bare metal machine's Kubernetes node. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - async beginUncordonAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesUncordonOptionalParams, - ): Promise { - const poller = await this.beginUncordon(resourceGroupName, bareMetalMachineName, options); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: BareMetalMachinesListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: BareMetalMachinesListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/bareMetalMachines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BareMetalMachineList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BareMetalMachineList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BareMetalMachine, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.BareMetalMachine, - }, - 201: { - bodyMapper: Mappers.BareMetalMachine, - }, - 202: { - bodyMapper: Mappers.BareMetalMachine, - }, - 204: { - bodyMapper: Mappers.BareMetalMachine, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.bareMetalMachineParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.BareMetalMachine, - }, - 201: { - bodyMapper: Mappers.BareMetalMachine, - }, - 202: { - bodyMapper: Mappers.BareMetalMachine, - }, - 204: { - bodyMapper: Mappers.BareMetalMachine, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.bareMetalMachineUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const cordonOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/cordon", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.bareMetalMachineCordonParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const powerOffOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/powerOff", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.bareMetalMachinePowerOffParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const reimageOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/reimage", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const replaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/replace", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.bareMetalMachineReplaceParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const restartOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/restart", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const runCommandOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runCommand", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.bareMetalMachineRunCommandParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const runDataExtractsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runDataExtracts", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.bareMetalMachineRunDataExtractsParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const runDataExtractsRestrictedOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runDataExtractsRestricted", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.bareMetalMachineRunDataExtractsRestrictedParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const runReadCommandsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runReadCommands", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.bareMetalMachineRunReadCommandsParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const startOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/start", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const uncordonOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/uncordon", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.bareMetalMachineName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BareMetalMachineList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BareMetalMachineList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/bmcKeySets.ts b/sdk/networkcloud/arm-networkcloud/src/operations/bmcKeySets.ts deleted file mode 100644 index d6a390c18911..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/bmcKeySets.ts +++ /dev/null @@ -1,622 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { BmcKeySets } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - BmcKeySet, - BmcKeySetsListByClusterNextOptionalParams, - BmcKeySetsListByClusterOptionalParams, - BmcKeySetsListByClusterResponse, - BmcKeySetsGetOptionalParams, - BmcKeySetsGetResponse, - BmcKeySetsCreateOrUpdateOptionalParams, - BmcKeySetsCreateOrUpdateResponse, - BmcKeySetsDeleteOptionalParams, - BmcKeySetsDeleteResponse, - BmcKeySetsUpdateOptionalParams, - BmcKeySetsUpdateResponse, - BmcKeySetsListByClusterNextResponse, -} from "../models/index.js"; - -/// -/** Class containing BmcKeySets operations. */ -export class BmcKeySetsImpl implements BmcKeySets { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class BmcKeySets class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of baseboard management controller key sets for the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - public listByCluster( - resourceGroupName: string, - clusterName: string, - options?: BmcKeySetsListByClusterOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByClusterPagingAll(resourceGroupName, clusterName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByClusterPagingPage(resourceGroupName, clusterName, options, settings); - }, - }; - } - - private async *listByClusterPagingPage( - resourceGroupName: string, - clusterName: string, - options?: BmcKeySetsListByClusterOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: BmcKeySetsListByClusterResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByCluster(resourceGroupName, clusterName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByClusterNext( - resourceGroupName, - clusterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByClusterPagingAll( - resourceGroupName: string, - clusterName: string, - options?: BmcKeySetsListByClusterOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByClusterPagingPage( - resourceGroupName, - clusterName, - options, - )) { - yield* page; - } - } - - /** - * Get a list of baseboard management controller key sets for the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - private _listByCluster( - resourceGroupName: string, - clusterName: string, - options?: BmcKeySetsListByClusterOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - listByClusterOperationSpec, - ); - } - - /** - * Get baseboard management controller key set of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - bmcKeySetName: string, - options?: BmcKeySetsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, bmcKeySetName, options }, - getOperationSpec, - ); - } - - /** - * Create a new baseboard management controller key set or update the existing one for the provided - * cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param bmcKeySetParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - bmcKeySetName: string, - bmcKeySetParameters: BmcKeySet, - options?: BmcKeySetsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BmcKeySetsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - clusterName, - bmcKeySetName, - bmcKeySetParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - BmcKeySetsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new baseboard management controller key set or update the existing one for the provided - * cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param bmcKeySetParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - bmcKeySetName: string, - bmcKeySetParameters: BmcKeySet, - options?: BmcKeySetsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - clusterName, - bmcKeySetName, - bmcKeySetParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the baseboard management controller key set of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterName: string, - bmcKeySetName: string, - options?: BmcKeySetsDeleteOptionalParams, - ): Promise, BmcKeySetsDeleteResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, clusterName, bmcKeySetName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - BmcKeySetsDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the baseboard management controller key set of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - bmcKeySetName: string, - options?: BmcKeySetsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, clusterName, bmcKeySetName, options); - return poller.pollUntilDone(); - } - - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - clusterName: string, - bmcKeySetName: string, - options?: BmcKeySetsUpdateOptionalParams, - ): Promise, BmcKeySetsUpdateResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, clusterName, bmcKeySetName, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - BmcKeySetsUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - clusterName: string, - bmcKeySetName: string, - options?: BmcKeySetsUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate(resourceGroupName, clusterName, bmcKeySetName, options); - return poller.pollUntilDone(); - } - - /** - * ListByClusterNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param nextLink The nextLink from the previous successful call to the ListByCluster method. - * @param options The options parameters. - */ - private _listByClusterNext( - resourceGroupName: string, - clusterName: string, - nextLink: string, - options?: BmcKeySetsListByClusterNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, nextLink, options }, - listByClusterNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByClusterOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BmcKeySetList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BmcKeySet, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.bmcKeySetName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.BmcKeySet, - }, - 201: { - bodyMapper: Mappers.BmcKeySet, - }, - 202: { - bodyMapper: Mappers.BmcKeySet, - }, - 204: { - bodyMapper: Mappers.BmcKeySet, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.bmcKeySetParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.bmcKeySetName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.bmcKeySetName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.BmcKeySet, - }, - 201: { - bodyMapper: Mappers.BmcKeySet, - }, - 202: { - bodyMapper: Mappers.BmcKeySet, - }, - 204: { - bodyMapper: Mappers.BmcKeySet, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.bmcKeySetUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.bmcKeySetName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const listByClusterNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BmcKeySetList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/cloudServicesNetworks.ts b/sdk/networkcloud/arm-networkcloud/src/operations/cloudServicesNetworks.ts deleted file mode 100644 index 124c6d6feca1..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/cloudServicesNetworks.ts +++ /dev/null @@ -1,701 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { CloudServicesNetworks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - CloudServicesNetwork, - CloudServicesNetworksListBySubscriptionNextOptionalParams, - CloudServicesNetworksListBySubscriptionOptionalParams, - CloudServicesNetworksListBySubscriptionResponse, - CloudServicesNetworksListByResourceGroupNextOptionalParams, - CloudServicesNetworksListByResourceGroupOptionalParams, - CloudServicesNetworksListByResourceGroupResponse, - CloudServicesNetworksGetOptionalParams, - CloudServicesNetworksGetResponse, - CloudServicesNetworksCreateOrUpdateOptionalParams, - CloudServicesNetworksCreateOrUpdateResponse, - CloudServicesNetworksDeleteOptionalParams, - CloudServicesNetworksDeleteResponse, - CloudServicesNetworksUpdateOptionalParams, - CloudServicesNetworksUpdateResponse, - CloudServicesNetworksListBySubscriptionNextResponse, - CloudServicesNetworksListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing CloudServicesNetworks operations. */ -export class CloudServicesNetworksImpl implements CloudServicesNetworks { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class CloudServicesNetworks class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of cloud services networks in the provided subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: CloudServicesNetworksListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: CloudServicesNetworksListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: CloudServicesNetworksListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: CloudServicesNetworksListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of cloud services networks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: CloudServicesNetworksListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: CloudServicesNetworksListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: CloudServicesNetworksListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: CloudServicesNetworksListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Get a list of cloud services networks in the provided subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: CloudServicesNetworksListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Get a list of cloud services networks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: CloudServicesNetworksListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Get properties of the provided cloud services network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - cloudServicesNetworkName: string, - options?: CloudServicesNetworksGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, cloudServicesNetworkName, options }, - getOperationSpec, - ); - } - - /** - * Create a new cloud services network or update the properties of the existing cloud services network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - cloudServicesNetworkName: string, - cloudServicesNetworkParameters: CloudServicesNetwork, - options?: CloudServicesNetworksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - CloudServicesNetworksCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - cloudServicesNetworkName, - cloudServicesNetworkParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - CloudServicesNetworksCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new cloud services network or update the properties of the existing cloud services network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - cloudServicesNetworkName: string, - cloudServicesNetworkParameters: CloudServicesNetwork, - options?: CloudServicesNetworksCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - cloudServicesNetworkName, - cloudServicesNetworkParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided cloud services network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - cloudServicesNetworkName: string, - options?: CloudServicesNetworksDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - CloudServicesNetworksDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, cloudServicesNetworkName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - CloudServicesNetworksDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the provided cloud services network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - cloudServicesNetworkName: string, - options?: CloudServicesNetworksDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, cloudServicesNetworkName, options); - return poller.pollUntilDone(); - } - - /** - * Update properties of the provided cloud services network, or update the tags associated with it. - * Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - cloudServicesNetworkName: string, - options?: CloudServicesNetworksUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - CloudServicesNetworksUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, cloudServicesNetworkName, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - CloudServicesNetworksUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Update properties of the provided cloud services network, or update the tags associated with it. - * Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - cloudServicesNetworkName: string, - options?: CloudServicesNetworksUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate(resourceGroupName, cloudServicesNetworkName, options); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: CloudServicesNetworksListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: CloudServicesNetworksListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/cloudServicesNetworks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CloudServicesNetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CloudServicesNetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CloudServicesNetwork, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.cloudServicesNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.CloudServicesNetwork, - }, - 201: { - bodyMapper: Mappers.CloudServicesNetwork, - }, - 202: { - bodyMapper: Mappers.CloudServicesNetwork, - }, - 204: { - bodyMapper: Mappers.CloudServicesNetwork, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.cloudServicesNetworkParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.cloudServicesNetworkName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.cloudServicesNetworkName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.CloudServicesNetwork, - }, - 201: { - bodyMapper: Mappers.CloudServicesNetwork, - }, - 202: { - bodyMapper: Mappers.CloudServicesNetwork, - }, - 204: { - bodyMapper: Mappers.CloudServicesNetwork, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.cloudServicesNetworkUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.cloudServicesNetworkName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CloudServicesNetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CloudServicesNetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/clusterManagers.ts b/sdk/networkcloud/arm-networkcloud/src/operations/clusterManagers.ts deleted file mode 100644 index 962c8f73372f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/clusterManagers.ts +++ /dev/null @@ -1,620 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { ClusterManagers } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ClusterManager, - ClusterManagersListBySubscriptionNextOptionalParams, - ClusterManagersListBySubscriptionOptionalParams, - ClusterManagersListBySubscriptionResponse, - ClusterManagersListByResourceGroupNextOptionalParams, - ClusterManagersListByResourceGroupOptionalParams, - ClusterManagersListByResourceGroupResponse, - ClusterManagersGetOptionalParams, - ClusterManagersGetResponse, - ClusterManagersCreateOrUpdateOptionalParams, - ClusterManagersCreateOrUpdateResponse, - ClusterManagersDeleteOptionalParams, - ClusterManagersDeleteResponse, - ClusterManagersUpdateOptionalParams, - ClusterManagersUpdateResponse, - ClusterManagersListBySubscriptionNextResponse, - ClusterManagersListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ClusterManagers operations. */ -export class ClusterManagersImpl implements ClusterManagers { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class ClusterManagers class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of cluster managers in the provided subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: ClusterManagersListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: ClusterManagersListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ClusterManagersListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: ClusterManagersListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of cluster managers in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ClusterManagersListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ClusterManagersListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ClusterManagersListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ClusterManagersListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Get a list of cluster managers in the provided subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: ClusterManagersListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Get a list of cluster managers in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ClusterManagersListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Get the properties of the provided cluster manager. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterManagerName: string, - options?: ClusterManagersGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterManagerName, options }, - getOperationSpec, - ); - } - - /** - * Create a new cluster manager or update properties of the cluster manager if it exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - clusterManagerName: string, - clusterManagerParameters: ClusterManager, - options?: ClusterManagersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClusterManagersCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - clusterManagerName, - clusterManagerParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ClusterManagersCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new cluster manager or update properties of the cluster manager if it exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterManagerName: string, - clusterManagerParameters: ClusterManager, - options?: ClusterManagersCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - clusterManagerName, - clusterManagerParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided cluster manager. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterManagerName: string, - options?: ClusterManagersDeleteOptionalParams, - ): Promise< - SimplePollerLike, ClusterManagersDeleteResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, clusterManagerName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - ClusterManagersDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the provided cluster manager. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterManagerName: string, - options?: ClusterManagersDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, clusterManagerName, options); - return poller.pollUntilDone(); - } - - /** - * Patch properties of the provided cluster manager, or update the tags assigned to the cluster - * manager. Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterManagerName: string, - options?: ClusterManagersUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterManagerName, options }, - updateOperationSpec, - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: ClusterManagersListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: ClusterManagersListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/clusterManagers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterManagerList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterManagerList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterManager, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterManagerName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ClusterManager, - }, - 201: { - bodyMapper: Mappers.ClusterManager, - }, - 202: { - bodyMapper: Mappers.ClusterManager, - }, - 204: { - bodyMapper: Mappers.ClusterManager, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.clusterManagerParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterManagerName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterManagerName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ClusterManager, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.clusterManagerUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterManagerName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterManagerList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterManagerList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/clusters.ts b/sdk/networkcloud/arm-networkcloud/src/operations/clusters.ts deleted file mode 100644 index 380ab94d354e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/clusters.ts +++ /dev/null @@ -1,1182 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { Clusters } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - Cluster, - ClustersListBySubscriptionNextOptionalParams, - ClustersListBySubscriptionOptionalParams, - ClustersListBySubscriptionResponse, - ClustersListByResourceGroupNextOptionalParams, - ClustersListByResourceGroupOptionalParams, - ClustersListByResourceGroupResponse, - ClustersGetOptionalParams, - ClustersGetResponse, - ClustersCreateOrUpdateOptionalParams, - ClustersCreateOrUpdateResponse, - ClustersDeleteOptionalParams, - ClustersDeleteResponse, - ClustersUpdateOptionalParams, - ClustersUpdateResponse, - ClusterContinueUpdateVersionParameters, - ClustersContinueUpdateVersionOptionalParams, - ClustersContinueUpdateVersionResponse, - ClustersDeployOptionalParams, - ClustersDeployResponse, - ClustersScanRuntimeOptionalParams, - ClustersScanRuntimeResponse, - ClusterUpdateVersionParameters, - ClustersUpdateVersionOptionalParams, - ClustersUpdateVersionResponse, - ClustersListBySubscriptionNextResponse, - ClustersListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Clusters operations. */ -export class ClustersImpl implements Clusters { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class Clusters class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of clusters in the provided subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: ClustersListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: ClustersListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ClustersListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: ClustersListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of clusters in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ClustersListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Get a list of clusters in the provided subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: ClustersListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Get a list of clusters in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Get properties of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - options?: ClustersGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - getOperationSpec, - ); - } - - /** - * Create a new cluster or update the properties of the cluster if it exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - clusterParameters: Cluster, - options?: ClustersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, ClustersCreateOrUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, clusterName, clusterParameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ClustersCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new cluster or update the properties of the cluster if it exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - clusterParameters: Cluster, - options?: ClustersCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - clusterName, - clusterParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams, - ): Promise, ClustersDeleteResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, clusterName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - ClustersDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, clusterName, options); - return poller.pollUntilDone(); - } - - /** - * Patch the properties of the provided cluster, or update the tags associated with the cluster. - * Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - clusterName: string, - options?: ClustersUpdateOptionalParams, - ): Promise, ClustersUpdateResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, clusterName, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - ClustersUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Patch the properties of the provided cluster, or update the tags associated with the cluster. - * Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - clusterName: string, - options?: ClustersUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate(resourceGroupName, clusterName, options); - return poller.pollUntilDone(); - } - - /** - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused - * after completing a segment of the update. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. - * @param options The options parameters. - */ - async beginContinueUpdateVersion( - resourceGroupName: string, - clusterName: string, - clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, - options?: ClustersContinueUpdateVersionOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClustersContinueUpdateVersionResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - clusterName, - clusterContinueUpdateVersionParameters, - options, - }, - spec: continueUpdateVersionOperationSpec, - }); - const poller = await createHttpPoller< - ClustersContinueUpdateVersionResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused - * after completing a segment of the update. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. - * @param options The options parameters. - */ - async beginContinueUpdateVersionAndWait( - resourceGroupName: string, - clusterName: string, - clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, - options?: ClustersContinueUpdateVersionOptionalParams, - ): Promise { - const poller = await this.beginContinueUpdateVersion( - resourceGroupName, - clusterName, - clusterContinueUpdateVersionParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deploy the cluster using the rack configuration provided during creation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - async beginDeploy( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeployOptionalParams, - ): Promise, ClustersDeployResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, clusterName, options }, - spec: deployOperationSpec, - }); - const poller = await createHttpPoller< - ClustersDeployResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deploy the cluster using the rack configuration provided during creation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - async beginDeployAndWait( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeployOptionalParams, - ): Promise { - const poller = await this.beginDeploy(resourceGroupName, clusterName, options); - return poller.pollUntilDone(); - } - - /** - * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in - * accordance with the cluster configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - async beginScanRuntime( - resourceGroupName: string, - clusterName: string, - options?: ClustersScanRuntimeOptionalParams, - ): Promise< - SimplePollerLike, ClustersScanRuntimeResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, clusterName, options }, - spec: scanRuntimeOperationSpec, - }); - const poller = await createHttpPoller< - ClustersScanRuntimeResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in - * accordance with the cluster configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - async beginScanRuntimeAndWait( - resourceGroupName: string, - clusterName: string, - options?: ClustersScanRuntimeOptionalParams, - ): Promise { - const poller = await this.beginScanRuntime(resourceGroupName, clusterName, options); - return poller.pollUntilDone(); - } - - /** - * Update the version of the provided cluster to one of the available supported versions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterUpdateVersionParameters The request body. - * @param options The options parameters. - */ - async beginUpdateVersion( - resourceGroupName: string, - clusterName: string, - clusterUpdateVersionParameters: ClusterUpdateVersionParameters, - options?: ClustersUpdateVersionOptionalParams, - ): Promise< - SimplePollerLike, ClustersUpdateVersionResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - clusterName, - clusterUpdateVersionParameters, - options, - }, - spec: updateVersionOperationSpec, - }); - const poller = await createHttpPoller< - ClustersUpdateVersionResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Update the version of the provided cluster to one of the available supported versions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterUpdateVersionParameters The request body. - * @param options The options parameters. - */ - async beginUpdateVersionAndWait( - resourceGroupName: string, - clusterName: string, - clusterUpdateVersionParameters: ClusterUpdateVersionParameters, - options?: ClustersUpdateVersionOptionalParams, - ): Promise { - const poller = await this.beginUpdateVersion( - resourceGroupName, - clusterName, - clusterUpdateVersionParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: ClustersListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: ClustersListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/clusters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Cluster, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Cluster, - }, - 201: { - bodyMapper: Mappers.Cluster, - }, - 202: { - bodyMapper: Mappers.Cluster, - }, - 204: { - bodyMapper: Mappers.Cluster, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.clusterParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.Cluster, - }, - 201: { - bodyMapper: Mappers.Cluster, - }, - 202: { - bodyMapper: Mappers.Cluster, - }, - 204: { - bodyMapper: Mappers.Cluster, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.clusterUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const continueUpdateVersionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/continueUpdateVersion", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.clusterContinueUpdateVersionParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deployOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/deploy", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.clusterDeployParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const scanRuntimeOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/scanRuntime", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.clusterScanRuntimeParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateVersionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/updateVersion", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.clusterUpdateVersionParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/consoles.ts b/sdk/networkcloud/arm-networkcloud/src/operations/consoles.ts deleted file mode 100644 index 0d0b0d3fd139..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/consoles.ts +++ /dev/null @@ -1,634 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { Consoles } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - Console, - ConsolesListByVirtualMachineNextOptionalParams, - ConsolesListByVirtualMachineOptionalParams, - ConsolesListByVirtualMachineResponse, - ConsolesGetOptionalParams, - ConsolesGetResponse, - ConsolesCreateOrUpdateOptionalParams, - ConsolesCreateOrUpdateResponse, - ConsolesDeleteOptionalParams, - ConsolesDeleteResponse, - ConsolesUpdateOptionalParams, - ConsolesUpdateResponse, - ConsolesListByVirtualMachineNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Consoles operations. */ -export class ConsolesImpl implements Consoles { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class Consoles class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of consoles for the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - public listByVirtualMachine( - resourceGroupName: string, - virtualMachineName: string, - options?: ConsolesListByVirtualMachineOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByVirtualMachinePagingAll(resourceGroupName, virtualMachineName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByVirtualMachinePagingPage( - resourceGroupName, - virtualMachineName, - options, - settings, - ); - }, - }; - } - - private async *listByVirtualMachinePagingPage( - resourceGroupName: string, - virtualMachineName: string, - options?: ConsolesListByVirtualMachineOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ConsolesListByVirtualMachineResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByVirtualMachine(resourceGroupName, virtualMachineName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByVirtualMachineNext( - resourceGroupName, - virtualMachineName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByVirtualMachinePagingAll( - resourceGroupName: string, - virtualMachineName: string, - options?: ConsolesListByVirtualMachineOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByVirtualMachinePagingPage( - resourceGroupName, - virtualMachineName, - options, - )) { - yield* page; - } - } - - /** - * Get a list of consoles for the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - private _listByVirtualMachine( - resourceGroupName: string, - virtualMachineName: string, - options?: ConsolesListByVirtualMachineOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, options }, - listByVirtualMachineOperationSpec, - ); - } - - /** - * Get properties of the provided virtual machine console. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - consoleName: string, - options?: ConsolesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, consoleName, options }, - getOperationSpec, - ); - } - - /** - * Create a new virtual machine console or update the properties of the existing virtual machine - * console. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param consoleParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualMachineName: string, - consoleName: string, - consoleParameters: Console, - options?: ConsolesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, ConsolesCreateOrUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualMachineName, - consoleName, - consoleParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ConsolesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new virtual machine console or update the properties of the existing virtual machine - * console. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param consoleParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - consoleName: string, - consoleParameters: Console, - options?: ConsolesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualMachineName, - consoleName, - consoleParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided virtual machine console. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualMachineName: string, - consoleName: string, - options?: ConsolesDeleteOptionalParams, - ): Promise, ConsolesDeleteResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualMachineName, consoleName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - ConsolesDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the provided virtual machine console. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualMachineName: string, - consoleName: string, - options?: ConsolesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - virtualMachineName, - consoleName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - virtualMachineName: string, - consoleName: string, - options?: ConsolesUpdateOptionalParams, - ): Promise, ConsolesUpdateResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualMachineName, consoleName, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - ConsolesUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - consoleName: string, - options?: ConsolesUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - virtualMachineName, - consoleName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByVirtualMachineNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param nextLink The nextLink from the previous successful call to the ListByVirtualMachine method. - * @param options The options parameters. - */ - private _listByVirtualMachineNext( - resourceGroupName: string, - virtualMachineName: string, - nextLink: string, - options?: ConsolesListByVirtualMachineNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, nextLink, options }, - listByVirtualMachineNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByVirtualMachineOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ConsoleList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Console, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - Parameters.consoleName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Console, - }, - 201: { - bodyMapper: Mappers.Console, - }, - 202: { - bodyMapper: Mappers.Console, - }, - 204: { - bodyMapper: Mappers.Console, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.consoleParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - Parameters.consoleName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - Parameters.consoleName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.Console, - }, - 201: { - bodyMapper: Mappers.Console, - }, - 202: { - bodyMapper: Mappers.Console, - }, - 204: { - bodyMapper: Mappers.Console, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.consoleUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - Parameters.consoleName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const listByVirtualMachineNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ConsoleList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/index.ts b/sdk/networkcloud/arm-networkcloud/src/operations/index.ts deleted file mode 100644 index 1e0d7ad2648f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -export * from "./operations.js"; -export * from "./bareMetalMachines.js"; -export * from "./cloudServicesNetworks.js"; -export * from "./clusterManagers.js"; -export * from "./clusters.js"; -export * from "./kubernetesClusters.js"; -export * from "./l2Networks.js"; -export * from "./l3Networks.js"; -export * from "./rackSkus.js"; -export * from "./racks.js"; -export * from "./storageAppliances.js"; -export * from "./trunkedNetworks.js"; -export * from "./virtualMachines.js"; -export * from "./volumes.js"; -export * from "./bareMetalMachineKeySets.js"; -export * from "./bmcKeySets.js"; -export * from "./metricsConfigurations.js"; -export * from "./agentPools.js"; -export * from "./kubernetesClusterFeatures.js"; -export * from "./consoles.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/kubernetesClusterFeatures.ts b/sdk/networkcloud/arm-networkcloud/src/operations/kubernetesClusterFeatures.ts deleted file mode 100644 index 77e41a0e829e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/kubernetesClusterFeatures.ts +++ /dev/null @@ -1,654 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { KubernetesClusterFeatures } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - KubernetesClusterFeature, - KubernetesClusterFeaturesListByKubernetesClusterNextOptionalParams, - KubernetesClusterFeaturesListByKubernetesClusterOptionalParams, - KubernetesClusterFeaturesListByKubernetesClusterResponse, - KubernetesClusterFeaturesGetOptionalParams, - KubernetesClusterFeaturesGetResponse, - KubernetesClusterFeaturesCreateOrUpdateOptionalParams, - KubernetesClusterFeaturesCreateOrUpdateResponse, - KubernetesClusterFeaturesDeleteOptionalParams, - KubernetesClusterFeaturesDeleteResponse, - KubernetesClusterFeaturesUpdateOptionalParams, - KubernetesClusterFeaturesUpdateResponse, - KubernetesClusterFeaturesListByKubernetesClusterNextResponse, -} from "../models/index.js"; - -/// -/** Class containing KubernetesClusterFeatures operations. */ -export class KubernetesClusterFeaturesImpl implements KubernetesClusterFeatures { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class KubernetesClusterFeatures class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of features for the provided Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - public listByKubernetesCluster( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClusterFeaturesListByKubernetesClusterOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByKubernetesClusterPagingAll( - resourceGroupName, - kubernetesClusterName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByKubernetesClusterPagingPage( - resourceGroupName, - kubernetesClusterName, - options, - settings, - ); - }, - }; - } - - private async *listByKubernetesClusterPagingPage( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClusterFeaturesListByKubernetesClusterOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: KubernetesClusterFeaturesListByKubernetesClusterResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByKubernetesCluster( - resourceGroupName, - kubernetesClusterName, - options, - ); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByKubernetesClusterNext( - resourceGroupName, - kubernetesClusterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByKubernetesClusterPagingAll( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClusterFeaturesListByKubernetesClusterOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByKubernetesClusterPagingPage( - resourceGroupName, - kubernetesClusterName, - options, - )) { - yield* page; - } - } - - /** - * Get a list of features for the provided Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - private _listByKubernetesCluster( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClusterFeaturesListByKubernetesClusterOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, kubernetesClusterName, options }, - listByKubernetesClusterOperationSpec, - ); - } - - /** - * Get properties of the provided the Kubernetes cluster feature. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - kubernetesClusterName: string, - featureName: string, - options?: KubernetesClusterFeaturesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, kubernetesClusterName, featureName, options }, - getOperationSpec, - ); - } - - /** - * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it - * exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param kubernetesClusterFeatureParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - kubernetesClusterName: string, - featureName: string, - kubernetesClusterFeatureParameters: KubernetesClusterFeature, - options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - KubernetesClusterFeaturesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - kubernetesClusterName, - featureName, - kubernetesClusterFeatureParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - KubernetesClusterFeaturesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it - * exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param kubernetesClusterFeatureParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - featureName: string, - kubernetesClusterFeatureParameters: KubernetesClusterFeature, - options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - kubernetesClusterName, - featureName, - kubernetesClusterFeatureParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided Kubernetes cluster feature. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - kubernetesClusterName: string, - featureName: string, - options?: KubernetesClusterFeaturesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - KubernetesClusterFeaturesDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, kubernetesClusterName, featureName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - KubernetesClusterFeaturesDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the provided Kubernetes cluster feature. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - featureName: string, - options?: KubernetesClusterFeaturesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - kubernetesClusterName, - featureName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Patch properties of the provided Kubernetes cluster feature. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - kubernetesClusterName: string, - featureName: string, - options?: KubernetesClusterFeaturesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - KubernetesClusterFeaturesUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, kubernetesClusterName, featureName, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - KubernetesClusterFeaturesUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Patch properties of the provided Kubernetes cluster feature. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - featureName: string, - options?: KubernetesClusterFeaturesUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - kubernetesClusterName, - featureName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByKubernetesClusterNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param nextLink The nextLink from the previous successful call to the ListByKubernetesCluster - * method. - * @param options The options parameters. - */ - private _listByKubernetesClusterNext( - resourceGroupName: string, - kubernetesClusterName: string, - nextLink: string, - options?: KubernetesClusterFeaturesListByKubernetesClusterNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, kubernetesClusterName, nextLink, options }, - listByKubernetesClusterNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByKubernetesClusterOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.KubernetesClusterFeatureList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.KubernetesClusterFeature, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - Parameters.featureName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.KubernetesClusterFeature, - }, - 201: { - bodyMapper: Mappers.KubernetesClusterFeature, - }, - 202: { - bodyMapper: Mappers.KubernetesClusterFeature, - }, - 204: { - bodyMapper: Mappers.KubernetesClusterFeature, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.kubernetesClusterFeatureParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - Parameters.featureName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - Parameters.featureName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.KubernetesClusterFeature, - }, - 201: { - bodyMapper: Mappers.KubernetesClusterFeature, - }, - 202: { - bodyMapper: Mappers.KubernetesClusterFeature, - }, - 204: { - bodyMapper: Mappers.KubernetesClusterFeature, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.kubernetesClusterFeatureUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - Parameters.featureName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const listByKubernetesClusterNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.KubernetesClusterFeatureList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/kubernetesClusters.ts b/sdk/networkcloud/arm-networkcloud/src/operations/kubernetesClusters.ts deleted file mode 100644 index c74a51b84839..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/kubernetesClusters.ts +++ /dev/null @@ -1,835 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { KubernetesClusters } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - KubernetesCluster, - KubernetesClustersListBySubscriptionNextOptionalParams, - KubernetesClustersListBySubscriptionOptionalParams, - KubernetesClustersListBySubscriptionResponse, - KubernetesClustersListByResourceGroupNextOptionalParams, - KubernetesClustersListByResourceGroupOptionalParams, - KubernetesClustersListByResourceGroupResponse, - KubernetesClustersGetOptionalParams, - KubernetesClustersGetResponse, - KubernetesClustersCreateOrUpdateOptionalParams, - KubernetesClustersCreateOrUpdateResponse, - KubernetesClustersDeleteOptionalParams, - KubernetesClustersDeleteResponse, - KubernetesClustersUpdateOptionalParams, - KubernetesClustersUpdateResponse, - KubernetesClusterRestartNodeParameters, - KubernetesClustersRestartNodeOptionalParams, - KubernetesClustersRestartNodeResponse, - KubernetesClustersListBySubscriptionNextResponse, - KubernetesClustersListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing KubernetesClusters operations. */ -export class KubernetesClustersImpl implements KubernetesClusters { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class KubernetesClusters class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of Kubernetes clusters in the provided subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: KubernetesClustersListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: KubernetesClustersListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: KubernetesClustersListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: KubernetesClustersListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of Kubernetes clusters in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: KubernetesClustersListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: KubernetesClustersListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: KubernetesClustersListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: KubernetesClustersListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Get a list of Kubernetes clusters in the provided subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: KubernetesClustersListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Get a list of Kubernetes clusters in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: KubernetesClustersListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Get properties of the provided the Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClustersGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, kubernetesClusterName, options }, - getOperationSpec, - ); - } - - /** - * Create a new Kubernetes cluster or update the properties of the existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - kubernetesClusterName: string, - kubernetesClusterParameters: KubernetesCluster, - options?: KubernetesClustersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - KubernetesClustersCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - kubernetesClusterName, - kubernetesClusterParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - KubernetesClustersCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new Kubernetes cluster or update the properties of the existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - kubernetesClusterParameters: KubernetesCluster, - options?: KubernetesClustersCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClustersDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - KubernetesClustersDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, kubernetesClusterName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - KubernetesClustersDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the provided Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClustersDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, kubernetesClusterName, options); - return poller.pollUntilDone(); - } - - /** - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the - * Kubernetes cluster. Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClustersUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - KubernetesClustersUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, kubernetesClusterName, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - KubernetesClustersUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the - * Kubernetes cluster. Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClustersUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate(resourceGroupName, kubernetesClusterName, options); - return poller.pollUntilDone(); - } - - /** - * Restart a targeted node of a Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterRestartNodeParameters The request body. - * @param options The options parameters. - */ - async beginRestartNode( - resourceGroupName: string, - kubernetesClusterName: string, - kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, - options?: KubernetesClustersRestartNodeOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - KubernetesClustersRestartNodeResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - kubernetesClusterName, - kubernetesClusterRestartNodeParameters, - options, - }, - spec: restartNodeOperationSpec, - }); - const poller = await createHttpPoller< - KubernetesClustersRestartNodeResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Restart a targeted node of a Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterRestartNodeParameters The request body. - * @param options The options parameters. - */ - async beginRestartNodeAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, - options?: KubernetesClustersRestartNodeOptionalParams, - ): Promise { - const poller = await this.beginRestartNode( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterRestartNodeParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: KubernetesClustersListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: KubernetesClustersListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/kubernetesClusters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.KubernetesClusterList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.KubernetesClusterList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.KubernetesCluster, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.KubernetesCluster, - }, - 201: { - bodyMapper: Mappers.KubernetesCluster, - }, - 202: { - bodyMapper: Mappers.KubernetesCluster, - }, - 204: { - bodyMapper: Mappers.KubernetesCluster, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.kubernetesClusterParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.KubernetesCluster, - }, - 201: { - bodyMapper: Mappers.KubernetesCluster, - }, - 202: { - bodyMapper: Mappers.KubernetesCluster, - }, - 204: { - bodyMapper: Mappers.KubernetesCluster, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.kubernetesClusterUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const restartNodeOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/restartNode", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.kubernetesClusterRestartNodeParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.kubernetesClusterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.KubernetesClusterList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.KubernetesClusterList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/l2Networks.ts b/sdk/networkcloud/arm-networkcloud/src/operations/l2Networks.ts deleted file mode 100644 index 8ba2b68a56b4..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/l2Networks.ts +++ /dev/null @@ -1,612 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { L2Networks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - L2Network, - L2NetworksListBySubscriptionNextOptionalParams, - L2NetworksListBySubscriptionOptionalParams, - L2NetworksListBySubscriptionResponse, - L2NetworksListByResourceGroupNextOptionalParams, - L2NetworksListByResourceGroupOptionalParams, - L2NetworksListByResourceGroupResponse, - L2NetworksGetOptionalParams, - L2NetworksGetResponse, - L2NetworksCreateOrUpdateOptionalParams, - L2NetworksCreateOrUpdateResponse, - L2NetworksDeleteOptionalParams, - L2NetworksDeleteResponse, - L2NetworksUpdateOptionalParams, - L2NetworksUpdateResponse, - L2NetworksListBySubscriptionNextResponse, - L2NetworksListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing L2Networks operations. */ -export class L2NetworksImpl implements L2Networks { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class L2Networks class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of layer 2 (L2) networks in the provided subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: L2NetworksListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: L2NetworksListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: L2NetworksListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: L2NetworksListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of layer 2 (L2) networks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: L2NetworksListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: L2NetworksListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: L2NetworksListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: L2NetworksListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Get a list of layer 2 (L2) networks in the provided subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: L2NetworksListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Get a list of layer 2 (L2) networks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: L2NetworksListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Get properties of the provided layer 2 (L2) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - l2NetworkName: string, - options?: L2NetworksGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, l2NetworkName, options }, - getOperationSpec, - ); - } - - /** - * Create a new layer 2 (L2) network or update the properties of the existing network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param l2NetworkParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - l2NetworkName: string, - l2NetworkParameters: L2Network, - options?: L2NetworksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - L2NetworksCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, l2NetworkName, l2NetworkParameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - L2NetworksCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new layer 2 (L2) network or update the properties of the existing network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param l2NetworkParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - l2NetworkName: string, - l2NetworkParameters: L2Network, - options?: L2NetworksCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - l2NetworkName, - l2NetworkParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided layer 2 (L2) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - l2NetworkName: string, - options?: L2NetworksDeleteOptionalParams, - ): Promise, L2NetworksDeleteResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, l2NetworkName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - L2NetworksDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the provided layer 2 (L2) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - l2NetworkName: string, - options?: L2NetworksDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, l2NetworkName, options); - return poller.pollUntilDone(); - } - - /** - * Update tags associated with the provided layer 2 (L2) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - l2NetworkName: string, - options?: L2NetworksUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, l2NetworkName, options }, - updateOperationSpec, - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: L2NetworksListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: L2NetworksListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/l2Networks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.L2NetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.L2NetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.L2Network, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.l2NetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.L2Network, - }, - 201: { - bodyMapper: Mappers.L2Network, - }, - 202: { - bodyMapper: Mappers.L2Network, - }, - 204: { - bodyMapper: Mappers.L2Network, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.l2NetworkParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.l2NetworkName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.l2NetworkName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.L2Network, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.l2NetworkUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.l2NetworkName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.L2NetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.L2NetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/l3Networks.ts b/sdk/networkcloud/arm-networkcloud/src/operations/l3Networks.ts deleted file mode 100644 index 03017a4a6995..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/l3Networks.ts +++ /dev/null @@ -1,612 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { L3Networks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - L3Network, - L3NetworksListBySubscriptionNextOptionalParams, - L3NetworksListBySubscriptionOptionalParams, - L3NetworksListBySubscriptionResponse, - L3NetworksListByResourceGroupNextOptionalParams, - L3NetworksListByResourceGroupOptionalParams, - L3NetworksListByResourceGroupResponse, - L3NetworksGetOptionalParams, - L3NetworksGetResponse, - L3NetworksCreateOrUpdateOptionalParams, - L3NetworksCreateOrUpdateResponse, - L3NetworksDeleteOptionalParams, - L3NetworksDeleteResponse, - L3NetworksUpdateOptionalParams, - L3NetworksUpdateResponse, - L3NetworksListBySubscriptionNextResponse, - L3NetworksListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing L3Networks operations. */ -export class L3NetworksImpl implements L3Networks { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class L3Networks class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of layer 3 (L3) networks in the provided subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: L3NetworksListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: L3NetworksListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: L3NetworksListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: L3NetworksListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of layer 3 (L3) networks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: L3NetworksListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: L3NetworksListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: L3NetworksListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: L3NetworksListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Get a list of layer 3 (L3) networks in the provided subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: L3NetworksListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Get a list of layer 3 (L3) networks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: L3NetworksListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Get properties of the provided layer 3 (L3) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - l3NetworkName: string, - options?: L3NetworksGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, l3NetworkName, options }, - getOperationSpec, - ); - } - - /** - * Create a new layer 3 (L3) network or update the properties of the existing network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param l3NetworkParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - l3NetworkName: string, - l3NetworkParameters: L3Network, - options?: L3NetworksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - L3NetworksCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, l3NetworkName, l3NetworkParameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - L3NetworksCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new layer 3 (L3) network or update the properties of the existing network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param l3NetworkParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - l3NetworkName: string, - l3NetworkParameters: L3Network, - options?: L3NetworksCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - l3NetworkName, - l3NetworkParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided layer 3 (L3) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - l3NetworkName: string, - options?: L3NetworksDeleteOptionalParams, - ): Promise, L3NetworksDeleteResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, l3NetworkName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - L3NetworksDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the provided layer 3 (L3) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - l3NetworkName: string, - options?: L3NetworksDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, l3NetworkName, options); - return poller.pollUntilDone(); - } - - /** - * Update tags associated with the provided layer 3 (L3) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - l3NetworkName: string, - options?: L3NetworksUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, l3NetworkName, options }, - updateOperationSpec, - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: L3NetworksListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: L3NetworksListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/l3Networks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.L3NetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.L3NetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.L3Network, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.l3NetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.L3Network, - }, - 201: { - bodyMapper: Mappers.L3Network, - }, - 202: { - bodyMapper: Mappers.L3Network, - }, - 204: { - bodyMapper: Mappers.L3Network, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.l3NetworkParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.l3NetworkName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.l3NetworkName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.L3Network, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.l3NetworkUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.l3NetworkName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.L3NetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.L3NetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/metricsConfigurations.ts b/sdk/networkcloud/arm-networkcloud/src/operations/metricsConfigurations.ts deleted file mode 100644 index db8ee31c44b9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/metricsConfigurations.ts +++ /dev/null @@ -1,650 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { MetricsConfigurations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - ClusterMetricsConfiguration, - MetricsConfigurationsListByClusterNextOptionalParams, - MetricsConfigurationsListByClusterOptionalParams, - MetricsConfigurationsListByClusterResponse, - MetricsConfigurationsGetOptionalParams, - MetricsConfigurationsGetResponse, - MetricsConfigurationsCreateOrUpdateOptionalParams, - MetricsConfigurationsCreateOrUpdateResponse, - MetricsConfigurationsDeleteOptionalParams, - MetricsConfigurationsDeleteResponse, - MetricsConfigurationsUpdateOptionalParams, - MetricsConfigurationsUpdateResponse, - MetricsConfigurationsListByClusterNextResponse, -} from "../models/index.js"; - -/// -/** Class containing MetricsConfigurations operations. */ -export class MetricsConfigurationsImpl implements MetricsConfigurations { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class MetricsConfigurations class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of metrics configurations for the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - public listByCluster( - resourceGroupName: string, - clusterName: string, - options?: MetricsConfigurationsListByClusterOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByClusterPagingAll(resourceGroupName, clusterName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByClusterPagingPage(resourceGroupName, clusterName, options, settings); - }, - }; - } - - private async *listByClusterPagingPage( - resourceGroupName: string, - clusterName: string, - options?: MetricsConfigurationsListByClusterOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: MetricsConfigurationsListByClusterResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByCluster(resourceGroupName, clusterName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByClusterNext( - resourceGroupName, - clusterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByClusterPagingAll( - resourceGroupName: string, - clusterName: string, - options?: MetricsConfigurationsListByClusterOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByClusterPagingPage( - resourceGroupName, - clusterName, - options, - )) { - yield* page; - } - } - - /** - * Get a list of metrics configurations for the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - private _listByCluster( - resourceGroupName: string, - clusterName: string, - options?: MetricsConfigurationsListByClusterOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - listByClusterOperationSpec, - ); - } - - /** - * Get metrics configuration of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - metricsConfigurationName: string, - options?: MetricsConfigurationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, metricsConfigurationName, options }, - getOperationSpec, - ); - } - - /** - * Create new or update the existing metrics configuration of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param metricsConfigurationParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - metricsConfigurationName: string, - metricsConfigurationParameters: ClusterMetricsConfiguration, - options?: MetricsConfigurationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - MetricsConfigurationsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - clusterName, - metricsConfigurationName, - metricsConfigurationParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - MetricsConfigurationsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create new or update the existing metrics configuration of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param metricsConfigurationParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - metricsConfigurationName: string, - metricsConfigurationParameters: ClusterMetricsConfiguration, - options?: MetricsConfigurationsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - clusterName, - metricsConfigurationName, - metricsConfigurationParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the metrics configuration of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterName: string, - metricsConfigurationName: string, - options?: MetricsConfigurationsDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - MetricsConfigurationsDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - clusterName, - metricsConfigurationName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - MetricsConfigurationsDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the metrics configuration of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - metricsConfigurationName: string, - options?: MetricsConfigurationsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - clusterName, - metricsConfigurationName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Patch properties of metrics configuration for the provided cluster, or update the tags associated - * with it. Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - clusterName: string, - metricsConfigurationName: string, - options?: MetricsConfigurationsUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - MetricsConfigurationsUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - clusterName, - metricsConfigurationName, - options, - }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - MetricsConfigurationsUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Patch properties of metrics configuration for the provided cluster, or update the tags associated - * with it. Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - clusterName: string, - metricsConfigurationName: string, - options?: MetricsConfigurationsUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - clusterName, - metricsConfigurationName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByClusterNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param nextLink The nextLink from the previous successful call to the ListByCluster method. - * @param options The options parameters. - */ - private _listByClusterNext( - resourceGroupName: string, - clusterName: string, - nextLink: string, - options?: MetricsConfigurationsListByClusterNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, nextLink, options }, - listByClusterNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByClusterOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterMetricsConfigurationList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterMetricsConfiguration, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.metricsConfigurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ClusterMetricsConfiguration, - }, - 201: { - bodyMapper: Mappers.ClusterMetricsConfiguration, - }, - 202: { - bodyMapper: Mappers.ClusterMetricsConfiguration, - }, - 204: { - bodyMapper: Mappers.ClusterMetricsConfiguration, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.metricsConfigurationParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.metricsConfigurationName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.metricsConfigurationName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ClusterMetricsConfiguration, - }, - 201: { - bodyMapper: Mappers.ClusterMetricsConfiguration, - }, - 202: { - bodyMapper: Mappers.ClusterMetricsConfiguration, - }, - 204: { - bodyMapper: Mappers.ClusterMetricsConfiguration, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.metricsConfigurationUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.metricsConfigurationName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const listByClusterNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterMetricsConfigurationList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/operations.ts b/sdk/networkcloud/arm-networkcloud/src/operations/operations.ts deleted file mode 100644 index 0984d18b0a48..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/operations.ts +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { Operations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { - Operation, - OperationsListNextOptionalParams, - OperationsListOptionalParams, - OperationsListResponse, - OperationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Operations operations. */ -export class OperationsImpl implements Operations { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class Operations class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of all available resource provider operations. It contains a URL link to get the next set - * of results. - * @param options The options parameters. - */ - public list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: OperationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: OperationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: OperationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of all available resource provider operations. It contains a URL link to get the next set - * of results. - * @param options The options parameters. - */ - private _list(options?: OperationsListOptionalParams): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: OperationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.NetworkCloud/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/rackSkus.ts b/sdk/networkcloud/arm-networkcloud/src/operations/rackSkus.ts deleted file mode 100644 index 8752ed34acd2..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/rackSkus.ts +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { RackSkus } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { - RackSku, - RackSkusListBySubscriptionNextOptionalParams, - RackSkusListBySubscriptionOptionalParams, - RackSkusListBySubscriptionResponse, - RackSkusGetOptionalParams, - RackSkusGetResponse, - RackSkusListBySubscriptionNextResponse, -} from "../models/index.js"; - -/// -/** Class containing RackSkus operations. */ -export class RackSkusImpl implements RackSkus { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class RackSkus class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of rack SKUs in the provided subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: RackSkusListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: RackSkusListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: RackSkusListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: RackSkusListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of rack SKUs in the provided subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: RackSkusListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Get the properties of the provided rack SKU. - * @param rackSkuName The name of the rack SKU. - * @param options The options parameters. - */ - get(rackSkuName: string, options?: RackSkusGetOptionalParams): Promise { - return this.client.sendOperationRequest({ rackSkuName, options }, getOperationSpec); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: RackSkusListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/rackSkus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RackSkuList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/rackSkus/{rackSkuName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RackSku, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.rackSkuName], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RackSkuList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/racks.ts b/sdk/networkcloud/arm-networkcloud/src/operations/racks.ts deleted file mode 100644 index f1379ac0c157..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/racks.ts +++ /dev/null @@ -1,687 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { Racks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - Rack, - RacksListBySubscriptionNextOptionalParams, - RacksListBySubscriptionOptionalParams, - RacksListBySubscriptionResponse, - RacksListByResourceGroupNextOptionalParams, - RacksListByResourceGroupOptionalParams, - RacksListByResourceGroupResponse, - RacksGetOptionalParams, - RacksGetResponse, - RacksCreateOrUpdateOptionalParams, - RacksCreateOrUpdateResponse, - RacksDeleteOptionalParams, - RacksDeleteResponse, - RacksUpdateOptionalParams, - RacksUpdateResponse, - RacksListBySubscriptionNextResponse, - RacksListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Racks operations. */ -export class RacksImpl implements Racks { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class Racks class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of racks in the provided subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: RacksListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: RacksListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: RacksListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: RacksListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of racks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: RacksListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: RacksListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: RacksListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: RacksListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Get a list of racks in the provided subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: RacksListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Get a list of racks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: RacksListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Get properties of the provided rack. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - rackName: string, - options?: RacksGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, rackName, options }, - getOperationSpec, - ); - } - - /** - * Create a new rack or update properties of the existing one. All customer initiated requests will be - * rejected as the life cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param rackParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - rackName: string, - rackParameters: Rack, - options?: RacksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, RacksCreateOrUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, rackName, rackParameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - RacksCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new rack or update properties of the existing one. All customer initiated requests will be - * rejected as the life cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param rackParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - rackName: string, - rackParameters: Rack, - options?: RacksCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - rackName, - rackParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this - * resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - rackName: string, - options?: RacksDeleteOptionalParams, - ): Promise, RacksDeleteResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, rackName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>( - lro, - { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }, - ); - await poller.poll(); - return poller; - } - - /** - * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this - * resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - rackName: string, - options?: RacksDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, rackName, options); - return poller.pollUntilDone(); - } - - /** - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and - * tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - rackName: string, - options?: RacksUpdateOptionalParams, - ): Promise, RacksUpdateResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, rackName, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller>( - lro, - { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }, - ); - await poller.poll(); - return poller; - } - - /** - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and - * tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - rackName: string, - options?: RacksUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate(resourceGroupName, rackName, options); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: RacksListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: RacksListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/racks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RackList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RackList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Rack, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.rackName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Rack, - }, - 201: { - bodyMapper: Mappers.Rack, - }, - 202: { - bodyMapper: Mappers.Rack, - }, - 204: { - bodyMapper: Mappers.Rack, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.rackParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.rackName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.rackName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.Rack, - }, - 201: { - bodyMapper: Mappers.Rack, - }, - 202: { - bodyMapper: Mappers.Rack, - }, - 204: { - bodyMapper: Mappers.Rack, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.rackUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.rackName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RackList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RackList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/storageAppliances.ts b/sdk/networkcloud/arm-networkcloud/src/operations/storageAppliances.ts deleted file mode 100644 index 689e3afb13b5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/storageAppliances.ts +++ /dev/null @@ -1,1083 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { StorageAppliances } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - StorageAppliance, - StorageAppliancesListBySubscriptionNextOptionalParams, - StorageAppliancesListBySubscriptionOptionalParams, - StorageAppliancesListBySubscriptionResponse, - StorageAppliancesListByResourceGroupNextOptionalParams, - StorageAppliancesListByResourceGroupOptionalParams, - StorageAppliancesListByResourceGroupResponse, - StorageAppliancesGetOptionalParams, - StorageAppliancesGetResponse, - StorageAppliancesCreateOrUpdateOptionalParams, - StorageAppliancesCreateOrUpdateResponse, - StorageAppliancesDeleteOptionalParams, - StorageAppliancesDeleteResponse, - StorageAppliancesUpdateOptionalParams, - StorageAppliancesUpdateResponse, - StorageAppliancesDisableRemoteVendorManagementOptionalParams, - StorageAppliancesDisableRemoteVendorManagementResponse, - StorageAppliancesEnableRemoteVendorManagementOptionalParams, - StorageAppliancesEnableRemoteVendorManagementResponse, - StorageApplianceRunReadCommandsParameters, - StorageAppliancesRunReadCommandsOptionalParams, - StorageAppliancesRunReadCommandsResponse, - StorageAppliancesListBySubscriptionNextResponse, - StorageAppliancesListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing StorageAppliances operations. */ -export class StorageAppliancesImpl implements StorageAppliances { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class StorageAppliances class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of storage appliances in the provided subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: StorageAppliancesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: StorageAppliancesListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: StorageAppliancesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: StorageAppliancesListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of storage appliances in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: StorageAppliancesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: StorageAppliancesListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: StorageAppliancesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: StorageAppliancesListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Get a list of storage appliances in the provided subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: StorageAppliancesListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Get a list of storage appliances in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: StorageAppliancesListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Get properties of the provided storage appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, storageApplianceName, options }, - getOperationSpec, - ); - } - - /** - * Create a new storage appliance or update the properties of the existing one. All customer initiated - * requests will be rejected as the life cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - storageApplianceName: string, - storageApplianceParameters: StorageAppliance, - options?: StorageAppliancesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - StorageAppliancesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - storageApplianceName, - storageApplianceParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - StorageAppliancesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new storage appliance or update the properties of the existing one. All customer initiated - * requests will be rejected as the life cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - storageApplianceName: string, - storageApplianceParameters: StorageAppliance, - options?: StorageAppliancesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - storageApplianceName, - storageApplianceParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided storage appliance. All customer initiated requests will be rejected as the life - * cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - StorageAppliancesDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, storageApplianceName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - StorageAppliancesDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the provided storage appliance. All customer initiated requests will be rejected as the life - * cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, storageApplianceName, options); - return poller.pollUntilDone(); - } - - /** - * Update properties of the provided storage appliance, or update tags associated with the storage - * appliance Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - StorageAppliancesUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, storageApplianceName, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - StorageAppliancesUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Update properties of the provided storage appliance, or update tags associated with the storage - * appliance Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate(resourceGroupName, storageApplianceName, options); - return poller.pollUntilDone(); - } - - /** - * Disable remote vendor management of the provided storage appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - async beginDisableRemoteVendorManagement( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - StorageAppliancesDisableRemoteVendorManagementResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, storageApplianceName, options }, - spec: disableRemoteVendorManagementOperationSpec, - }); - const poller = await createHttpPoller< - StorageAppliancesDisableRemoteVendorManagementResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Disable remote vendor management of the provided storage appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - async beginDisableRemoteVendorManagementAndWait( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams, - ): Promise { - const poller = await this.beginDisableRemoteVendorManagement( - resourceGroupName, - storageApplianceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Enable remote vendor management of the provided storage appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - async beginEnableRemoteVendorManagement( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - StorageAppliancesEnableRemoteVendorManagementResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, storageApplianceName, options }, - spec: enableRemoteVendorManagementOperationSpec, - }); - const poller = await createHttpPoller< - StorageAppliancesEnableRemoteVendorManagementResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Enable remote vendor management of the provided storage appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - async beginEnableRemoteVendorManagementAndWait( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams, - ): Promise { - const poller = await this.beginEnableRemoteVendorManagement( - resourceGroupName, - storageApplianceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Run one or more read-only commands on the provided storage appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceRunReadCommandsParameters The request body. - * @param options The options parameters. - */ - async beginRunReadCommands( - resourceGroupName: string, - storageApplianceName: string, - storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, - options?: StorageAppliancesRunReadCommandsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - StorageAppliancesRunReadCommandsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - storageApplianceName, - storageApplianceRunReadCommandsParameters, - options, - }, - spec: runReadCommandsOperationSpec, - }); - const poller = await createHttpPoller< - StorageAppliancesRunReadCommandsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Run one or more read-only commands on the provided storage appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceRunReadCommandsParameters The request body. - * @param options The options parameters. - */ - async beginRunReadCommandsAndWait( - resourceGroupName: string, - storageApplianceName: string, - storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, - options?: StorageAppliancesRunReadCommandsOptionalParams, - ): Promise { - const poller = await this.beginRunReadCommands( - resourceGroupName, - storageApplianceName, - storageApplianceRunReadCommandsParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: StorageAppliancesListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: StorageAppliancesListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/storageAppliances", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StorageApplianceList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StorageApplianceList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StorageAppliance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.storageApplianceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.StorageAppliance, - }, - 201: { - bodyMapper: Mappers.StorageAppliance, - }, - 202: { - bodyMapper: Mappers.StorageAppliance, - }, - 204: { - bodyMapper: Mappers.StorageAppliance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.storageApplianceParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.storageApplianceName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.storageApplianceName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.StorageAppliance, - }, - 201: { - bodyMapper: Mappers.StorageAppliance, - }, - 202: { - bodyMapper: Mappers.StorageAppliance, - }, - 204: { - bodyMapper: Mappers.StorageAppliance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.storageApplianceUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.storageApplianceName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const disableRemoteVendorManagementOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/disableRemoteVendorManagement", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.storageApplianceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const enableRemoteVendorManagementOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/enableRemoteVendorManagement", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.storageApplianceEnableRemoteVendorManagementParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.storageApplianceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const runReadCommandsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/runReadCommands", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.storageApplianceRunReadCommandsParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.storageApplianceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StorageApplianceList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StorageApplianceList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/trunkedNetworks.ts b/sdk/networkcloud/arm-networkcloud/src/operations/trunkedNetworks.ts deleted file mode 100644 index eba53d2b2ac9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/trunkedNetworks.ts +++ /dev/null @@ -1,619 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { TrunkedNetworks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - TrunkedNetwork, - TrunkedNetworksListBySubscriptionNextOptionalParams, - TrunkedNetworksListBySubscriptionOptionalParams, - TrunkedNetworksListBySubscriptionResponse, - TrunkedNetworksListByResourceGroupNextOptionalParams, - TrunkedNetworksListByResourceGroupOptionalParams, - TrunkedNetworksListByResourceGroupResponse, - TrunkedNetworksGetOptionalParams, - TrunkedNetworksGetResponse, - TrunkedNetworksCreateOrUpdateOptionalParams, - TrunkedNetworksCreateOrUpdateResponse, - TrunkedNetworksDeleteOptionalParams, - TrunkedNetworksDeleteResponse, - TrunkedNetworksUpdateOptionalParams, - TrunkedNetworksUpdateResponse, - TrunkedNetworksListBySubscriptionNextResponse, - TrunkedNetworksListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing TrunkedNetworks operations. */ -export class TrunkedNetworksImpl implements TrunkedNetworks { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class TrunkedNetworks class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of trunked networks in the provided subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: TrunkedNetworksListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: TrunkedNetworksListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: TrunkedNetworksListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: TrunkedNetworksListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of trunked networks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: TrunkedNetworksListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: TrunkedNetworksListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: TrunkedNetworksListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: TrunkedNetworksListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Get a list of trunked networks in the provided subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: TrunkedNetworksListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Get a list of trunked networks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: TrunkedNetworksListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Get properties of the provided trunked network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - trunkedNetworkName: string, - options?: TrunkedNetworksGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, trunkedNetworkName, options }, - getOperationSpec, - ); - } - - /** - * Create a new trunked network or update the properties of the existing trunked network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param trunkedNetworkParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - trunkedNetworkName: string, - trunkedNetworkParameters: TrunkedNetwork, - options?: TrunkedNetworksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - TrunkedNetworksCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - trunkedNetworkName, - trunkedNetworkParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - TrunkedNetworksCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new trunked network or update the properties of the existing trunked network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param trunkedNetworkParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - trunkedNetworkName: string, - trunkedNetworkParameters: TrunkedNetwork, - options?: TrunkedNetworksCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - trunkedNetworkName, - trunkedNetworkParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided trunked network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - trunkedNetworkName: string, - options?: TrunkedNetworksDeleteOptionalParams, - ): Promise< - SimplePollerLike, TrunkedNetworksDeleteResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, trunkedNetworkName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - TrunkedNetworksDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the provided trunked network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - trunkedNetworkName: string, - options?: TrunkedNetworksDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, trunkedNetworkName, options); - return poller.pollUntilDone(); - } - - /** - * Update tags associated with the provided trunked network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - trunkedNetworkName: string, - options?: TrunkedNetworksUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, trunkedNetworkName, options }, - updateOperationSpec, - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: TrunkedNetworksListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: TrunkedNetworksListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/trunkedNetworks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TrunkedNetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TrunkedNetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TrunkedNetwork, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.trunkedNetworkName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TrunkedNetwork, - }, - 201: { - bodyMapper: Mappers.TrunkedNetwork, - }, - 202: { - bodyMapper: Mappers.TrunkedNetwork, - }, - 204: { - bodyMapper: Mappers.TrunkedNetwork, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.trunkedNetworkParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.trunkedNetworkName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.trunkedNetworkName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.TrunkedNetwork, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.trunkedNetworkUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.trunkedNetworkName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TrunkedNetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TrunkedNetworkList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/virtualMachines.ts b/sdk/networkcloud/arm-networkcloud/src/operations/virtualMachines.ts deleted file mode 100644 index 4f4c7b726a2d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/virtualMachines.ts +++ /dev/null @@ -1,1277 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { VirtualMachines } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - VirtualMachine, - VirtualMachinesListBySubscriptionNextOptionalParams, - VirtualMachinesListBySubscriptionOptionalParams, - VirtualMachinesListBySubscriptionResponse, - VirtualMachinesListByResourceGroupNextOptionalParams, - VirtualMachinesListByResourceGroupOptionalParams, - VirtualMachinesListByResourceGroupResponse, - VirtualMachinesGetOptionalParams, - VirtualMachinesGetResponse, - VirtualMachinesCreateOrUpdateOptionalParams, - VirtualMachinesCreateOrUpdateResponse, - VirtualMachinesDeleteOptionalParams, - VirtualMachinesDeleteResponse, - VirtualMachinesUpdateOptionalParams, - VirtualMachinesUpdateResponse, - VirtualMachinesAssignRelayOptionalParams, - VirtualMachinesAssignRelayResponse, - VirtualMachinesPowerOffOptionalParams, - VirtualMachinesPowerOffResponse, - VirtualMachinesReimageOptionalParams, - VirtualMachinesReimageResponse, - VirtualMachinesRestartOptionalParams, - VirtualMachinesRestartResponse, - VirtualMachinesStartOptionalParams, - VirtualMachinesStartResponse, - VirtualMachinesListBySubscriptionNextResponse, - VirtualMachinesListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing VirtualMachines operations. */ -export class VirtualMachinesImpl implements VirtualMachines { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class VirtualMachines class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of virtual machines in the provided subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: VirtualMachinesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: VirtualMachinesListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualMachinesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: VirtualMachinesListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of virtual machines in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VirtualMachinesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Get a list of virtual machines in the provided subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: VirtualMachinesListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Get a list of virtual machines in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Get properties of the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualMachineName, options }, - getOperationSpec, - ); - } - - /** - * Create a new virtual machine or update the properties of the existing virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - virtualMachineName: string, - virtualMachineParameters: VirtualMachine, - options?: VirtualMachinesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachinesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - virtualMachineName, - virtualMachineParameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachinesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new virtual machine or update the properties of the existing virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - virtualMachineParameters: VirtualMachine, - options?: VirtualMachinesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - virtualMachineName, - virtualMachineParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams, - ): Promise< - SimplePollerLike, VirtualMachinesDeleteResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualMachineName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachinesDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, virtualMachineName, options); - return poller.pollUntilDone(); - } - - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesUpdateOptionalParams, - ): Promise< - SimplePollerLike, VirtualMachinesUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualMachineName, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachinesUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate(resourceGroupName, virtualMachineName, options); - return poller.pollUntilDone(); - } - - /** - * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided - * virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - async beginAssignRelay( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesAssignRelayOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachinesAssignRelayResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualMachineName, options }, - spec: assignRelayOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachinesAssignRelayResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided - * virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - async beginAssignRelayAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesAssignRelayOptionalParams, - ): Promise { - const poller = await this.beginAssignRelay(resourceGroupName, virtualMachineName, options); - return poller.pollUntilDone(); - } - - /** - * Power off the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - async beginPowerOff( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesPowerOffOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachinesPowerOffResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualMachineName, options }, - spec: powerOffOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachinesPowerOffResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Power off the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - async beginPowerOffAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesPowerOffOptionalParams, - ): Promise { - const poller = await this.beginPowerOff(resourceGroupName, virtualMachineName, options); - return poller.pollUntilDone(); - } - - /** - * Reimage the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - async beginReimage( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesReimageOptionalParams, - ): Promise< - SimplePollerLike, VirtualMachinesReimageResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualMachineName, options }, - spec: reimageOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachinesReimageResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Reimage the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - async beginReimageAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesReimageOptionalParams, - ): Promise { - const poller = await this.beginReimage(resourceGroupName, virtualMachineName, options); - return poller.pollUntilDone(); - } - - /** - * Restart the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - async beginRestart( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams, - ): Promise< - SimplePollerLike, VirtualMachinesRestartResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualMachineName, options }, - spec: restartOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachinesRestartResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Restart the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - async beginRestartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams, - ): Promise { - const poller = await this.beginRestart(resourceGroupName, virtualMachineName, options); - return poller.pollUntilDone(); - } - - /** - * Start the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - async beginStart( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams, - ): Promise< - SimplePollerLike, VirtualMachinesStartResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, virtualMachineName, options }, - spec: startOperationSpec, - }); - const poller = await createHttpPoller< - VirtualMachinesStartResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Start the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - async beginStartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams, - ): Promise { - const poller = await this.beginStart(resourceGroupName, virtualMachineName, options); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: VirtualMachinesListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: VirtualMachinesListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/virtualMachines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine, - }, - 201: { - bodyMapper: Mappers.VirtualMachine, - }, - 202: { - bodyMapper: Mappers.VirtualMachine, - }, - 204: { - bodyMapper: Mappers.VirtualMachine, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.virtualMachineParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine, - }, - 201: { - bodyMapper: Mappers.VirtualMachine, - }, - 202: { - bodyMapper: Mappers.VirtualMachine, - }, - 204: { - bodyMapper: Mappers.VirtualMachine, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.virtualMachineUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const assignRelayOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/assignRelay", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.virtualMachineAssignRelayParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const powerOffOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/powerOff", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.virtualMachinePowerOffParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const reimageOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/reimage", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const restartOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/restart", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const startOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/start", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualMachineName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operations/volumes.ts b/sdk/networkcloud/arm-networkcloud/src/operations/volumes.ts deleted file mode 100644 index 9b4926a67c87..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operations/volumes.ts +++ /dev/null @@ -1,609 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import type { Volumes } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import type { NetworkCloud } from "../networkCloud.js"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import type { - Volume, - VolumesListBySubscriptionNextOptionalParams, - VolumesListBySubscriptionOptionalParams, - VolumesListBySubscriptionResponse, - VolumesListByResourceGroupNextOptionalParams, - VolumesListByResourceGroupOptionalParams, - VolumesListByResourceGroupResponse, - VolumesGetOptionalParams, - VolumesGetResponse, - VolumesCreateOrUpdateOptionalParams, - VolumesCreateOrUpdateResponse, - VolumesDeleteOptionalParams, - VolumesDeleteResponse, - VolumesUpdateOptionalParams, - VolumesUpdateResponse, - VolumesListBySubscriptionNextResponse, - VolumesListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Volumes operations. */ -export class VolumesImpl implements Volumes { - private readonly client: NetworkCloud; - - /** - * Initialize a new instance of the class Volumes class. - * @param client Reference to the service client - */ - constructor(client: NetworkCloud) { - this.client = client; - } - - /** - * Get a list of volumes in the provided subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: VolumesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: VolumesListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VolumesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: VolumesListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of volumes in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: VolumesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage(resourceGroupName, options, settings); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: VolumesListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: VolumesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - const page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options); - continuationToken = result.nextLink; - const page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: VolumesListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) { - yield* page; - } - } - - /** - * Get a list of volumes in the provided subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: VolumesListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec); - } - - /** - * Get a list of volumes in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: VolumesListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Get properties of the provided volume. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - volumeName: string, - options?: VolumesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, volumeName, options }, - getOperationSpec, - ); - } - - /** - * Create a new volume or update the properties of the existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param volumeParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - volumeName: string, - volumeParameters: Volume, - options?: VolumesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, VolumesCreateOrUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, volumeName, volumeParameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - VolumesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Create a new volume or update the properties of the existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param volumeParameters The request body. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - volumeName: string, - volumeParameters: Volume, - options?: VolumesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - volumeName, - volumeParameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete the provided volume. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - volumeName: string, - options?: VolumesDeleteOptionalParams, - ): Promise, VolumesDeleteResponse>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, volumeName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - VolumesDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete the provided volume. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - volumeName: string, - options?: VolumesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete(resourceGroupName, volumeName, options); - return poller.pollUntilDone(); - } - - /** - * Update tags associated with the provided volume. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - volumeName: string, - options?: VolumesUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, volumeName, options }, - updateOperationSpec, - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: VolumesListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: VolumesListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkCloud/volumes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VolumeList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VolumeList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skipToken], - urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Volume, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.volumeName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Volume, - }, - 201: { - bodyMapper: Mappers.Volume, - }, - 202: { - bodyMapper: Mappers.Volume, - }, - 204: { - bodyMapper: Mappers.Volume, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.volumeParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.volumeName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.volumeName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch, Parameters.ifNoneMatch], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.Volume, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.volumeUpdateParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.volumeName, - ], - headerParameters: [ - Parameters.accept, - Parameters.contentType, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - mediaType: "json", - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VolumeList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VolumeList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/agentPools.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/agentPools.ts deleted file mode 100644 index db25b8c95d42..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/agentPools.ts +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - AgentPool, - AgentPoolsListByKubernetesClusterOptionalParams, - AgentPoolsGetOptionalParams, - AgentPoolsGetResponse, - AgentPoolsCreateOrUpdateOptionalParams, - AgentPoolsCreateOrUpdateResponse, - AgentPoolsDeleteOptionalParams, - AgentPoolsDeleteResponse, - AgentPoolsUpdateOptionalParams, - AgentPoolsUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a AgentPools. */ -export interface AgentPools { - /** - * Get a list of agent pools for the provided Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - listByKubernetesCluster( - resourceGroupName: string, - kubernetesClusterName: string, - options?: AgentPoolsListByKubernetesClusterOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get properties of the provided Kubernetes cluster agent pool. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - kubernetesClusterName: string, - agentPoolName: string, - options?: AgentPoolsGetOptionalParams, - ): Promise; - /** - * Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param agentPoolParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - kubernetesClusterName: string, - agentPoolName: string, - agentPoolParameters: AgentPool, - options?: AgentPoolsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - AgentPoolsCreateOrUpdateResponse - > - >; - /** - * Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param agentPoolParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - agentPoolName: string, - agentPoolParameters: AgentPool, - options?: AgentPoolsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided Kubernetes cluster agent pool. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - kubernetesClusterName: string, - agentPoolName: string, - options?: AgentPoolsDeleteOptionalParams, - ): Promise, AgentPoolsDeleteResponse>>; - /** - * Delete the provided Kubernetes cluster agent pool. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - agentPoolName: string, - options?: AgentPoolsDeleteOptionalParams, - ): Promise; - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - kubernetesClusterName: string, - agentPoolName: string, - options?: AgentPoolsUpdateOptionalParams, - ): Promise, AgentPoolsUpdateResponse>>; - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param agentPoolName The name of the Kubernetes cluster agent pool. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - agentPoolName: string, - options?: AgentPoolsUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/bareMetalMachineKeySets.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/bareMetalMachineKeySets.ts deleted file mode 100644 index 12dbbba20bb5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/bareMetalMachineKeySets.ts +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - BareMetalMachineKeySet, - BareMetalMachineKeySetsListByClusterOptionalParams, - BareMetalMachineKeySetsGetOptionalParams, - BareMetalMachineKeySetsGetResponse, - BareMetalMachineKeySetsCreateOrUpdateOptionalParams, - BareMetalMachineKeySetsCreateOrUpdateResponse, - BareMetalMachineKeySetsDeleteOptionalParams, - BareMetalMachineKeySetsDeleteResponse, - BareMetalMachineKeySetsUpdateOptionalParams, - BareMetalMachineKeySetsUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a BareMetalMachineKeySets. */ -export interface BareMetalMachineKeySets { - /** - * Get a list of bare metal machine key sets for the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - listByCluster( - resourceGroupName: string, - clusterName: string, - options?: BareMetalMachineKeySetsListByClusterOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get bare metal machine key set of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - bareMetalMachineKeySetName: string, - options?: BareMetalMachineKeySetsGetOptionalParams, - ): Promise; - /** - * Create a new bare metal machine key set or update the existing one for the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param bareMetalMachineKeySetParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - bareMetalMachineKeySetName: string, - bareMetalMachineKeySetParameters: BareMetalMachineKeySet, - options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachineKeySetsCreateOrUpdateResponse - > - >; - /** - * Create a new bare metal machine key set or update the existing one for the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param bareMetalMachineKeySetParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - bareMetalMachineKeySetName: string, - bareMetalMachineKeySetParameters: BareMetalMachineKeySet, - options?: BareMetalMachineKeySetsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the bare metal machine key set of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterName: string, - bareMetalMachineKeySetName: string, - options?: BareMetalMachineKeySetsDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachineKeySetsDeleteResponse - > - >; - /** - * Delete the bare metal machine key set of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - bareMetalMachineKeySetName: string, - options?: BareMetalMachineKeySetsDeleteOptionalParams, - ): Promise; - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - clusterName: string, - bareMetalMachineKeySetName: string, - options?: BareMetalMachineKeySetsUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachineKeySetsUpdateResponse - > - >; - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bareMetalMachineKeySetName The name of the bare metal machine key set. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - clusterName: string, - bareMetalMachineKeySetName: string, - options?: BareMetalMachineKeySetsUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/bareMetalMachines.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/bareMetalMachines.ts deleted file mode 100644 index f9c57b2b47be..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/bareMetalMachines.ts +++ /dev/null @@ -1,495 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - BareMetalMachine, - BareMetalMachinesListBySubscriptionOptionalParams, - BareMetalMachinesListByResourceGroupOptionalParams, - BareMetalMachinesGetOptionalParams, - BareMetalMachinesGetResponse, - BareMetalMachinesCreateOrUpdateOptionalParams, - BareMetalMachinesCreateOrUpdateResponse, - BareMetalMachinesDeleteOptionalParams, - BareMetalMachinesDeleteResponse, - BareMetalMachinesUpdateOptionalParams, - BareMetalMachinesUpdateResponse, - BareMetalMachinesCordonOptionalParams, - BareMetalMachinesCordonResponse, - BareMetalMachinesPowerOffOptionalParams, - BareMetalMachinesPowerOffResponse, - BareMetalMachinesReimageOptionalParams, - BareMetalMachinesReimageResponse, - BareMetalMachinesReplaceOptionalParams, - BareMetalMachinesReplaceResponse, - BareMetalMachinesRestartOptionalParams, - BareMetalMachinesRestartResponse, - BareMetalMachineRunCommandParameters, - BareMetalMachinesRunCommandOptionalParams, - BareMetalMachinesRunCommandResponse, - BareMetalMachineRunDataExtractsParameters, - BareMetalMachinesRunDataExtractsOptionalParams, - BareMetalMachinesRunDataExtractsResponse, - BareMetalMachinesRunDataExtractsRestrictedOptionalParams, - BareMetalMachinesRunDataExtractsRestrictedResponse, - BareMetalMachineRunReadCommandsParameters, - BareMetalMachinesRunReadCommandsOptionalParams, - BareMetalMachinesRunReadCommandsResponse, - BareMetalMachinesStartOptionalParams, - BareMetalMachinesStartResponse, - BareMetalMachinesUncordonOptionalParams, - BareMetalMachinesUncordonResponse, -} from "../models/index.js"; - -/// -/** Interface representing a BareMetalMachines. */ -export interface BareMetalMachines { - /** - * Get a list of bare metal machines in the provided subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: BareMetalMachinesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a list of bare metal machines in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: BareMetalMachinesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get properties of the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesGetOptionalParams, - ): Promise; - /** - * Create a new bare metal machine or update the properties of the existing one. All customer initiated - * requests will be rejected as the life cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineParameters: BareMetalMachine, - options?: BareMetalMachinesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesCreateOrUpdateResponse - > - >; - /** - * Create a new bare metal machine or update the properties of the existing one. All customer initiated - * requests will be rejected as the life cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineParameters: BareMetalMachine, - options?: BareMetalMachinesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life - * cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesDeleteResponse - > - >; - /** - * Delete the provided bare metal machine. All customer initiated requests will be rejected as the life - * cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesDeleteOptionalParams, - ): Promise; - /** - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal - * machine. Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesUpdateResponse - > - >; - /** - * Patch properties of the provided bare metal machine, or update tags associated with the bare metal - * machine. Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesUpdateOptionalParams, - ): Promise; - /** - * Cordon the provided bare metal machine's Kubernetes node. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginCordon( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesCordonOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesCordonResponse - > - >; - /** - * Cordon the provided bare metal machine's Kubernetes node. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginCordonAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesCordonOptionalParams, - ): Promise; - /** - * Power off the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginPowerOff( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesPowerOffOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesPowerOffResponse - > - >; - /** - * Power off the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginPowerOffAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesPowerOffOptionalParams, - ): Promise; - /** - * Reimage the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginReimage( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesReimageOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesReimageResponse - > - >; - /** - * Reimage the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginReimageAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesReimageOptionalParams, - ): Promise; - /** - * Replace the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginReplace( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesReplaceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesReplaceResponse - > - >; - /** - * Replace the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginReplaceAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesReplaceOptionalParams, - ): Promise; - /** - * Restart the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginRestart( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesRestartOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesRestartResponse - > - >; - /** - * Restart the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginRestartAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesRestartOptionalParams, - ): Promise; - /** - * Run the command or the script on the provided bare metal machine. The URL to storage account with - * the command execution results and the command exit code can be retrieved from the operation status - * API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunCommandParameters The request body. - * @param options The options parameters. - */ - beginRunCommand( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, - options?: BareMetalMachinesRunCommandOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesRunCommandResponse - > - >; - /** - * Run the command or the script on the provided bare metal machine. The URL to storage account with - * the command execution results and the command exit code can be retrieved from the operation status - * API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunCommandParameters The request body. - * @param options The options parameters. - */ - beginRunCommandAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters, - options?: BareMetalMachinesRunCommandOptionalParams, - ): Promise; - /** - * Run one or more data extractions on the provided bare metal machine. The URL to storage account with - * the command execution results and the command exit code can be retrieved from the operation status - * API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunDataExtractsParameters The request body. - * @param options The options parameters. - */ - beginRunDataExtracts( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, - options?: BareMetalMachinesRunDataExtractsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesRunDataExtractsResponse - > - >; - /** - * Run one or more data extractions on the provided bare metal machine. The URL to storage account with - * the command execution results and the command exit code can be retrieved from the operation status - * API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunDataExtractsParameters The request body. - * @param options The options parameters. - */ - beginRunDataExtractsAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters, - options?: BareMetalMachinesRunDataExtractsOptionalParams, - ): Promise; - /** - * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage - * account with the command execution results and the command exit code can be retrieved from the - * operation status API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunDataExtractsRestrictedParameters The request body. - * @param options The options parameters. - */ - beginRunDataExtractsRestricted( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, - options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesRunDataExtractsRestrictedResponse - > - >; - /** - * Run one or more restricted data extractions on the provided bare metal machine. The URL to storage - * account with the command execution results and the command exit code can be retrieved from the - * operation status API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunDataExtractsRestrictedParameters The request body. - * @param options The options parameters. - */ - beginRunDataExtractsRestrictedAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunDataExtractsRestrictedParameters: BareMetalMachineRunDataExtractsParameters, - options?: BareMetalMachinesRunDataExtractsRestrictedOptionalParams, - ): Promise; - /** - * Run one or more read-only commands on the provided bare metal machine. The URL to storage account - * with the command execution results and the command exit code can be retrieved from the operation - * status API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunReadCommandsParameters The request body. - * @param options The options parameters. - */ - beginRunReadCommands( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, - options?: BareMetalMachinesRunReadCommandsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesRunReadCommandsResponse - > - >; - /** - * Run one or more read-only commands on the provided bare metal machine. The URL to storage account - * with the command execution results and the command exit code can be retrieved from the operation - * status API once available. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param bareMetalMachineRunReadCommandsParameters The request body. - * @param options The options parameters. - */ - beginRunReadCommandsAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters, - options?: BareMetalMachinesRunReadCommandsOptionalParams, - ): Promise; - /** - * Start the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginStart( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesStartOptionalParams, - ): Promise< - SimplePollerLike, BareMetalMachinesStartResponse> - >; - /** - * Start the provided bare metal machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginStartAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesStartOptionalParams, - ): Promise; - /** - * Uncordon the provided bare metal machine's Kubernetes node. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginUncordon( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesUncordonOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BareMetalMachinesUncordonResponse - > - >; - /** - * Uncordon the provided bare metal machine's Kubernetes node. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param bareMetalMachineName The name of the bare metal machine. - * @param options The options parameters. - */ - beginUncordonAndWait( - resourceGroupName: string, - bareMetalMachineName: string, - options?: BareMetalMachinesUncordonOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/bmcKeySets.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/bmcKeySets.ts deleted file mode 100644 index f1da3add85f9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/bmcKeySets.ts +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - BmcKeySet, - BmcKeySetsListByClusterOptionalParams, - BmcKeySetsGetOptionalParams, - BmcKeySetsGetResponse, - BmcKeySetsCreateOrUpdateOptionalParams, - BmcKeySetsCreateOrUpdateResponse, - BmcKeySetsDeleteOptionalParams, - BmcKeySetsDeleteResponse, - BmcKeySetsUpdateOptionalParams, - BmcKeySetsUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a BmcKeySets. */ -export interface BmcKeySets { - /** - * Get a list of baseboard management controller key sets for the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - listByCluster( - resourceGroupName: string, - clusterName: string, - options?: BmcKeySetsListByClusterOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get baseboard management controller key set of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - bmcKeySetName: string, - options?: BmcKeySetsGetOptionalParams, - ): Promise; - /** - * Create a new baseboard management controller key set or update the existing one for the provided - * cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param bmcKeySetParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - bmcKeySetName: string, - bmcKeySetParameters: BmcKeySet, - options?: BmcKeySetsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - BmcKeySetsCreateOrUpdateResponse - > - >; - /** - * Create a new baseboard management controller key set or update the existing one for the provided - * cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param bmcKeySetParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - bmcKeySetName: string, - bmcKeySetParameters: BmcKeySet, - options?: BmcKeySetsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the baseboard management controller key set of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterName: string, - bmcKeySetName: string, - options?: BmcKeySetsDeleteOptionalParams, - ): Promise, BmcKeySetsDeleteResponse>>; - /** - * Delete the baseboard management controller key set of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - bmcKeySetName: string, - options?: BmcKeySetsDeleteOptionalParams, - ): Promise; - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - clusterName: string, - bmcKeySetName: string, - options?: BmcKeySetsUpdateOptionalParams, - ): Promise, BmcKeySetsUpdateResponse>>; - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param bmcKeySetName The name of the baseboard management controller key set. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - clusterName: string, - bmcKeySetName: string, - options?: BmcKeySetsUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/cloudServicesNetworks.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/cloudServicesNetworks.ts deleted file mode 100644 index 9a8d0f04d767..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/cloudServicesNetworks.ts +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - CloudServicesNetwork, - CloudServicesNetworksListBySubscriptionOptionalParams, - CloudServicesNetworksListByResourceGroupOptionalParams, - CloudServicesNetworksGetOptionalParams, - CloudServicesNetworksGetResponse, - CloudServicesNetworksCreateOrUpdateOptionalParams, - CloudServicesNetworksCreateOrUpdateResponse, - CloudServicesNetworksDeleteOptionalParams, - CloudServicesNetworksDeleteResponse, - CloudServicesNetworksUpdateOptionalParams, - CloudServicesNetworksUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a CloudServicesNetworks. */ -export interface CloudServicesNetworks { - /** - * Get a list of cloud services networks in the provided subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: CloudServicesNetworksListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a list of cloud services networks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: CloudServicesNetworksListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get properties of the provided cloud services network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - cloudServicesNetworkName: string, - options?: CloudServicesNetworksGetOptionalParams, - ): Promise; - /** - * Create a new cloud services network or update the properties of the existing cloud services network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - cloudServicesNetworkName: string, - cloudServicesNetworkParameters: CloudServicesNetwork, - options?: CloudServicesNetworksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - CloudServicesNetworksCreateOrUpdateResponse - > - >; - /** - * Create a new cloud services network or update the properties of the existing cloud services network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param cloudServicesNetworkParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - cloudServicesNetworkName: string, - cloudServicesNetworkParameters: CloudServicesNetwork, - options?: CloudServicesNetworksCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided cloud services network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - cloudServicesNetworkName: string, - options?: CloudServicesNetworksDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - CloudServicesNetworksDeleteResponse - > - >; - /** - * Delete the provided cloud services network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - cloudServicesNetworkName: string, - options?: CloudServicesNetworksDeleteOptionalParams, - ): Promise; - /** - * Update properties of the provided cloud services network, or update the tags associated with it. - * Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - cloudServicesNetworkName: string, - options?: CloudServicesNetworksUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - CloudServicesNetworksUpdateResponse - > - >; - /** - * Update properties of the provided cloud services network, or update the tags associated with it. - * Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudServicesNetworkName The name of the cloud services network. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - cloudServicesNetworkName: string, - options?: CloudServicesNetworksUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/clusterManagers.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/clusterManagers.ts deleted file mode 100644 index 633f8d4d4da8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/clusterManagers.ts +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ClusterManager, - ClusterManagersListBySubscriptionOptionalParams, - ClusterManagersListByResourceGroupOptionalParams, - ClusterManagersGetOptionalParams, - ClusterManagersGetResponse, - ClusterManagersCreateOrUpdateOptionalParams, - ClusterManagersCreateOrUpdateResponse, - ClusterManagersDeleteOptionalParams, - ClusterManagersDeleteResponse, - ClusterManagersUpdateOptionalParams, - ClusterManagersUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ClusterManagers. */ -export interface ClusterManagers { - /** - * Get a list of cluster managers in the provided subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: ClusterManagersListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a list of cluster managers in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ClusterManagersListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get the properties of the provided cluster manager. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterManagerName: string, - options?: ClusterManagersGetOptionalParams, - ): Promise; - /** - * Create a new cluster manager or update properties of the cluster manager if it exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - clusterManagerName: string, - clusterManagerParameters: ClusterManager, - options?: ClusterManagersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClusterManagersCreateOrUpdateResponse - > - >; - /** - * Create a new cluster manager or update properties of the cluster manager if it exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param clusterManagerParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterManagerName: string, - clusterManagerParameters: ClusterManager, - options?: ClusterManagersCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided cluster manager. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterManagerName: string, - options?: ClusterManagersDeleteOptionalParams, - ): Promise< - SimplePollerLike, ClusterManagersDeleteResponse> - >; - /** - * Delete the provided cluster manager. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterManagerName: string, - options?: ClusterManagersDeleteOptionalParams, - ): Promise; - /** - * Patch properties of the provided cluster manager, or update the tags assigned to the cluster - * manager. Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterManagerName The name of the cluster manager. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterManagerName: string, - options?: ClusterManagersUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/clusters.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/clusters.ts deleted file mode 100644 index e7789c56ae1b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/clusters.ts +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - Cluster, - ClustersListBySubscriptionOptionalParams, - ClustersListByResourceGroupOptionalParams, - ClustersGetOptionalParams, - ClustersGetResponse, - ClustersCreateOrUpdateOptionalParams, - ClustersCreateOrUpdateResponse, - ClustersDeleteOptionalParams, - ClustersDeleteResponse, - ClustersUpdateOptionalParams, - ClustersUpdateResponse, - ClusterContinueUpdateVersionParameters, - ClustersContinueUpdateVersionOptionalParams, - ClustersContinueUpdateVersionResponse, - ClustersDeployOptionalParams, - ClustersDeployResponse, - ClustersScanRuntimeOptionalParams, - ClustersScanRuntimeResponse, - ClusterUpdateVersionParameters, - ClustersUpdateVersionOptionalParams, - ClustersUpdateVersionResponse, -} from "../models/index.js"; - -/// -/** Interface representing a Clusters. */ -export interface Clusters { - /** - * Get a list of clusters in the provided subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: ClustersListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a list of clusters in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get properties of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - options?: ClustersGetOptionalParams, - ): Promise; - /** - * Create a new cluster or update the properties of the cluster if it exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - clusterParameters: Cluster, - options?: ClustersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, ClustersCreateOrUpdateResponse> - >; - /** - * Create a new cluster or update the properties of the cluster if it exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - clusterParameters: Cluster, - options?: ClustersCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams, - ): Promise, ClustersDeleteResponse>>; - /** - * Delete the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams, - ): Promise; - /** - * Patch the properties of the provided cluster, or update the tags associated with the cluster. - * Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - clusterName: string, - options?: ClustersUpdateOptionalParams, - ): Promise, ClustersUpdateResponse>>; - /** - * Patch the properties of the provided cluster, or update the tags associated with the cluster. - * Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - clusterName: string, - options?: ClustersUpdateOptionalParams, - ): Promise; - /** - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused - * after completing a segment of the update. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. - * @param options The options parameters. - */ - beginContinueUpdateVersion( - resourceGroupName: string, - clusterName: string, - clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, - options?: ClustersContinueUpdateVersionOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClustersContinueUpdateVersionResponse - > - >; - /** - * Trigger the continuation of an update for a cluster with a matching update strategy that has paused - * after completing a segment of the update. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterContinueUpdateVersionParameters The request body. - * @param options The options parameters. - */ - beginContinueUpdateVersionAndWait( - resourceGroupName: string, - clusterName: string, - clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters, - options?: ClustersContinueUpdateVersionOptionalParams, - ): Promise; - /** - * Deploy the cluster using the rack configuration provided during creation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - beginDeploy( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeployOptionalParams, - ): Promise, ClustersDeployResponse>>; - /** - * Deploy the cluster using the rack configuration provided during creation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - beginDeployAndWait( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeployOptionalParams, - ): Promise; - /** - * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in - * accordance with the cluster configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - beginScanRuntime( - resourceGroupName: string, - clusterName: string, - options?: ClustersScanRuntimeOptionalParams, - ): Promise< - SimplePollerLike, ClustersScanRuntimeResponse> - >; - /** - * Triggers the execution of a runtime protection scan to detect and remediate detected issues, in - * accordance with the cluster configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - beginScanRuntimeAndWait( - resourceGroupName: string, - clusterName: string, - options?: ClustersScanRuntimeOptionalParams, - ): Promise; - /** - * Update the version of the provided cluster to one of the available supported versions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterUpdateVersionParameters The request body. - * @param options The options parameters. - */ - beginUpdateVersion( - resourceGroupName: string, - clusterName: string, - clusterUpdateVersionParameters: ClusterUpdateVersionParameters, - options?: ClustersUpdateVersionOptionalParams, - ): Promise< - SimplePollerLike, ClustersUpdateVersionResponse> - >; - /** - * Update the version of the provided cluster to one of the available supported versions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param clusterUpdateVersionParameters The request body. - * @param options The options parameters. - */ - beginUpdateVersionAndWait( - resourceGroupName: string, - clusterName: string, - clusterUpdateVersionParameters: ClusterUpdateVersionParameters, - options?: ClustersUpdateVersionOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/consoles.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/consoles.ts deleted file mode 100644 index 52f1e7be6118..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/consoles.ts +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - Console, - ConsolesListByVirtualMachineOptionalParams, - ConsolesGetOptionalParams, - ConsolesGetResponse, - ConsolesCreateOrUpdateOptionalParams, - ConsolesCreateOrUpdateResponse, - ConsolesDeleteOptionalParams, - ConsolesDeleteResponse, - ConsolesUpdateOptionalParams, - ConsolesUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a Consoles. */ -export interface Consoles { - /** - * Get a list of consoles for the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - listByVirtualMachine( - resourceGroupName: string, - virtualMachineName: string, - options?: ConsolesListByVirtualMachineOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get properties of the provided virtual machine console. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - consoleName: string, - options?: ConsolesGetOptionalParams, - ): Promise; - /** - * Create a new virtual machine console or update the properties of the existing virtual machine - * console. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param consoleParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualMachineName: string, - consoleName: string, - consoleParameters: Console, - options?: ConsolesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, ConsolesCreateOrUpdateResponse> - >; - /** - * Create a new virtual machine console or update the properties of the existing virtual machine - * console. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param consoleParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - consoleName: string, - consoleParameters: Console, - options?: ConsolesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided virtual machine console. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualMachineName: string, - consoleName: string, - options?: ConsolesDeleteOptionalParams, - ): Promise, ConsolesDeleteResponse>>; - /** - * Delete the provided virtual machine console. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualMachineName: string, - consoleName: string, - options?: ConsolesDeleteOptionalParams, - ): Promise; - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - virtualMachineName: string, - consoleName: string, - options?: ConsolesUpdateOptionalParams, - ): Promise, ConsolesUpdateResponse>>; - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param consoleName The name of the virtual machine console. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - consoleName: string, - options?: ConsolesUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/index.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/index.ts deleted file mode 100644 index 1e0d7ad2648f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -export * from "./operations.js"; -export * from "./bareMetalMachines.js"; -export * from "./cloudServicesNetworks.js"; -export * from "./clusterManagers.js"; -export * from "./clusters.js"; -export * from "./kubernetesClusters.js"; -export * from "./l2Networks.js"; -export * from "./l3Networks.js"; -export * from "./rackSkus.js"; -export * from "./racks.js"; -export * from "./storageAppliances.js"; -export * from "./trunkedNetworks.js"; -export * from "./virtualMachines.js"; -export * from "./volumes.js"; -export * from "./bareMetalMachineKeySets.js"; -export * from "./bmcKeySets.js"; -export * from "./metricsConfigurations.js"; -export * from "./agentPools.js"; -export * from "./kubernetesClusterFeatures.js"; -export * from "./consoles.js"; diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/kubernetesClusterFeatures.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/kubernetesClusterFeatures.ts deleted file mode 100644 index 1102ab03ab70..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/kubernetesClusterFeatures.ts +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - KubernetesClusterFeature, - KubernetesClusterFeaturesListByKubernetesClusterOptionalParams, - KubernetesClusterFeaturesGetOptionalParams, - KubernetesClusterFeaturesGetResponse, - KubernetesClusterFeaturesCreateOrUpdateOptionalParams, - KubernetesClusterFeaturesCreateOrUpdateResponse, - KubernetesClusterFeaturesDeleteOptionalParams, - KubernetesClusterFeaturesDeleteResponse, - KubernetesClusterFeaturesUpdateOptionalParams, - KubernetesClusterFeaturesUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a KubernetesClusterFeatures. */ -export interface KubernetesClusterFeatures { - /** - * Get a list of features for the provided Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - listByKubernetesCluster( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClusterFeaturesListByKubernetesClusterOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get properties of the provided the Kubernetes cluster feature. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - kubernetesClusterName: string, - featureName: string, - options?: KubernetesClusterFeaturesGetOptionalParams, - ): Promise; - /** - * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it - * exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param kubernetesClusterFeatureParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - kubernetesClusterName: string, - featureName: string, - kubernetesClusterFeatureParameters: KubernetesClusterFeature, - options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - KubernetesClusterFeaturesCreateOrUpdateResponse - > - >; - /** - * Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it - * exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param kubernetesClusterFeatureParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - featureName: string, - kubernetesClusterFeatureParameters: KubernetesClusterFeature, - options?: KubernetesClusterFeaturesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided Kubernetes cluster feature. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - kubernetesClusterName: string, - featureName: string, - options?: KubernetesClusterFeaturesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - KubernetesClusterFeaturesDeleteResponse - > - >; - /** - * Delete the provided Kubernetes cluster feature. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - featureName: string, - options?: KubernetesClusterFeaturesDeleteOptionalParams, - ): Promise; - /** - * Patch properties of the provided Kubernetes cluster feature. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - kubernetesClusterName: string, - featureName: string, - options?: KubernetesClusterFeaturesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - KubernetesClusterFeaturesUpdateResponse - > - >; - /** - * Patch properties of the provided Kubernetes cluster feature. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param featureName The name of the feature. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - featureName: string, - options?: KubernetesClusterFeaturesUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/kubernetesClusters.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/kubernetesClusters.ts deleted file mode 100644 index e16473926489..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/kubernetesClusters.ts +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - KubernetesCluster, - KubernetesClustersListBySubscriptionOptionalParams, - KubernetesClustersListByResourceGroupOptionalParams, - KubernetesClustersGetOptionalParams, - KubernetesClustersGetResponse, - KubernetesClustersCreateOrUpdateOptionalParams, - KubernetesClustersCreateOrUpdateResponse, - KubernetesClustersDeleteOptionalParams, - KubernetesClustersDeleteResponse, - KubernetesClustersUpdateOptionalParams, - KubernetesClustersUpdateResponse, - KubernetesClusterRestartNodeParameters, - KubernetesClustersRestartNodeOptionalParams, - KubernetesClustersRestartNodeResponse, -} from "../models/index.js"; - -/// -/** Interface representing a KubernetesClusters. */ -export interface KubernetesClusters { - /** - * Get a list of Kubernetes clusters in the provided subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: KubernetesClustersListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a list of Kubernetes clusters in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: KubernetesClustersListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get properties of the provided the Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClustersGetOptionalParams, - ): Promise; - /** - * Create a new Kubernetes cluster or update the properties of the existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - kubernetesClusterName: string, - kubernetesClusterParameters: KubernetesCluster, - options?: KubernetesClustersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - KubernetesClustersCreateOrUpdateResponse - > - >; - /** - * Create a new Kubernetes cluster or update the properties of the existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - kubernetesClusterParameters: KubernetesCluster, - options?: KubernetesClustersCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClustersDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - KubernetesClustersDeleteResponse - > - >; - /** - * Delete the provided Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClustersDeleteOptionalParams, - ): Promise; - /** - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the - * Kubernetes cluster. Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClustersUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - KubernetesClustersUpdateResponse - > - >; - /** - * Patch the properties of the provided Kubernetes cluster, or update the tags associated with the - * Kubernetes cluster. Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - options?: KubernetesClustersUpdateOptionalParams, - ): Promise; - /** - * Restart a targeted node of a Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterRestartNodeParameters The request body. - * @param options The options parameters. - */ - beginRestartNode( - resourceGroupName: string, - kubernetesClusterName: string, - kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, - options?: KubernetesClustersRestartNodeOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - KubernetesClustersRestartNodeResponse - > - >; - /** - * Restart a targeted node of a Kubernetes cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param kubernetesClusterName The name of the Kubernetes cluster. - * @param kubernetesClusterRestartNodeParameters The request body. - * @param options The options parameters. - */ - beginRestartNodeAndWait( - resourceGroupName: string, - kubernetesClusterName: string, - kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters, - options?: KubernetesClustersRestartNodeOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/l2Networks.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/l2Networks.ts deleted file mode 100644 index 739a405d253e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/l2Networks.ts +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - L2Network, - L2NetworksListBySubscriptionOptionalParams, - L2NetworksListByResourceGroupOptionalParams, - L2NetworksGetOptionalParams, - L2NetworksGetResponse, - L2NetworksCreateOrUpdateOptionalParams, - L2NetworksCreateOrUpdateResponse, - L2NetworksDeleteOptionalParams, - L2NetworksDeleteResponse, - L2NetworksUpdateOptionalParams, - L2NetworksUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a L2Networks. */ -export interface L2Networks { - /** - * Get a list of layer 2 (L2) networks in the provided subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: L2NetworksListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a list of layer 2 (L2) networks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: L2NetworksListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get properties of the provided layer 2 (L2) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - l2NetworkName: string, - options?: L2NetworksGetOptionalParams, - ): Promise; - /** - * Create a new layer 2 (L2) network or update the properties of the existing network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param l2NetworkParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - l2NetworkName: string, - l2NetworkParameters: L2Network, - options?: L2NetworksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - L2NetworksCreateOrUpdateResponse - > - >; - /** - * Create a new layer 2 (L2) network or update the properties of the existing network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param l2NetworkParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - l2NetworkName: string, - l2NetworkParameters: L2Network, - options?: L2NetworksCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided layer 2 (L2) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - l2NetworkName: string, - options?: L2NetworksDeleteOptionalParams, - ): Promise, L2NetworksDeleteResponse>>; - /** - * Delete the provided layer 2 (L2) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - l2NetworkName: string, - options?: L2NetworksDeleteOptionalParams, - ): Promise; - /** - * Update tags associated with the provided layer 2 (L2) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2NetworkName The name of the L2 network. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - l2NetworkName: string, - options?: L2NetworksUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/l3Networks.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/l3Networks.ts deleted file mode 100644 index f46eadd8955b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/l3Networks.ts +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - L3Network, - L3NetworksListBySubscriptionOptionalParams, - L3NetworksListByResourceGroupOptionalParams, - L3NetworksGetOptionalParams, - L3NetworksGetResponse, - L3NetworksCreateOrUpdateOptionalParams, - L3NetworksCreateOrUpdateResponse, - L3NetworksDeleteOptionalParams, - L3NetworksDeleteResponse, - L3NetworksUpdateOptionalParams, - L3NetworksUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a L3Networks. */ -export interface L3Networks { - /** - * Get a list of layer 3 (L3) networks in the provided subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: L3NetworksListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a list of layer 3 (L3) networks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: L3NetworksListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get properties of the provided layer 3 (L3) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - l3NetworkName: string, - options?: L3NetworksGetOptionalParams, - ): Promise; - /** - * Create a new layer 3 (L3) network or update the properties of the existing network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param l3NetworkParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - l3NetworkName: string, - l3NetworkParameters: L3Network, - options?: L3NetworksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - L3NetworksCreateOrUpdateResponse - > - >; - /** - * Create a new layer 3 (L3) network or update the properties of the existing network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param l3NetworkParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - l3NetworkName: string, - l3NetworkParameters: L3Network, - options?: L3NetworksCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided layer 3 (L3) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - l3NetworkName: string, - options?: L3NetworksDeleteOptionalParams, - ): Promise, L3NetworksDeleteResponse>>; - /** - * Delete the provided layer 3 (L3) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - l3NetworkName: string, - options?: L3NetworksDeleteOptionalParams, - ): Promise; - /** - * Update tags associated with the provided layer 3 (L3) network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3NetworkName The name of the L3 network. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - l3NetworkName: string, - options?: L3NetworksUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/metricsConfigurations.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/metricsConfigurations.ts deleted file mode 100644 index 2e60d3228db7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/metricsConfigurations.ts +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - ClusterMetricsConfiguration, - MetricsConfigurationsListByClusterOptionalParams, - MetricsConfigurationsGetOptionalParams, - MetricsConfigurationsGetResponse, - MetricsConfigurationsCreateOrUpdateOptionalParams, - MetricsConfigurationsCreateOrUpdateResponse, - MetricsConfigurationsDeleteOptionalParams, - MetricsConfigurationsDeleteResponse, - MetricsConfigurationsUpdateOptionalParams, - MetricsConfigurationsUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a MetricsConfigurations. */ -export interface MetricsConfigurations { - /** - * Get a list of metrics configurations for the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param options The options parameters. - */ - listByCluster( - resourceGroupName: string, - clusterName: string, - options?: MetricsConfigurationsListByClusterOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get metrics configuration of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - metricsConfigurationName: string, - options?: MetricsConfigurationsGetOptionalParams, - ): Promise; - /** - * Create new or update the existing metrics configuration of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param metricsConfigurationParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - metricsConfigurationName: string, - metricsConfigurationParameters: ClusterMetricsConfiguration, - options?: MetricsConfigurationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - MetricsConfigurationsCreateOrUpdateResponse - > - >; - /** - * Create new or update the existing metrics configuration of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param metricsConfigurationParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - metricsConfigurationName: string, - metricsConfigurationParameters: ClusterMetricsConfiguration, - options?: MetricsConfigurationsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the metrics configuration of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterName: string, - metricsConfigurationName: string, - options?: MetricsConfigurationsDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - MetricsConfigurationsDeleteResponse - > - >; - /** - * Delete the metrics configuration of the provided cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - metricsConfigurationName: string, - options?: MetricsConfigurationsDeleteOptionalParams, - ): Promise; - /** - * Patch properties of metrics configuration for the provided cluster, or update the tags associated - * with it. Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - clusterName: string, - metricsConfigurationName: string, - options?: MetricsConfigurationsUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - MetricsConfigurationsUpdateResponse - > - >; - /** - * Patch properties of metrics configuration for the provided cluster, or update the tags associated - * with it. Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param metricsConfigurationName The name of the metrics configuration for the cluster. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - clusterName: string, - metricsConfigurationName: string, - options?: MetricsConfigurationsUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/operations.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/operations.ts deleted file mode 100644 index 6b6c8a5ef607..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/operations.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { Operation, OperationsListOptionalParams } from "../models/index.js"; - -/// -/** Interface representing a Operations. */ -export interface Operations { - /** - * Get a list of all available resource provider operations. It contains a URL link to get the next set - * of results. - * @param options The options parameters. - */ - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/rackSkus.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/rackSkus.ts deleted file mode 100644 index 2c7dd4ff0760..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/rackSkus.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - RackSku, - RackSkusListBySubscriptionOptionalParams, - RackSkusGetOptionalParams, - RackSkusGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a RackSkus. */ -export interface RackSkus { - /** - * Get a list of rack SKUs in the provided subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: RackSkusListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get the properties of the provided rack SKU. - * @param rackSkuName The name of the rack SKU. - * @param options The options parameters. - */ - get(rackSkuName: string, options?: RackSkusGetOptionalParams): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/racks.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/racks.ts deleted file mode 100644 index 74b1ca5fedeb..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/racks.ts +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - Rack, - RacksListBySubscriptionOptionalParams, - RacksListByResourceGroupOptionalParams, - RacksGetOptionalParams, - RacksGetResponse, - RacksCreateOrUpdateOptionalParams, - RacksCreateOrUpdateResponse, - RacksDeleteOptionalParams, - RacksDeleteResponse, - RacksUpdateOptionalParams, - RacksUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a Racks. */ -export interface Racks { - /** - * Get a list of racks in the provided subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: RacksListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a list of racks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: RacksListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get properties of the provided rack. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - rackName: string, - options?: RacksGetOptionalParams, - ): Promise; - /** - * Create a new rack or update properties of the existing one. All customer initiated requests will be - * rejected as the life cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param rackParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - rackName: string, - rackParameters: Rack, - options?: RacksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, RacksCreateOrUpdateResponse> - >; - /** - * Create a new rack or update properties of the existing one. All customer initiated requests will be - * rejected as the life cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param rackParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - rackName: string, - rackParameters: Rack, - options?: RacksCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this - * resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - rackName: string, - options?: RacksDeleteOptionalParams, - ): Promise, RacksDeleteResponse>>; - /** - * Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this - * resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - rackName: string, - options?: RacksDeleteOptionalParams, - ): Promise; - /** - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and - * tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - rackName: string, - options?: RacksUpdateOptionalParams, - ): Promise, RacksUpdateResponse>>; - /** - * Patch properties of the provided rack, or update the tags associated with the rack. Properties and - * tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param rackName The name of the rack. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - rackName: string, - options?: RacksUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/storageAppliances.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/storageAppliances.ts deleted file mode 100644 index a270ea7ba043..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/storageAppliances.ts +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - StorageAppliance, - StorageAppliancesListBySubscriptionOptionalParams, - StorageAppliancesListByResourceGroupOptionalParams, - StorageAppliancesGetOptionalParams, - StorageAppliancesGetResponse, - StorageAppliancesCreateOrUpdateOptionalParams, - StorageAppliancesCreateOrUpdateResponse, - StorageAppliancesDeleteOptionalParams, - StorageAppliancesDeleteResponse, - StorageAppliancesUpdateOptionalParams, - StorageAppliancesUpdateResponse, - StorageAppliancesDisableRemoteVendorManagementOptionalParams, - StorageAppliancesDisableRemoteVendorManagementResponse, - StorageAppliancesEnableRemoteVendorManagementOptionalParams, - StorageAppliancesEnableRemoteVendorManagementResponse, - StorageApplianceRunReadCommandsParameters, - StorageAppliancesRunReadCommandsOptionalParams, - StorageAppliancesRunReadCommandsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a StorageAppliances. */ -export interface StorageAppliances { - /** - * Get a list of storage appliances in the provided subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: StorageAppliancesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a list of storage appliances in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: StorageAppliancesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get properties of the provided storage appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesGetOptionalParams, - ): Promise; - /** - * Create a new storage appliance or update the properties of the existing one. All customer initiated - * requests will be rejected as the life cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - storageApplianceName: string, - storageApplianceParameters: StorageAppliance, - options?: StorageAppliancesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - StorageAppliancesCreateOrUpdateResponse - > - >; - /** - * Create a new storage appliance or update the properties of the existing one. All customer initiated - * requests will be rejected as the life cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - storageApplianceName: string, - storageApplianceParameters: StorageAppliance, - options?: StorageAppliancesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided storage appliance. All customer initiated requests will be rejected as the life - * cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - StorageAppliancesDeleteResponse - > - >; - /** - * Delete the provided storage appliance. All customer initiated requests will be rejected as the life - * cycle of this resource is managed by the system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesDeleteOptionalParams, - ): Promise; - /** - * Update properties of the provided storage appliance, or update tags associated with the storage - * appliance Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - StorageAppliancesUpdateResponse - > - >; - /** - * Update properties of the provided storage appliance, or update tags associated with the storage - * appliance Properties and tag updates can be done independently. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesUpdateOptionalParams, - ): Promise; - /** - * Disable remote vendor management of the provided storage appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - beginDisableRemoteVendorManagement( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - StorageAppliancesDisableRemoteVendorManagementResponse - > - >; - /** - * Disable remote vendor management of the provided storage appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - beginDisableRemoteVendorManagementAndWait( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesDisableRemoteVendorManagementOptionalParams, - ): Promise; - /** - * Enable remote vendor management of the provided storage appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - beginEnableRemoteVendorManagement( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - StorageAppliancesEnableRemoteVendorManagementResponse - > - >; - /** - * Enable remote vendor management of the provided storage appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param options The options parameters. - */ - beginEnableRemoteVendorManagementAndWait( - resourceGroupName: string, - storageApplianceName: string, - options?: StorageAppliancesEnableRemoteVendorManagementOptionalParams, - ): Promise; - /** - * Run one or more read-only commands on the provided storage appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceRunReadCommandsParameters The request body. - * @param options The options parameters. - */ - beginRunReadCommands( - resourceGroupName: string, - storageApplianceName: string, - storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, - options?: StorageAppliancesRunReadCommandsOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - StorageAppliancesRunReadCommandsResponse - > - >; - /** - * Run one or more read-only commands on the provided storage appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageApplianceName The name of the storage appliance. - * @param storageApplianceRunReadCommandsParameters The request body. - * @param options The options parameters. - */ - beginRunReadCommandsAndWait( - resourceGroupName: string, - storageApplianceName: string, - storageApplianceRunReadCommandsParameters: StorageApplianceRunReadCommandsParameters, - options?: StorageAppliancesRunReadCommandsOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/trunkedNetworks.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/trunkedNetworks.ts deleted file mode 100644 index 0b150c6ffd8d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/trunkedNetworks.ts +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - TrunkedNetwork, - TrunkedNetworksListBySubscriptionOptionalParams, - TrunkedNetworksListByResourceGroupOptionalParams, - TrunkedNetworksGetOptionalParams, - TrunkedNetworksGetResponse, - TrunkedNetworksCreateOrUpdateOptionalParams, - TrunkedNetworksCreateOrUpdateResponse, - TrunkedNetworksDeleteOptionalParams, - TrunkedNetworksDeleteResponse, - TrunkedNetworksUpdateOptionalParams, - TrunkedNetworksUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a TrunkedNetworks. */ -export interface TrunkedNetworks { - /** - * Get a list of trunked networks in the provided subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: TrunkedNetworksListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a list of trunked networks in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: TrunkedNetworksListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get properties of the provided trunked network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - trunkedNetworkName: string, - options?: TrunkedNetworksGetOptionalParams, - ): Promise; - /** - * Create a new trunked network or update the properties of the existing trunked network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param trunkedNetworkParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - trunkedNetworkName: string, - trunkedNetworkParameters: TrunkedNetwork, - options?: TrunkedNetworksCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - TrunkedNetworksCreateOrUpdateResponse - > - >; - /** - * Create a new trunked network or update the properties of the existing trunked network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param trunkedNetworkParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - trunkedNetworkName: string, - trunkedNetworkParameters: TrunkedNetwork, - options?: TrunkedNetworksCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided trunked network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - trunkedNetworkName: string, - options?: TrunkedNetworksDeleteOptionalParams, - ): Promise< - SimplePollerLike, TrunkedNetworksDeleteResponse> - >; - /** - * Delete the provided trunked network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - trunkedNetworkName: string, - options?: TrunkedNetworksDeleteOptionalParams, - ): Promise; - /** - * Update tags associated with the provided trunked network. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param trunkedNetworkName The name of the trunked network. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - trunkedNetworkName: string, - options?: TrunkedNetworksUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/virtualMachines.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/virtualMachines.ts deleted file mode 100644 index 2d8e877c05b5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/virtualMachines.ts +++ /dev/null @@ -1,272 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - VirtualMachine, - VirtualMachinesListBySubscriptionOptionalParams, - VirtualMachinesListByResourceGroupOptionalParams, - VirtualMachinesGetOptionalParams, - VirtualMachinesGetResponse, - VirtualMachinesCreateOrUpdateOptionalParams, - VirtualMachinesCreateOrUpdateResponse, - VirtualMachinesDeleteOptionalParams, - VirtualMachinesDeleteResponse, - VirtualMachinesUpdateOptionalParams, - VirtualMachinesUpdateResponse, - VirtualMachinesAssignRelayOptionalParams, - VirtualMachinesAssignRelayResponse, - VirtualMachinesPowerOffOptionalParams, - VirtualMachinesPowerOffResponse, - VirtualMachinesReimageOptionalParams, - VirtualMachinesReimageResponse, - VirtualMachinesRestartOptionalParams, - VirtualMachinesRestartResponse, - VirtualMachinesStartOptionalParams, - VirtualMachinesStartResponse, -} from "../models/index.js"; - -/// -/** Interface representing a VirtualMachines. */ -export interface VirtualMachines { - /** - * Get a list of virtual machines in the provided subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: VirtualMachinesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a list of virtual machines in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VirtualMachinesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get properties of the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesGetOptionalParams, - ): Promise; - /** - * Create a new virtual machine or update the properties of the existing virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - virtualMachineName: string, - virtualMachineParameters: VirtualMachine, - options?: VirtualMachinesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachinesCreateOrUpdateResponse - > - >; - /** - * Create a new virtual machine or update the properties of the existing virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param virtualMachineParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - virtualMachineParameters: VirtualMachine, - options?: VirtualMachinesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams, - ): Promise< - SimplePollerLike, VirtualMachinesDeleteResponse> - >; - /** - * Delete the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesDeleteOptionalParams, - ): Promise; - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesUpdateOptionalParams, - ): Promise< - SimplePollerLike, VirtualMachinesUpdateResponse> - >; - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesUpdateOptionalParams, - ): Promise; - /** - * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided - * virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - beginAssignRelay( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesAssignRelayOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachinesAssignRelayResponse - > - >; - /** - * Assigns a relay to the specified Microsoft.HybridCompute machine associated with the provided - * virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - beginAssignRelayAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesAssignRelayOptionalParams, - ): Promise; - /** - * Power off the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - beginPowerOff( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesPowerOffOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - VirtualMachinesPowerOffResponse - > - >; - /** - * Power off the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - beginPowerOffAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesPowerOffOptionalParams, - ): Promise; - /** - * Reimage the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - beginReimage( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesReimageOptionalParams, - ): Promise< - SimplePollerLike, VirtualMachinesReimageResponse> - >; - /** - * Reimage the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - beginReimageAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesReimageOptionalParams, - ): Promise; - /** - * Restart the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - beginRestart( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams, - ): Promise< - SimplePollerLike, VirtualMachinesRestartResponse> - >; - /** - * Restart the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - beginRestartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesRestartOptionalParams, - ): Promise; - /** - * Start the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - beginStart( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams, - ): Promise< - SimplePollerLike, VirtualMachinesStartResponse> - >; - /** - * Start the provided virtual machine. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineName The name of the virtual machine. - * @param options The options parameters. - */ - beginStartAndWait( - resourceGroupName: string, - virtualMachineName: string, - options?: VirtualMachinesStartOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/volumes.ts b/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/volumes.ts deleted file mode 100644 index f19b06272499..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/operationsInterfaces/volumes.ts +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { SimplePollerLike, OperationState } from "@azure/core-lro"; -import type { - Volume, - VolumesListBySubscriptionOptionalParams, - VolumesListByResourceGroupOptionalParams, - VolumesGetOptionalParams, - VolumesGetResponse, - VolumesCreateOrUpdateOptionalParams, - VolumesCreateOrUpdateResponse, - VolumesDeleteOptionalParams, - VolumesDeleteResponse, - VolumesUpdateOptionalParams, - VolumesUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a Volumes. */ -export interface Volumes { - /** - * Get a list of volumes in the provided subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: VolumesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a list of volumes in the provided resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: VolumesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get properties of the provided volume. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - volumeName: string, - options?: VolumesGetOptionalParams, - ): Promise; - /** - * Create a new volume or update the properties of the existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param volumeParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - volumeName: string, - volumeParameters: Volume, - options?: VolumesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike, VolumesCreateOrUpdateResponse> - >; - /** - * Create a new volume or update the properties of the existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param volumeParameters The request body. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - volumeName: string, - volumeParameters: Volume, - options?: VolumesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete the provided volume. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - volumeName: string, - options?: VolumesDeleteOptionalParams, - ): Promise, VolumesDeleteResponse>>; - /** - * Delete the provided volume. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - volumeName: string, - options?: VolumesDeleteOptionalParams, - ): Promise; - /** - * Update tags associated with the provided volume. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param volumeName The name of the volume. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - volumeName: string, - options?: VolumesUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/networkcloud/arm-networkcloud/src/pagingHelper.ts b/sdk/networkcloud/arm-networkcloud/src/pagingHelper.ts deleted file mode 100644 index f64c4c8390ed..000000000000 --- a/sdk/networkcloud/arm-networkcloud/src/pagingHelper.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -export interface PageInfo { - continuationToken?: string; -} - -const pageMap = new WeakMap(); - -/** - * Given the last `.value` produced by the `byPage` iterator, - * returns a continuation token that can be used to begin paging from - * that point later. - * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. - * @returns The continuation token that can be passed into byPage() during future calls. - */ -export function getContinuationToken(page: unknown): string | undefined { - if (typeof page !== "object" || page === null) { - return undefined; - } - return pageMap.get(page)?.continuationToken; -} - -export function setContinuationToken(page: unknown, continuationToken: string | undefined): void { - if (typeof page !== "object" || page === null || !continuationToken) { - return; - } - const pageInfo = pageMap.get(page) ?? {}; - pageInfo.continuationToken = continuationToken; - pageMap.set(page, pageInfo); -} diff --git a/sdk/networkcloud/arm-networkcloud/src/restorePollerHelpers.ts b/sdk/networkcloud/arm-networkcloud/src/restorePollerHelpers.ts new file mode 100644 index 000000000000..3d826198de72 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/restorePollerHelpers.ts @@ -0,0 +1,516 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { NetworkCloud } from "./networkCloud.js"; +import { + _$deleteDeserialize, + _updateDeserialize, + _createOrUpdateDeserialize, +} from "./api/metricsConfigurations/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeConsoles, + _updateDeserialize as _updateDeserializeConsoles, + _createOrUpdateDeserialize as _createOrUpdateDeserializeConsoles, +} from "./api/consoles/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeKubernetesClusterFeatures, + _updateDeserialize as _updateDeserializeKubernetesClusterFeatures, + _createOrUpdateDeserialize as _createOrUpdateDeserializeKubernetesClusterFeatures, +} from "./api/kubernetesClusterFeatures/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeAgentPools, + _updateDeserialize as _updateDeserializeAgentPools, + _createOrUpdateDeserialize as _createOrUpdateDeserializeAgentPools, +} from "./api/agentPools/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeBmcKeySets, + _updateDeserialize as _updateDeserializeBmcKeySets, + _createOrUpdateDeserialize as _createOrUpdateDeserializeBmcKeySets, +} from "./api/bmcKeySets/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeBareMetalMachineKeySets, + _updateDeserialize as _updateDeserializeBareMetalMachineKeySets, + _createOrUpdateDeserialize as _createOrUpdateDeserializeBareMetalMachineKeySets, +} from "./api/bareMetalMachineKeySets/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeVolumes, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVolumes, +} from "./api/volumes/operations.js"; +import { + _startDeserialize, + _restartDeserialize, + _reimageDeserialize, + _powerOffDeserialize, + _assignRelayDeserialize, + _$deleteDeserialize as _$deleteDeserializeVirtualMachines, + _updateDeserialize as _updateDeserializeVirtualMachines, + _createOrUpdateDeserialize as _createOrUpdateDeserializeVirtualMachines, +} from "./api/virtualMachines/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeTrunkedNetworks, + _createOrUpdateDeserialize as _createOrUpdateDeserializeTrunkedNetworks, +} from "./api/trunkedNetworks/operations.js"; +import { + _runReadCommandsDeserialize, + _enableRemoteVendorManagementDeserialize, + _disableRemoteVendorManagementDeserialize, + _$deleteDeserialize as _$deleteDeserializeStorageAppliances, + _updateDeserialize as _updateDeserializeStorageAppliances, + _createOrUpdateDeserialize as _createOrUpdateDeserializeStorageAppliances, +} from "./api/storageAppliances/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeRacks, + _updateDeserialize as _updateDeserializeRacks, + _createOrUpdateDeserialize as _createOrUpdateDeserializeRacks, +} from "./api/racks/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeL3Networks, + _createOrUpdateDeserialize as _createOrUpdateDeserializeL3Networks, +} from "./api/l3Networks/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeL2Networks, + _createOrUpdateDeserialize as _createOrUpdateDeserializeL2Networks, +} from "./api/l2Networks/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeKubernetesVersions, + _updateDeserialize as _updateDeserializeKubernetesVersions, + _createOrUpdateDeserialize as _createOrUpdateDeserializeKubernetesVersions, +} from "./api/kubernetesVersions/operations.js"; +import { + _restartNodeDeserialize, + _$deleteDeserialize as _$deleteDeserializeKubernetesClusters, + _updateDeserialize as _updateDeserializeKubernetesClusters, + _createOrUpdateDeserialize as _createOrUpdateDeserializeKubernetesClusters, +} from "./api/kubernetesClusters/operations.js"; +import { + _updateVersionDeserialize, + _scanRuntimeDeserialize, + _rotateCredentialDeserialize, + _inspectDeserialize, + _deployDeserialize, + _continueUpdateVersionDeserialize, + _$deleteDeserialize as _$deleteDeserializeClusters, + _updateDeserialize as _updateDeserializeClusters, + _createOrUpdateDeserialize as _createOrUpdateDeserializeClusters, +} from "./api/clusters/operations.js"; +import { + _updateRelayPrivateEndpointConnectionDeserialize, + _$deleteDeserialize as _$deleteDeserializeClusterManagers, + _createOrUpdateDeserialize as _createOrUpdateDeserializeClusterManagers, +} from "./api/clusterManagers/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeCloudServicesNetworks, + _updateDeserialize as _updateDeserializeCloudServicesNetworks, + _createOrUpdateDeserialize as _createOrUpdateDeserializeCloudServicesNetworks, +} from "./api/cloudServicesNetworks/operations.js"; +import { + _uncordonDeserialize, + _startDeserialize as _startDeserializeBareMetalMachines, + _runReadCommandsDeserialize as _runReadCommandsDeserializeBareMetalMachines, + _runDataExtractsRestrictedDeserialize, + _runDataExtractsDeserialize, + _runCommandDeserialize, + _restartDeserialize as _restartDeserializeBareMetalMachines, + _replaceDeserialize, + _reimageDeserialize as _reimageDeserializeBareMetalMachines, + _powerOffDeserialize as _powerOffDeserializeBareMetalMachines, + _cordonDeserialize, + _$deleteDeserialize as _$deleteDeserializeBareMetalMachines, + _updateDeserialize as _updateDeserializeBareMetalMachines, + _createOrUpdateDeserialize as _createOrUpdateDeserializeBareMetalMachines, +} from "./api/bareMetalMachines/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeAccessBridges, + _updateDeserialize as _updateDeserializeAccessBridges, + _createOrUpdateDeserialize as _createOrUpdateDeserializeAccessBridges, +} from "./api/accessBridges/operations.js"; +import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js"; +import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; +import { + PollerLike, + OperationState, + deserializeState, + ResourceLocationConfig, +} from "@azure/core-lro"; + +export interface RestorePollerOptions< + TResult, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +> extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** Deserialization function for raw response body */ + processResponseBody?: (result: TResponse) => Promise; +} + +/** + * Creates a poller from the serialized state of another poller. This can be + * useful when you want to create pollers on a different host or a poller + * needs to be constructed after the original one is not in scope. + */ +export function restorePoller( + client: NetworkCloud, + serializedState: string, + sourceOperation: (...args: any[]) => PollerLike, TResult>, + options?: RestorePollerOptions, +): PollerLike, TResult> { + const pollerConfig = deserializeState(serializedState).config; + const { initialRequestUrl, requestMethod, metadata } = pollerConfig; + if (!initialRequestUrl || !requestMethod) { + throw new Error( + `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`, + ); + } + const resourceLocationConfig = metadata?.["resourceLocationConfig"] as + | ResourceLocationConfig + | undefined; + const { deserializer, expectedStatuses = [] } = + getDeserializationHelper(initialRequestUrl, requestMethod) ?? {}; + const deserializeHelper = options?.processResponseBody ?? deserializer; + if (!deserializeHelper) { + throw new Error( + `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`, + ); + } + const apiVersion = getApiVersionFromUrl(initialRequestUrl); + return getLongRunningPoller( + (client as any)["_client"] ?? client, + deserializeHelper as (result: TResponse) => Promise, + expectedStatuses, + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + resourceLocationConfig, + restoreFrom: serializedState, + initialRequestUrl, + apiVersion, + }, + ); +} + +interface DeserializationHelper { + deserializer: (result: PathUncheckedResponse) => Promise; + expectedStatuses: string[]; +} + +const deserializeMap: Record = { + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}": + { deserializer: _$deleteDeserialize, expectedStatuses: ["202", "204", "200"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}": + { deserializer: _updateDeserialize, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/metricsConfigurations/{metricsConfigurationName}": + { deserializer: _createOrUpdateDeserialize, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}": + { deserializer: _$deleteDeserializeConsoles, expectedStatuses: ["202", "204", "200"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}": + { deserializer: _updateDeserializeConsoles, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}": + { deserializer: _createOrUpdateDeserializeConsoles, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}": + { + deserializer: _$deleteDeserializeKubernetesClusterFeatures, + expectedStatuses: ["202", "204", "200"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}": + { + deserializer: _updateDeserializeKubernetesClusterFeatures, + expectedStatuses: ["200", "202", "201"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/features/{featureName}": + { + deserializer: _createOrUpdateDeserializeKubernetesClusterFeatures, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}": + { deserializer: _$deleteDeserializeAgentPools, expectedStatuses: ["202", "204", "200"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}": + { deserializer: _updateDeserializeAgentPools, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}": + { deserializer: _createOrUpdateDeserializeAgentPools, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}": + { deserializer: _$deleteDeserializeBmcKeySets, expectedStatuses: ["202", "204", "200"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}": + { deserializer: _updateDeserializeBmcKeySets, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bmcKeySets/{bmcKeySetName}": + { deserializer: _createOrUpdateDeserializeBmcKeySets, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}": + { + deserializer: _$deleteDeserializeBareMetalMachineKeySets, + expectedStatuses: ["202", "204", "200"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}": + { + deserializer: _updateDeserializeBareMetalMachineKeySets, + expectedStatuses: ["200", "202", "201"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/bareMetalMachineKeySets/{bareMetalMachineKeySetName}": + { + deserializer: _createOrUpdateDeserializeBareMetalMachineKeySets, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}": + { deserializer: _$deleteDeserializeVolumes, expectedStatuses: ["202", "204", "200"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/volumes/{volumeName}": + { deserializer: _createOrUpdateDeserializeVolumes, expectedStatuses: ["200", "201", "202"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/start": + { deserializer: _startDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/restart": + { deserializer: _restartDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/reimage": + { deserializer: _reimageDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/powerOff": + { deserializer: _powerOffDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/assignRelay": + { deserializer: _assignRelayDeserialize, expectedStatuses: ["202", "200", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}": + { deserializer: _$deleteDeserializeVirtualMachines, expectedStatuses: ["202", "204", "200"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}": + { deserializer: _updateDeserializeVirtualMachines, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}": + { + deserializer: _createOrUpdateDeserializeVirtualMachines, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}": + { deserializer: _$deleteDeserializeTrunkedNetworks, expectedStatuses: ["202", "204", "200"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/trunkedNetworks/{trunkedNetworkName}": + { + deserializer: _createOrUpdateDeserializeTrunkedNetworks, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/runReadCommands": + { deserializer: _runReadCommandsDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/enableRemoteVendorManagement": + { + deserializer: _enableRemoteVendorManagementDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}/disableRemoteVendorManagement": + { + deserializer: _disableRemoteVendorManagementDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}": + { deserializer: _$deleteDeserializeStorageAppliances, expectedStatuses: ["202", "204", "200"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}": + { deserializer: _updateDeserializeStorageAppliances, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/storageAppliances/{storageApplianceName}": + { + deserializer: _createOrUpdateDeserializeStorageAppliances, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}": + { deserializer: _$deleteDeserializeRacks, expectedStatuses: ["202", "204", "200"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}": + { deserializer: _updateDeserializeRacks, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/racks/{rackName}": + { deserializer: _createOrUpdateDeserializeRacks, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}": + { deserializer: _$deleteDeserializeL3Networks, expectedStatuses: ["202", "204", "200"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l3Networks/{l3NetworkName}": + { deserializer: _createOrUpdateDeserializeL3Networks, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}": + { deserializer: _$deleteDeserializeL2Networks, expectedStatuses: ["202", "204", "200"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/l2Networks/{l2NetworkName}": + { deserializer: _createOrUpdateDeserializeL2Networks, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}": + { + deserializer: _$deleteDeserializeKubernetesVersions, + expectedStatuses: ["202", "204", "200"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}": + { deserializer: _updateDeserializeKubernetesVersions, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesVersions/{kubernetesVersionName}": + { + deserializer: _createOrUpdateDeserializeKubernetesVersions, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/restartNode": + { deserializer: _restartNodeDeserialize, expectedStatuses: ["202", "200", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}": + { + deserializer: _$deleteDeserializeKubernetesClusters, + expectedStatuses: ["202", "204", "200"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}": + { deserializer: _updateDeserializeKubernetesClusters, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}": + { + deserializer: _createOrUpdateDeserializeKubernetesClusters, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/updateVersion": + { deserializer: _updateVersionDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/scanRuntime": + { deserializer: _scanRuntimeDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/rotateCredential": + { deserializer: _rotateCredentialDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/inspect": + { deserializer: _inspectDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/deploy": + { deserializer: _deployDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}/continueUpdateVersion": + { deserializer: _continueUpdateVersionDeserialize, expectedStatuses: ["202", "200", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}": + { deserializer: _$deleteDeserializeClusters, expectedStatuses: ["202", "204", "200"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}": + { deserializer: _updateDeserializeClusters, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusters/{clusterName}": + { deserializer: _createOrUpdateDeserializeClusters, expectedStatuses: ["200", "201", "202"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}/updateRelayPrivateEndpointConnection": + { + deserializer: _updateRelayPrivateEndpointConnectionDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}": + { deserializer: _$deleteDeserializeClusterManagers, expectedStatuses: ["202", "204", "200"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/clusterManagers/{clusterManagerName}": + { + deserializer: _createOrUpdateDeserializeClusterManagers, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}": + { + deserializer: _$deleteDeserializeCloudServicesNetworks, + expectedStatuses: ["202", "204", "200"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}": + { + deserializer: _updateDeserializeCloudServicesNetworks, + expectedStatuses: ["200", "202", "201"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/cloudServicesNetworks/{cloudServicesNetworkName}": + { + deserializer: _createOrUpdateDeserializeCloudServicesNetworks, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/uncordon": + { deserializer: _uncordonDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/start": + { deserializer: _startDeserializeBareMetalMachines, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runReadCommands": + { + deserializer: _runReadCommandsDeserializeBareMetalMachines, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runDataExtractsRestricted": + { + deserializer: _runDataExtractsRestrictedDeserialize, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runDataExtracts": + { deserializer: _runDataExtractsDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/runCommand": + { deserializer: _runCommandDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/restart": + { deserializer: _restartDeserializeBareMetalMachines, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/replace": + { deserializer: _replaceDeserialize, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/reimage": + { deserializer: _reimageDeserializeBareMetalMachines, expectedStatuses: ["202", "200", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/powerOff": + { + deserializer: _powerOffDeserializeBareMetalMachines, + expectedStatuses: ["202", "200", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}/cordon": + { deserializer: _cordonDeserialize, expectedStatuses: ["202", "200", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}": + { deserializer: _$deleteDeserializeBareMetalMachines, expectedStatuses: ["202", "204", "200"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}": + { deserializer: _updateDeserializeBareMetalMachines, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/bareMetalMachines/{bareMetalMachineName}": + { + deserializer: _createOrUpdateDeserializeBareMetalMachines, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}": + { deserializer: _$deleteDeserializeAccessBridges, expectedStatuses: ["202", "204", "200"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}": + { deserializer: _updateDeserializeAccessBridges, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/accessBridges/{accessBridgeName}": + { + deserializer: _createOrUpdateDeserializeAccessBridges, + expectedStatuses: ["200", "201", "202"], + }, +}; + +function getDeserializationHelper( + urlStr: string, + method: string, +): DeserializationHelper | undefined { + const path = new URL(urlStr).pathname; + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: DeserializationHelper | undefined; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(deserializeMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} + +function getApiVersionFromUrl(urlStr: string): string | undefined { + const url = new URL(urlStr); + return url.searchParams.get("api-version") ?? undefined; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/static-helpers/cloudSettingHelpers.ts b/sdk/networkcloud/arm-networkcloud/src/static-helpers/cloudSettingHelpers.ts new file mode 100644 index 000000000000..613112c6e397 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/static-helpers/cloudSettingHelpers.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * An enum to describe Azure Cloud environments. + * @enum {string} + */ +export enum AzureClouds { + /** Azure public cloud, which is the default cloud for Azure SDKs. */ + AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD", + /** Azure China cloud */ + AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD", + /** Azure US government cloud */ + AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT", +} + +/** The supported values for cloud setting as a string literal type */ +export type AzureSupportedClouds = `${AzureClouds}`; + +/** + * Gets the Azure Resource Manager endpoint URL for the specified cloud setting. + * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values. + * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined. + * @throws {Error} Throws an error if an unknown cloud setting is provided. + */ +export function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined { + if (cloudSetting === undefined) { + return undefined; + } + const cloudEndpoints: Record = { + AZURE_CHINA_CLOUD: "https://management.chinacloudapi.cn/", + AZURE_US_GOVERNMENT: "https://management.usgovcloudapi.net/", + AZURE_PUBLIC_CLOUD: "https://management.azure.com/", + }; + if (cloudSetting in cloudEndpoints) { + return cloudEndpoints[cloudSetting]; + } else { + throw new Error( + `Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`, + ); + } +} diff --git a/sdk/networkcloud/arm-networkcloud/src/static-helpers/pagingHelpers.ts b/sdk/networkcloud/arm-networkcloud/src/static-helpers/pagingHelpers.ts new file mode 100644 index 000000000000..8412742a9685 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/static-helpers/pagingHelpers.ts @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import { RestError } from "@azure/core-rest-pipeline"; + +/** + * Options for the byPage method + */ +export interface PageSettings { + /** + * A reference to a specific page to start iterating from. + */ + continuationToken?: string; +} + +/** + * An interface that describes a page of results. + */ +export type ContinuablePage = TPage & { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +}; + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; +} + +/** + * An interface that describes how to communicate with the service. + */ +export interface PagedResult< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * Link to the first page of results. + */ + firstPageLink?: string; + /** + * A method that returns a page of results. + */ + getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator>; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => TElement[]; +} + +/** + * Options for the paging helper + */ +export interface BuildPagedAsyncIteratorOptions { + itemName?: string; + nextLinkName?: string; + nextLinkMethod?: "GET" | "POST"; + apiVersion?: string; +} + +/** + * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator + */ +export function buildPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +>( + client: Client, + getInitialResponse: () => PromiseLike, + processResponseBody: (result: TResponse) => PromiseLike, + expectedStatuses: string[], + options: BuildPagedAsyncIteratorOptions = {}, +): PagedAsyncIterableIterator { + const itemName = options.itemName ?? "value"; + const nextLinkName = options.nextLinkName ?? "nextLink"; + const nextLinkMethod = options.nextLinkMethod ?? "GET"; + const apiVersion = options.apiVersion; + const pagedResult: PagedResult = { + getPage: async (pageLink?: string) => { + let result; + if (pageLink === undefined) { + result = await getInitialResponse(); + } else { + const resolvedPageLink = apiVersion ? addApiVersionToUrl(pageLink, apiVersion) : pageLink; + result = + nextLinkMethod === "POST" + ? await client.pathUnchecked(resolvedPageLink).post() + : await client.pathUnchecked(resolvedPageLink).get(); + } + checkPagingRequest(result, expectedStatuses); + const results = await processResponseBody(result as TResponse); + const nextLink = getNextLink(results, nextLinkName); + const values = getElements(results, itemName) as TPage; + return { + page: values, + nextPageLink: nextLink, + }; + }, + byPage: (settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }, + }; + return getPagedAsyncIterator(pagedResult); +} + +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ + +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + ((settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + for await (const page of pages) { + yield* page as unknown as TElement[]; + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: string; + } = {}, +): AsyncIterableIterator> { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + let result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + } +} + +/** + * Gets for the value of nextLink in the body + */ +function getNextLink(body: unknown, nextLinkName?: string): string | undefined { + if (!nextLinkName) { + return undefined; + } + + const nextLink = (body as Record)[nextLinkName]; + + if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) { + throw new RestError( + `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`, + ); + } + + if (nextLink === null) { + return undefined; + } + + return nextLink; +} + +/** + * Gets the elements of the current request in the body. + */ +function getElements(body: unknown, itemName: string): T[] { + const value = (body as Record)[itemName] as T[]; + if (!Array.isArray(value)) { + throw new RestError( + `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`, + ); + } + + return value ?? []; +} + +/** + * Checks if a request failed + */ +function checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void { + if (!expectedStatuses.includes(response.status)) { + throw createRestError( + `Pagination failed with unexpected statusCode ${response.status}`, + response, + ); + } +} + +/** + * Adds the api-version query parameter on a URL if it's not present. + * @param url - the URL to modify + * @param apiVersion - the API version to set + * @returns - the URL with the api-version query parameter set + */ +function addApiVersionToUrl(url: string, apiVersion: string): string { + // The base URL is only used for parsing and won't appear in the returned URL + const urlObj = new URL(url, "https://microsoft.com"); + if (!urlObj.searchParams.get("api-version")) { + // Append one if there is no apiVersion + return `${url}${ + Array.from(urlObj.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + return url; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/static-helpers/pollingHelpers.ts b/sdk/networkcloud/arm-networkcloud/src/static-helpers/pollingHelpers.ts new file mode 100644 index 000000000000..b1bb018377f6 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/static-helpers/pollingHelpers.ts @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + PollerLike, + OperationState, + ResourceLocationConfig, + RunningOperation, + createHttpPoller, + OperationResponse, +} from "@azure/core-lro"; + +import { Client, PathUncheckedResponse, createRestError } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; + +export interface GetLongRunningPollerOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * The potential location of the result of the LRO if specified by the LRO extension in the swagger. + */ + resourceLocationConfig?: ResourceLocationConfig; + /** + * The original url of the LRO + * Should not be null when restoreFrom is set + */ + initialRequestUrl?: string; + /** + * A serialized poller which can be used to resume an existing paused Long-Running-Operation. + */ + restoreFrom?: string; + /** + * The function to get the initial response + */ + getInitialResponse?: () => PromiseLike; + /** + * The api-version of the LRO + */ + apiVersion?: string; +} +export function getLongRunningPoller( + client: Client, + processResponseBody: (result: TResponse) => Promise, + expectedStatuses: string[], + options: GetLongRunningPollerOptions, +): PollerLike, TResult> { + const { restoreFrom, getInitialResponse, apiVersion } = options; + if (!restoreFrom && !getInitialResponse) { + throw new Error("Either restoreFrom or getInitialResponse must be specified"); + } + let initialResponse: TResponse | undefined = undefined; + const pollAbortController = new AbortController(); + const poller: RunningOperation = { + sendInitialRequest: async () => { + if (!getInitialResponse) { + throw new Error("getInitialResponse is required when initializing a new poller"); + } + initialResponse = await getInitialResponse(); + return getLroResponse(initialResponse, expectedStatuses); + }, + sendPollRequest: async ( + path: string, + pollOptions?: { + abortSignal?: AbortSignalLike; + }, + ) => { + // The poll request would both listen to the user provided abort signal and the poller's own abort signal + function abortListener(): void { + pollAbortController.abort(); + } + const abortSignal = pollAbortController.signal; + if (options.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (pollOptions?.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (!abortSignal.aborted) { + options.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + pollOptions?.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + } + let response; + try { + const pollingPath = apiVersion ? addApiVersionToUrl(path, apiVersion) : path; + response = await client.pathUnchecked(pollingPath).get({ abortSignal }); + } finally { + options.abortSignal?.removeEventListener("abort", abortListener); + pollOptions?.abortSignal?.removeEventListener("abort", abortListener); + } + + return getLroResponse(response as TResponse, expectedStatuses); + }, + }; + return createHttpPoller(poller, { + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: options?.resourceLocationConfig, + restoreFrom: options?.restoreFrom, + processResult: (result: unknown) => { + return processResponseBody(result as TResponse); + }, + }); +} +/** + * Converts a Rest Client response to a response that the LRO implementation understands + * @param response - a rest client http response + * @param deserializeFn - deserialize function to convert Rest response to modular output + * @returns - An LRO response that the LRO implementation understands + */ +function getLroResponse( + response: TResponse, + expectedStatuses: string[], +): OperationResponse { + if (!expectedStatuses.includes(response.status)) { + throw createRestError(response); + } + + return { + flatResponse: response, + rawResponse: { + ...response, + statusCode: Number.parseInt(response.status), + body: response.body, + }, + }; +} + +/** + * Adds the api-version query parameter on a URL if it's not present. + * @param url - the URL to modify + * @param apiVersion - the API version to set + * @returns - the URL with the api-version query parameter set + */ +function addApiVersionToUrl(url: string, apiVersion: string): string { + // The base URL is only used for parsing and won't appear in the returned URL + const urlObj = new URL(url, "https://microsoft.com"); + if (!urlObj.searchParams.get("api-version")) { + // Append one if there is no apiVersion + return `${url}${ + Array.from(urlObj.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + return url; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/static-helpers/serialization/check-prop-undefined.ts b/sdk/networkcloud/arm-networkcloud/src/static-helpers/serialization/check-prop-undefined.ts new file mode 100644 index 000000000000..50f78829e491 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/static-helpers/serialization/check-prop-undefined.ts @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Returns true if all specified properties of the item are undefined. + * @param item The object to check. + * @param properties The list of property names to check on the item. + * @returns True if all specified properties are undefined, otherwise false. + */ +export function areAllPropsUndefined(item: Record, properties: string[]): boolean { + for (const property of properties) { + if (item[property] !== undefined) { + return false; + } + } + return true; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/static-helpers/simplePollerHelpers.ts b/sdk/networkcloud/arm-networkcloud/src/static-helpers/simplePollerHelpers.ts new file mode 100644 index 000000000000..21c6d5eee895 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/static-helpers/simplePollerHelpers.ts @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PollerLike, OperationState, CancelOnProgress } from "@azure/core-lro"; +import { AbortSignalLike } from "@azure/abort-controller"; + +/** + * A simple poller that can be used to poll a long running operation. + */ +export interface SimplePollerLike, TResult> { + /** + * Returns true if the poller has finished polling. + */ + isDone(): boolean; + /** + * Returns the state of the operation. + */ + getOperationState(): TState; + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult(): TResult | undefined; + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + */ + poll(options?: { abortSignal?: AbortSignalLike }): Promise; + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise; + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback: (state: TState) => void): CancelOnProgress; + + /** + * Returns a promise that could be used for serialized version of the poller's operation + * by invoking the operation's serialize method. + */ + serialize(): Promise; + + /** + * Wait the poller to be submitted. + */ + submitted(): Promise; + + /** + * Returns a string representation of the poller's operation. Similar to serialize but returns a string. + * @deprecated Use serialize() instead. + */ + toString(): string; + + /** + * Stops the poller from continuing to poll. Please note this will only stop the client-side polling + * @deprecated Use abortSignal to stop polling instead. + */ + stopPolling(): void; + + /** + * Returns true if the poller is stopped. + * @deprecated Use abortSignal status to track this instead. + */ + isStopped(): boolean; +} + +/** + * Create the deprecated SimplePollerLike from PollerLike + * @param poller PollerLike to convert + * @returns SimplePollerLike + */ +export function getSimplePoller( + poller: PollerLike, TResult>, +): SimplePollerLike, TResult> { + const simplePoller: SimplePollerLike, TResult> = { + isDone() { + return poller.isDone; + }, + isStopped() { + throw new Error("isStopped is deprecated. Use abortSignal status to track this instead."); + }, + getOperationState() { + if (!poller.operationState) { + throw new Error( + "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().", + ); + } + return poller.operationState; + }, + getResult() { + return poller.result; + }, + toString() { + if (!poller.operationState) { + throw new Error( + "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().", + ); + } + return JSON.stringify({ + state: poller.operationState, + }); + }, + stopPolling() { + throw new Error("stopPolling is deprecated. Use abortSignal to stop polling instead."); + }, + onProgress: poller.onProgress, + poll: poller.poll, + pollUntilDone: poller.pollUntilDone, + serialize: poller.serialize, + submitted: poller.submitted, + }; + return simplePoller; +} diff --git a/sdk/networkcloud/arm-networkcloud/src/static-helpers/urlTemplate.ts b/sdk/networkcloud/arm-networkcloud/src/static-helpers/urlTemplate.ts new file mode 100644 index 000000000000..e8af8cd3ab73 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/src/static-helpers/urlTemplate.ts @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +// --------------------- +// interfaces +// --------------------- +interface ValueOptions { + isFirst: boolean; // is first value in the expression + op?: string; // operator + varValue?: any; // variable value + varName?: string; // variable name + modifier?: string; // modifier e.g * + reserved?: boolean; // if true we'll keep reserved words with not encoding +} + +export interface UrlTemplateOptions { + // if set to true, reserved characters will not be encoded + allowReserved?: boolean; +} + +// --------------------- +// helpers +// --------------------- +function encodeComponent(val: string, reserved?: boolean, op?: string): string { + return (reserved ?? op === "+") || op === "#" + ? encodeReservedComponent(val) + : encodeRFC3986URIComponent(val); +} + +function encodeReservedComponent(str: string): string { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map((part) => (!/%[0-9A-Fa-f]/.test(part) ? encodeURI(part) : part)) + .join(""); +} + +function encodeRFC3986URIComponent(str: string): string { + return encodeURIComponent(str).replace( + /[!'()*]/g, + (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, + ); +} + +function isDefined(val: any): boolean { + return val !== undefined && val !== null; +} + +function getNamedAndIfEmpty(op?: string): [boolean, string] { + return [!!op && [";", "?", "&"].includes(op), !!op && ["?", "&"].includes(op) ? "=" : ""]; +} + +function getFirstOrSep(op?: string, isFirst = false): string { + if (isFirst) { + return !op || op === "+" ? "" : op; + } else if (!op || op === "+" || op === "#") { + return ","; + } else if (op === "?") { + return "&"; + } else { + return op; + } +} + +function getExpandedValue(option: ValueOptions): string { + let isFirst = option.isFirst; + const { op, varName, varValue: value, reserved } = option; + const vals: string[] = []; + const [named, ifEmpty] = getNamedAndIfEmpty(op); + + if (Array.isArray(value)) { + for (const val of value.filter(isDefined)) { + // prepare the following parts: separator, varName, value + vals.push(`${getFirstOrSep(op, isFirst)}`); + if (named && varName) { + vals.push(`${encodeURIComponent(varName)}`); + if (val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } + } + vals.push(encodeComponent(val, reserved, op)); + isFirst = false; + } + } else if (typeof value === "object") { + for (const key of Object.keys(value)) { + const val = value[key]; + if (!isDefined(val)) { + continue; + } + // prepare the following parts: separator, key, value + vals.push(`${getFirstOrSep(op, isFirst)}`); + if (key) { + vals.push(`${encodeURIComponent(key)}`); + if (named && val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } + } + vals.push(encodeComponent(val, reserved, op)); + isFirst = false; + } + } + return vals.join(""); +} + +function getNonExpandedValue(option: ValueOptions): string | undefined { + const { op, varName, varValue: value, isFirst, reserved } = option; + const vals: string[] = []; + const first = getFirstOrSep(op, isFirst); + const [named, ifEmpty] = getNamedAndIfEmpty(op); + if (named && varName) { + vals.push(encodeComponent(varName, reserved, op)); + if (value === "") { + if (!ifEmpty) { + vals.push(ifEmpty); + } + return !vals.join("") ? undefined : `${first}${vals.join("")}`; + } + vals.push("="); + } + + const items = []; + if (Array.isArray(value)) { + for (const val of value.filter(isDefined)) { + items.push(encodeComponent(val, reserved, op)); + } + } else if (typeof value === "object") { + for (const key of Object.keys(value)) { + if (!isDefined(value[key])) { + continue; + } + items.push(encodeRFC3986URIComponent(key)); + items.push(encodeComponent(value[key], reserved, op)); + } + } + vals.push(items.join(",")); + return !vals.join(",") ? undefined : `${first}${vals.join("")}`; +} + +function getVarValue(option: ValueOptions): string | undefined { + const { op, varName, modifier, isFirst, reserved, varValue: value } = option; + + if (!isDefined(value)) { + return undefined; + } else if (["string", "number", "boolean"].includes(typeof value)) { + let val = value.toString(); + const [named, ifEmpty] = getNamedAndIfEmpty(op); + const vals: string[] = [getFirstOrSep(op, isFirst)]; + if (named && varName) { + // No need to encode varName considering it is already encoded + vals.push(varName); + if (val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } + } + if (modifier && modifier !== "*") { + val = val.substring(0, parseInt(modifier, 10)); + } + vals.push(encodeComponent(val, reserved, op)); + return vals.join(""); + } else if (modifier === "*") { + return getExpandedValue(option); + } else { + return getNonExpandedValue(option); + } +} + +// --------------------------------------------------------------------------------------------------- +// This is an implementation of RFC 6570 URI Template: https://datatracker.ietf.org/doc/html/rfc6570. +// --------------------------------------------------------------------------------------------------- +export function expandUrlTemplate( + template: string, + context: Record, + option?: UrlTemplateOptions, +): string { + const result = template.replace(/\{([^{}]+)\}|([^{}]+)/g, (_, expr, text) => { + if (!expr) { + return encodeReservedComponent(text); + } + let op; + if (["+", "#", ".", "/", ";", "?", "&"].includes(expr[0])) { + op = expr[0]; + expr = expr.slice(1); + } + const varList = expr.split(/,/g); + const innerResult = []; + for (const varSpec of varList) { + const varMatch = /([^:*]*)(?::(\d+)|(\*))?/.exec(varSpec); + if (!varMatch || !varMatch[1]) { + continue; + } + const varValue = getVarValue({ + isFirst: innerResult.length === 0, + op, + varValue: context[varMatch[1]], + varName: varMatch[1], + modifier: varMatch[2] || varMatch[3], + reserved: option?.allowReserved, + }); + if (varValue) { + innerResult.push(varValue); + } + } + return innerResult.join(""); + }); + + return normalizeUnreserved(result); +} + +/** + * Normalize an expanded URI by decoding percent-encoded unreserved characters. + * RFC 3986 unreserved: "-" / "." / "~" + */ +function normalizeUnreserved(uri: string): string { + return uri.replace(/%([0-9A-Fa-f]{2})/g, (match, hex) => { + const char = String.fromCharCode(parseInt(hex, 16)); + // Decode only if it's unreserved + if (/[.~-]/.test(char)) { + return char; + } + return match; // leave other encodings intact + }); +} diff --git a/sdk/networkcloud/arm-networkcloud/test/snippets.spec.ts b/sdk/networkcloud/arm-networkcloud/test/snippets.spec.ts index add51478a0f1..e92b51aa45ac 100644 --- a/sdk/networkcloud/arm-networkcloud/test/snippets.spec.ts +++ b/sdk/networkcloud/arm-networkcloud/test/snippets.spec.ts @@ -13,11 +13,11 @@ describe("snippets", () => { }); it("ReadmeSampleCreateClient_Browser", async () => { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; const credential = new InteractiveBrowserCredential({ tenantId: "", clientId: "", }); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new NetworkCloud(credential, subscriptionId); }); diff --git a/sdk/networkcloud/arm-networkcloud/tsp-location.yaml b/sdk/networkcloud/arm-networkcloud/tsp-location.yaml new file mode 100644 index 000000000000..687d2d89050b --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/networkcloud/NetworkCloud.Management +commit: 67b16bc7569e42c4ac751d7291a5dd79e0682de0 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/networkcloud/arm-networkcloud/warp.config.yml b/sdk/networkcloud/arm-networkcloud/warp.config.yml index 326e6c0415c8..002c0ce8dddd 100644 --- a/sdk/networkcloud/arm-networkcloud/warp.config.yml +++ b/sdk/networkcloud/arm-networkcloud/warp.config.yml @@ -1,5 +1,30 @@ - -extends: ../../../warp.base.config.yml +exports: + "./package.json": "./package.json" + ".": "./src/index.ts" + "./api": "./src/api/index.ts" + "./api/metricsConfigurations": "./src/api/metricsConfigurations/index.ts" + "./api/consoles": "./src/api/consoles/index.ts" + "./api/kubernetesClusterFeatures": "./src/api/kubernetesClusterFeatures/index.ts" + "./api/agentPools": "./src/api/agentPools/index.ts" + "./api/bmcKeySets": "./src/api/bmcKeySets/index.ts" + "./api/bareMetalMachineKeySets": "./src/api/bareMetalMachineKeySets/index.ts" + "./api/volumes": "./src/api/volumes/index.ts" + "./api/virtualMachines": "./src/api/virtualMachines/index.ts" + "./api/trunkedNetworks": "./src/api/trunkedNetworks/index.ts" + "./api/storageAppliances": "./src/api/storageAppliances/index.ts" + "./api/racks": "./src/api/racks/index.ts" + "./api/rackSkus": "./src/api/rackSkus/index.ts" + "./api/l3Networks": "./src/api/l3Networks/index.ts" + "./api/l2Networks": "./src/api/l2Networks/index.ts" + "./api/kubernetesVersions": "./src/api/kubernetesVersions/index.ts" + "./api/kubernetesClusters": "./src/api/kubernetesClusters/index.ts" + "./api/clusters": "./src/api/clusters/index.ts" + "./api/clusterManagers": "./src/api/clusterManagers/index.ts" + "./api/cloudServicesNetworks": "./src/api/cloudServicesNetworks/index.ts" + "./api/bareMetalMachines": "./src/api/bareMetalMachines/index.ts" + "./api/accessBridges": "./src/api/accessBridges/index.ts" + "./api/operations": "./src/api/operations/index.ts" + "./models": "./src/models/index.ts" targets: - name: browser diff --git a/sdk/networkcloud/ci.mgmt.yml b/sdk/networkcloud/ci.mgmt.yml index 53e755bd1797..a5b97d8abf21 100644 --- a/sdk/networkcloud/ci.mgmt.yml +++ b/sdk/networkcloud/ci.mgmt.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -13,7 +13,6 @@ trigger: include: - sdk/networkcloud/arm-networkcloud - sdk/networkcloud/ci.mgmt.yml - pr: branches: include: @@ -27,7 +26,6 @@ pr: include: - sdk/networkcloud/arm-networkcloud - sdk/networkcloud/ci.mgmt.yml - extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: @@ -35,4 +33,3 @@ extends: Artifacts: - name: azure-arm-networkcloud safeName: azurearmnetworkcloud - \ No newline at end of file